#10 antlr grammar compatibility

open
nobody
None
5
2012-06-18
2010-09-06
No

Hi, first of all, thank you for this wonderful product! I am really using it to handle complex, legacy languages, and it helps a lot... But sometimes I miss a plain ebnf grammar, and it is a little bit of a waste not to be compatible with the antlr grammar repository, so I thought : "why not implement the antlr grammar in pyparsing, and then dinamically create the pyparsing rules?", and amazingly it works! The antlr syntax is almost completed (only rewrite rules, similar to pyparsing actions, are missing, while the actual converted is still lacking some remappings, but it works with simple grammars!) I have also joined some tests, not much but this is all that I can do for now... I hope to contribute again in the future, and to be able to import/export any ebnf grammar in pyparsing as well! Cheers, Luca

Discussion

  • Luca DallOlio

    Luca DallOlio - 2010-09-06

    archive with antlr grammar, antlr converter and tests

     
  • Paul McGuire

    Paul McGuire - 2012-06-16
    • status: open --> pending
     
  • Paul McGuire

    Paul McGuire - 2012-06-16

    Luca -

    Thank you so much for this submission! I'm sorry I didn't see that you had attached your code to this note, I thought it was a feature request. This is excellent work, and I will be happy to include it in the examples that ship with the next release, with attribution to you, of course.

    Thank you again,
    -- Paul

     
  • Luca DallOlio

    Luca DallOlio - 2012-06-18
    • status: pending --> open
     
  • Luca DallOlio

    Luca DallOlio - 2012-06-18

    Paul,

    Thank you for reviewing this ticket! If you need any update of the code, wish for more tests, some additional features or anything like that, dont't hesitate asking : I will be happy to work at it.

    Thank you,

    Luca