[antlr-interest] Any syntax predicate can be removed.
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Aug 29 12:46:27 PDT 2002
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/
More information about the antlr-interest
mailing list