|A NEW parser generator! - Please Read! DevinCook@hotmail.com (2001-05-22)|
|Re: A NEW parser generator! - Please Read! Martin.Ward@durham.ac.uk (2001-05-29)|
|Re: A NEW parser generator! - Please Read! firstname.lastname@example.org (Devin Cook) (2001-05-29)|
|From:||"Devin Cook" <email@example.com>|
|Date:||29 May 2001 23:21:35 -0400|
|Posted-Date:||29 May 2001 23:21:35 EDT|
>My only suggestion is: don't generate binary intermediate files,
>generate human readable text files instead (read Bently's
>"Programming Pearls" and "More Programming Pearls" for why).
Okay, I'll take a look at those two books.
The idea behind creating the binary file is to operationally separate
the DFA/LALR parse engine and the code that derives the table
information. Hopefully, developers will be able to use the Builder
(for lack of a better term) to analyze a gramamr on a Wintel machine
(for instance) and then use that binary file on a UNIX, Mac, Linux,
etc... In addition, my intention was to make the parser generator
language independant. Since the LALR and DFA algorithms are simple,
implementing a parsing engine in multiple programming languages and on
multiple platforms should be quite easy.
But to answer your point. The GOLD Parse Builder can currently export
the system's tables (Symbols, Rules, Character Sets, Parameters, DFA,
LALR) to a HTML file. But, I agree it would be a good idea to add
different exporting formats. The two that come to mind immediately are
good 'ole csv text and a YACC-ish text dump.
>Provide a perl module to parse these tables into perl structures
That sounds like a good idea. The GOLD Builder does have a utility
that creates enumerated constants for a number of popular programming
languages. I'll add Perl in the next build.
>generate xvcg/dotty or whatever graph files from them.
>I think this could be quite useful for "visualising" grammars.
The GOLD Builder shows the "dotty" notation for the LALR states after it is
does analyzing the grammar. This can be exported to HTML as well. I'll look
into if it is feasable to make it create a graphic file.
Anyway, thanks for your feedback.
- Devin Cook (DevinCook@hotmail.com)
Return to the
Search the comp.compilers archives again.