I've done it three times - the first approach was with flex++ and bison, and a set of c++ classes.
That was painful, as abc doesn't lend itself to that kind of parsing. I then moved to pcts for the
parser and lexer which was better. Finally I settled on javacc. Having said that, I still find some things are
easier to do by chomping off the whole line and digesting it separately.


My approach is to end up with a list of objects which each correspond to a set of tokens, which I can then
manipulate.


wil

John Chambers wrote:

Remo D. asked:
|
| A question for the ABC tools programmers around here.
|
| Did you hand-code your ABC parser or did you use some standard tool =
| (Lex, re2c, ...)?

Most of the tools that I've written have been in  perl,  and  parsing
abc  in that languages is so much easier than using such tools that I
don't even consider them.  And yes, I've used things like lex,  yacc,
etc.  on a number of projects. The syntax of abc isn't really complex
enough to deserve a separate parse pass like that.  The output  would
be  at  least  as  complex  as  abc itself, so you'd just replace one
parsing problem with a different but equally complex parsing problem.


To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html



To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to