Look for the general pattern then use a runtime supplied hashtable to see if
the pattern is a keyword, if it is, then set the $type accordingly.

jim

> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of [email protected]
> Sent: Tuesday, October 19, 2010 2:49 AM
> To: [email protected]
> Subject: [antlr-interest] Keywords in grammar
> 
> Hi everyone,
> 
> I would like to create a grammar that looks for specific keywords. The
> problem is that the keywords may differ in different applications.
> So is there a possibility to provide the grammar with some external
> variables containing the keywords?
> And a rule in the grammar then compares a specific token in the input
> file, if it is one the provided keywords?
> 
> Thanks,
> Dagi
> 
> 
> ********************************************************
> 
> 
> 
> Dagi Troegner
> 
> Deutsches Zentrum fuer Luft- und Raumfahrt (DLR)
> 
> Institut fuer Flugfuehrung
> 
> Abteilung Lotsenassistenz
> 
> Lilienthalplatz 7
> 
> D-38108  Braunschweig
> 
> Telefon: (49) 531 / 295-2189
> 
> Fax: (49) 531 / 295-2180
> 
> Email: [email protected]<mailto:[email protected]>
> 
> __/|__
> 
> /_/_/_/
> 
>    |/ DLR
> 
> ********************************************************
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address


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