From kdevelop-devel Sat Jul 21 17:30:10 2007 From: Roberto Raggi Date: Sat, 21 Jul 2007 17:30:10 +0000 To: kdevelop-devel Subject: Re: KDevelop-PG and the resulting AST Message-Id: <4A41EB3D-E0C2-49D9-81FD-649D9FCE4650 () kdevelop ! org> X-MARC-Message: https://marc.info/?l=kdevelop-devel&m=118503918601136 Hi Il giorno 21/lug/07, alle ore 19:00, Andreas Pakulat ha scritto: > Hi, > > in the qmake_parser_experiment branch I've hit a pretty bad problem: I > can't produce a proper AST node for this rule: > > ( OR #id=IDENTIFIER ( #func_args=function_args | 0 ) ) > -> or_op;; the standard fix in LL is: introduce a new symbol. For example, I have introduced a new symbol called `item'. #item=item @ OR -> or_op ;; id=IDENTIFIER (LPAREN arg=function_args RPAREN | 0) -> item ;; > > the problem is that there's no relation between the id_sequence and > the > func_args_sequence in the AST, but there is one in reality. I tried to > put > > [: (*yynode)->func_args_sequence->insert(0); :] > > into the epsilon part, but that doesn't work because kdev-pg's list > implementation is "crap" ;). It's not crap ;-) it's a plain standard circular list, you don't need more in compiler front-ends, but it's true it needs to be improved. ciao robe _______________________________________________ KDevelop-devel mailing list KDevelop-devel@kdevelop.org https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel