----- Original Message ----
From: Timothy Washington <timothyjwashington@xxxxxxxx>
To: sablecc-discussion@xxxxxxxxxxxxxxxxx
Sent: Wednesday, September 17, 2008 5:22:50 PM
Subject: Reusing Grammars (howto use grammars in grammars)
Hi there. I have what might be a basic question regarding Sablecc 3.
How can I abstract out grammars and reuse them in other grammars? For example, I want to implement XML, XPath, XQuery and "MyCustomLang". XML and XPath are subsets of XQuery and "MyCustomLang" however. So I don't want to define the first 2 languages thrice (by themselves, then each in XQuery and "MyCustomLang").
Is there a way to import .sablecc definitions or just the ASTs into another .sablecc file (AST)? Thanks in advance for any help.
Tim
All new Yahoo! Mail - Get a sneak peak at messages with a handy reading pane.