On Sat, 22 Jun 2002, Nadav Har'El wrote: > On Sat, Jun 22, 2002, Shlomi Fish wrote about "[Haifux] The Scannerless Generalized >LR Parser": > > It describes a tool that combines the functionality of Lex and Yacc with > > some improvements. I did not try it yet, but it might be worth to take a > > look. > > Note that in some respects, Lex is highly overrated. It is quite easy to > write a lexical analyzer for most languages you can think of, in straight > C code that is still readable and quite easily extendable. All you need to > do is is to write the yylex() function yourself. >
One should note that neither Lex and Yacc force the other upon the programmer. Lex can sometimes be convenient if you don't feel like re-inventing your own wheel. When working in Perl, Lex is just a small amount of user-land syntactic sugar, and doesn't do too much. > So in that sense, Yacc (with C, for example) already combines the > functionality of Lex and Yacc :) > I'm not sure that you write here. The way I understood it this parser can change the behaviour of the tokenizer based on what the parser told him (or vice versa - ?). It may be possible with Yacc, but I'm not sure it would be straightforward. With Rindolf, I'll probably need to modify the behaviour of the parser and lexer at run-time (I'd like people to be able to declare new operators). Same thing with Perl 6 if I understood Larry Wall correctly. Regards, Shlomi Fish > > ---------------------------------------------------------------------- Shlomi Fish [EMAIL PROTECTED] Home Page: http://t2.technion.ac.il/~shlomif/ Home E-mail: [EMAIL PROTECTED] He who re-invents the wheel, understands much better how a wheel works. -------------------------------------------------------------------------- Haifa Linux Club Mailing List (http://linuxclub.il.eu.org) To unsub send an empty message to [EMAIL PROTECTED]