|Modular grammars and parsing? firstname.lastname@example.org (1992-01-04)|
|Re: Modular grammars and parsing? Jan.Rekers@cwi.nl (1992-01-07)|
|From:||email@example.com (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, firstname.lastname@example.org
University of Tasmania, Phone: +61 02 20 2959
Australia. Fax: +61 02 20 2913
Return to the
Search the comp.compilers archives again.