Re: [Pyparsing] Java grammar
Brought to you by:
ptmcg
From: Paul M. <pt...@au...> - 2010-03-05 03:26:26
|
Sorry Mark, I know of no one who has tackled a full Java grammar in pyparsing. Here is one link to a Java BNF: http://www.daimi.au.dk/dRegAut/JavaBNF.html - having done the Verilog grammar, this looks like a comparable task. It took me about 8 weeks to do Verilog. If you do take this on, or a subset (or start a little Google Code project for it), one recommendation I would make would be to use a Regex for some of the complex low-level tokens, like all the numeric literals. Building them up with Word, Optional, etc. will run waaay too slow, and using a Regex is a reasonable compromise. -- Paul > -----Original Message----- > From: Mark Lawrence [mailto:bre...@ya...] > Sent: Thursday, March 04, 2010 9:55 AM > To: pyp...@li... > Subject: [Pyparsing] Java grammar > > Hi all, > > Just assume that there is some purely hypothetical raving lunatic who > thinks it is a good idea to use pyparsing to convert Java source code into > the far purer Python. Rather than reinvent wheels this PHRL hopes to > reuse an existing pyparsing Java grammar for the job. Does anybody know > of such a beast? > > Should said beast not exist, would it be possible to grab an existing > grammar from the web and convert it using ebnf.py? If no it would not > surprise this PHRL as surely the entire concept is simply far to good to > be true. If yes, yee hah!!!, but how the hell does this PHRL go about > this task? > > Any and all responses gratefully received. > > Mark Lawrence. > > > > > -------------------------------------------------------------------------- > ---- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Pyparsing-users mailing list > Pyp...@li... > https://lists.sourceforge.net/lists/listinfo/pyparsing-users |