[antlr-interest] Any syntax predicate can be removed.
mzukowski at yci.com
mzukowski at yci.com
Thu Aug 29 12:55:05 PDT 2002
No, you need syntactic predicates if you need to make a decision that has to
look past the k tokens buffered.
Monty
> -----Original Message-----
> From: Ruslan Zasukhin [mailto:sunshine at public.kherson.ua]
> Sent: Thursday, August 29, 2002 12:46 PM
> To: antlr-interest at yahoogroups.com
> Cc: lgcraymer
> Subject: [antlr-interest] Any syntax predicate can be removed.
>
>
> Hi Lorin,
>
> Once you have write on list
>
> > If you are writing a new grammar, then "predicates are your
> friend" is
> > good practice for getting past the "Omigod--look at all these
> > warnings" stage. Wherever you have an ambiguity warning that you
> > cannot figure out quickly, insert a (syntactic) predicate to
> > disambiguate alternatives. Also, consider inserting semantic
> > predicates as "assertions". Once you get a warning-free antlr pass,
> > verify that the generated language processor properly
> recognizes your
> > test input (catch exceptions in the debugger at the point where they
> > are thrown). You may want to have a test version of your language
> > processor which produces some sort of text output that can be fed to
> > "diff" for regression testing. Once you get the translator working,
> > then go back and refactor on a predicate-by-predicate basis--it's a
> > lot easier to clean up ambiguities when you know where to look, and
> > having a test suite to run makes it easier to verify
> correct operation
> > after each change.
>
> So I want to clarify.
>
> If ANY syntax predicate can be removed from a grammar ?
>
> Or sometimes we must shut up, and use them ?
>
> --
> Best regards,
> Ruslan Zasukhin [ I feel the need...the need for speed ]
> -------------------------------------------------------------
> e-mail: ruslan at paradigmasoft.com
> web: http://www.paradigmasoft.com
>
> To subscribe to the Valentina mail list
> send a letter to valentina-on at lists.macserve.net
> -------------------------------------------------------------
>
>
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list