Well, this is actually expected... :-) Thing is, the tokenizer is completely context-insensitive. So it generates a flow of tokens from your input chars
all by itself without caring about the current production. And as the CONSTRAINT token is placed above the IDENTIFIER token in the list of
token definitions, it is chosen.
The fix here, if you really mean that a constraint can be called CONSTRAINT, is to change the production:
bob = CONSTRAINT (IDENTIFIER | CONSTRAINT) ;
Or even nicer:
Bob = CONSTRAINT String ;
String = IDENTIFIER | CONSTRAINT ;
Hope this helps!
Oh, that helps, I just was hoping to avoid it. :) But, that is the nature of tokenizers, so I'm not going to complain too much. Apparently Oracle allows CONSTRAINT and DEFAULT as column names (parsing a 80k line DDL right now) along with a lot of other keywords. But, I'll just break out identifier and that should fix it. Thank you.
_______________________________________________ Grammatica-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/grammatica-users
