[xquery-talk] Necessary whitespace

Michael Dyck jmdyck at ibiblio.org
Tue Apr 28 15:51:51 PDT 2015


On 15-04-28 06:26 PM, Benito van der Zander wrote:
>>
>>> Or in
>>> 1<<a>2</a>
>>> as "<" and "<a>2</a>"
>>>
>>> "<<" is longer, but not consistent.
>>
>>
>>  "<<" is longer than "<", and there are continuations of "1<<" that
>> conform to the EBNF, so the LMP rule compels the tokenizer to pick "<<",
>> which leads to raising an error at ">". Ghislain also said this yesterday.
>>
>> It's unclear what you mean by "consistent". If you mean that having the
>> tokenizer pick "<<" is not consistent with parsing the string as:
>
> Perhaps getting a consistent parsing tree?

Well, again, if you're saying that having the tokenizer pick "<<" does not 
result in a "consistent parsing tree", that's quite true, because it doesn't 
result in *any* parse tree.

> Theoretically a parser could parse it right-to-left and see <a>2</a> before <

Theoretically, yes. But the thinking behind the LMP rule was presumably a 
left-to-right tokenization.

-Michael



More information about the talk mailing list