(E)BNF Grammar to XML for LALR(1) parse table?

Cox.Jason@gmail.com
Mon, 14 Jan 2008 14:28:47 -0800 (PST)

          From comp.compilers

Related articles
(E)BNF Grammar to XML for LALR(1) parse table? Cox.Jason@gmail.com (2008-01-14)
Re: (E)BNF Grammar to XML for LALR(1) parse table? Cox.Jason@gmail.com (2008-01-15)
Re: (E)BNF Grammar to XML for LALR(1) parse table? englere_geo@yahoo.com (Eric) (2008-01-15)
Re: (E)BNF Grammar to XML for LALR(1) parse table? paul@paulbmann.com (Paul B Mann) (2008-02-15)
Re: (E)BNF Grammar to XML for LALR(1) parse table? scooter.phd@gmail.com (scooter.phd@gmail.com) (2008-02-17)
| List of all articles for this month |
From: Cox.Jason@gmail.com
Newsgroups: comp.compilers
Date: Mon, 14 Jan 2008 14:28:47 -0800 (PST)
Organization: Compilers Central
Keywords: parse, question
Posted-Date: 15 Jan 2008 00:39:45 EST

I have created a grammar for a little calculator language my company
created (literally takes constants, variables, parenthesis, and basic
arithmetic). We work exclusively in C# and I am having a difficult
time finding tools to generate a business-class, maintainable lexer
and parser. I have evaluated:


* Gold [http://devincook.com/goldparser/]
* C#Cup [http://www.infosys.tuwien.ac.at/cuplex/cup.htm]
* And GPLEX/GPPG [http://www.plas.fit.qut.edu.au/gppg/]


My requirements are:


* Efficiency is paramount as this will be iterated over many times.
* The code must be readable/maintainable.


GPLEX/GPPG was probably the best one, but it still fell short of my
expectations.


I figured the most expeditious route to get a working parser would be
to write my own, but I am not having fun manually generating the parse
tables. In this light, are there any tools which will examine a
grammar and spit out the parse table in XML so I can generate code
based on that?


Any magic bullet parser generators welcome as well :)
[If it really is just an expression language, an operator precedence parser,
which is easy to hand-code, should be all you need. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.