Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Lex/yacc alternatives

  1. May 6, 2013 #1
    About once a year I have to develop or at least design a grammar and a parser - that appears a constant of my working life...

    Everytime I'm facing this task, thus about once year, I, quite a lex/yacc (flex/bison resp.) guy, consider, or reconsider, alternatives for plain lex/yacc, and, seemingly determistic, after some musing and trying I get back to plain lex/yacc.

    Because I have a CORBA-Server at the hub of the application I can call in from almost every language, so this time I had a look at
    - antlr4 (Java) and antlr3 (Java but has RT for other langs),
    - SableCC (Java),
    - Parse::EBNF, Parse::Yapp and Marpa (Perl),
    - and SimpleParse (Python).

    Can anyone tell me why any of them would make my task easier than using good old lex/yacc?

    For me, the tandem antlr4 with antlrworks looked the most promising candidate, but I'm not yet convinced that the time spent spent on getting into it is amortized at the end.

    The grammar I have to develop is somewhat similar to SQL-DDL (in terms of structure, not in terms of the subject).
  2. jcsd
  3. May 13, 2013 #2
    O.K. that maybe was too specific; pls close this thread; I repost this at stackoverflow.com
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook