@Kevin - thanks for the reply: >Why can't ' ' be a part of either OTHERCHARS or STRCHAR? Then you don't need the syntactic predicate in your STRING_LITERAL rule.... I don't see your rule for handling the " characters. If you are worried about strings containing NLs or TABs (which would be errors), then you might want your STRING_LITERAL rule to check for them (in a semantic predicate instead and explicitly disallow them) instead of trying to allow blanks.
** I tried making the blank part of OTHERCHARS or STRCHAR; that didn't work for me, either. Perhaps I'm running into the interpreter problems John mentioned. > Ouch, your not going to try and parse: "identifier =two words" as if it was identifier ="two parts" are you?? ** No, I'm not! There are actually 2 different cases. More fully: ..., keywordOne="id1=uservalue" | "id2= two words", keywordTwo=" a bunch of words here. maybe spaces maybe not" This is just part of a more complicated grammar, with nested structures separated by curly brackets, lists separated by vertical bars, and more. I didn't include the whole grammar showing the handling of the quotation marks. 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.
