"ng2010" <ng2010@att.invalid> wrote in message> For a hypothetical programming language that is LALR(1) and uses> semicolons as statement terminators, would a change that makes> semicolons> only required on multi-statement lines and using the newline as an> implicit statement terminator make the language LALR(2)?> [Seems to me that it makes a newline syntactically equivalent to a> semicolon, unless you> have some plan for multi-line statements you haven't mentioned. -John]

I don't remember the example I had in mind, but it was the one below,
then I was thinking
incorrectly:

void myfunc() // is this a function declaration or a definition?
{ // it was the start of a definition afterall, but the parser implicitly
// terminated the above line and thought it was a declaration. Or at
least it would seem
// that the parser is complicated by not having an explicit stmt
terminator. But how much?}

I think I was thinking that the lookahead token would be the newline
rather than the next "real" token.