Re: Proposal to change definition of 'name' (forbid final .)

Gunther Rademacher <grd@gmx.net> writes:
> However a wider context cannot be LL(1), when a name can be immediately followed
> by a period. At this point already this requires lookahead of at least 2 to 
> complete the name, plus more, if that period again could be followed by name 
> characters. But I was not in the original discussion, so I am not sure what 
> problem we are actually trying to solve by disallowing the final
> period.

Michael pressed on exactly this point. Before we do this, we do have to
be sure that the change resolves the lookahead problem that was
reported.

(I’m a little hazy on exactly what the problem is because I use either
an Earley or GLL parser to parse the input grammar, so don’t really care
whether or not names end with a final “.”.)

I imagine it was something like, “if you see a name that ends in ‘.’
followed by a space, you can’t know if that’s the ‘.’ that ends the rule
until you look ahead an unbounded distance.” I guess that forbidding ‘.’
at the end of the name would resolve that, but would it introduce
different unbounded lookahead problems?

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh
Saxonica

Received on Thursday, 30 November 2023 14:04:43 UTC