[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: name conflicts
Montreal Tue May 26 21:55:38 1998
At one point in cyberspacetime,
firstname.lastname@example.org <email@example.com> wrote:
> But what happens if 'if_then_statement' acquires an alternative
> other than 'blah'? (Like an 'if' without a 'then'.) You have to
> change your references to SIfThenStatement (say) to AIfThenStatement
> (or whatever) anyway.
In that case, there would be a PIfThenStatement for the production (as
usual), but none of the alternatives would be AIfThenStatement: you'd
have AAlternativeOneIfThenStatement, AAlternativeTwoIfThenStatement.
Am I reading you right?
> And (I ask genuinely) why break out the if and while statements (the
> blahs and blehs) from the 'statement' production, if there is only
> one alternative?
Oh, I'm using Etienne's implementation of the Java 1.0 grammar which
is based on the Java Language Specification LALR(1) grammar. I
presume it is done for clarity and I haven't felt the need to change
> BTW, when you say AFooStatement to yourself, do you think
> 'alternative production type foo statement' or do you think 'a foo
> statement'? I do the latter, which makes me wish for
Hehe, same here. That wouldn't really be a practical change to