The cleanest approach is just to add items to a set (or table) as they are 
matched; in case of duplicates, post a warning or error message directly 
instead of throwing an exception that would terminate syntactic analysis.

--Loring




________________________________
From: "Brisard, Fred D" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Wednesday, October 29, 2008 1:12:46 PM
Subject: [antlr-interest] Enforcing that a statement parm is only specified one 
time


Is there a standard pattern for allowing a singleinstance of a phrase on a 
given statement?
For example, Ihave statement of the syntax of
Stmtname [keyword1 keyvalue1] [keyword2 keyvalue2]
I want to allow keyword1 or keyword2 to be specified in any order but I don’t 
want to allow the specification of either keyword more than once.
I have some statements with up to 8 different keywords that should only occur 
once but in any order.
Thanks for any suggestions.


      
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

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

Reply via email to