Hi,

I would like to reuse a grammar in this kind of way:
I have Pascal grammar 'pas.g' and I need to create Estelle grammar 'est.g'.
Some rules from Pascal must be extended in Estelle.

For example:
'pas.g'
assignment_statement:
     (variable_access | function_identifier) ":=" expression;


'est.g'
assignment_statement:
     pas.assignment_statement
   | module_variable ":=" module_variable;

I would like that alternative pas.assignment_statement in 'est.g'
assignment_statement rule expand to rules from 'pas.g', even though we
call rule in 'est.g' grammar and some of rules (variable_access |
function_identifier) ":=" expression are also redefined in 'est.g'.
I would like to get effect of namespace rather than inheritance.
Is there better solution than unique renaming all nonterminals in 'pas.g'?

Sorry for my poor English.
Best Regards!
Tomasz Ulinski

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to