[antlr-interest] still more => wars ;)
Chris Black
chris at lotuscat.com
Thu Dec 8 15:16:44 PST 2005
Terence Parr wrote:
>
> On Dec 8, 2005, at 2:45 PM, Chris Black wrote:
>
>> Terence Parr wrote:
>
>
> So, you'd vote for:
>
> (...) => syntactic predicate
> {...} => _hoisting_ disambiguating semantic predicate
> {...}? => gated semantic predicate
>
> Hmm...the two kinds of sem preds are pretty similar this way. I do
> like the => implies predicate though. I wonder what we could do to
> indicate gated. Loring's original suggestion was
>
>
> which is verbose but these are not used much and it's clear what we
> mean w/o new syntax. We could then do
>
> (...) => syntactic predicate
> {...}? _hoisting_ disambiguating semantic predicate
> ( {...}? ) => gated semantic predicate
>
> leaving everything the way they are now but adding the last syntax.
>
I think a good guiding principal on these sort of things is to shoot for
as much consistency as possible. That is, if you can make "=>" always
mean "predicate" (or at least semantic predicate), and have something
else always mean hoisting, and yet another notation for gated, that
would be the easiest to remember and understand in my opinion. So maybe:
(...) => syntactic predicate
{...} => semantic predicate
{...} ?=> hoisting disambiguating semantic predicate
{...} *=> gated semantic predicate
And, if they exist (I don't know what hoisting is, etc), to keep things
consistent:
(...) ?=> hoisting disambiguation syntactic predicate
(...) *=> gated syntactic predicate
As you can see, I also prefer all the notation to be part of the "=>"
sequence rather than split up. You'll also notice that {...} is always
semantic and (...) always syntactic.
Chris
More information about the antlr-interest
mailing list