|Modular grammars and parsing? email@example.com (1992-01-04)|
|Re: Modular grammars and parsing? Jan.Rekers@cwi.nl (1992-01-07)|
|From:||firstname.lastname@example.org (Charles Lakos)|
|Organization:||University of Tasmania, Australia.|
|Date:||Sat, 4 Jan 1992 02:19:16 GMT|
I wish to write a parser to handle an imperative language in a modularised
way. It should reflect three distinct sub-grammars - the statements, the
declarations and the expressions. The "statements" part should "call" the
"declarations" and the "expressions" parts.
The reason for this desire is to be able to cater for different variants
of the language with, say, different forms of expressions. Also, I wish
to use the expressions grammar with a simplified intermediate form of the
I can obviously do the above with a top-down recursive parser, but I was
hoping to be able to do it by modifying an existing yacc + lex (flex)
grammar. Can anyone suggest how it might be done?
Charles Lakos. C.A.Lakos@cs.utas.edu.au
Computer Science Department, email@example.com
University of Tasmania, Phone: +61 02 20 2959
Australia. Fax: +61 02 20 2913
Return to the
Search the comp.compilers archives again.