Open guissalustiano opened 5 months ago
My way of reasoning for MOVE 42 TO ACCOUNT NUM BER
was that both MOVE 42 TO ACCOUNTNUMBER
and MOVE 42 TO ACCOUNT NUMBER
are valid interpretations if whitespace is insignificant.
Your way of reasoning is more applicable to something like MOVE 42 TO USER NUM BER
, where indeed there is one way to disambiguate, with two "fixes":
NUM BER
as NUMBER
since NUMBER
is already defined in the DATA DIVISION
USER IS PICTURE XXXX
and make it implicitly defined.That makes much more sense. Thanks!
In the whitespace insignificance examples on level 2 you say:
And in issue #2 you say:
The two possible ways to parse
MOVE 42 TO ACCOUNT NUM BER.
that I can think is:["MOVE", "42", "TO", "ACCOUNT", "NUMBER"]
["MOVE", "42", "TO", "ACCOUNT", "NUM", "BER"]
However, we have
NUMBER
defined, so we can use this to disambiguate for the first way and not raise an error, right?