The "logic" goes like this. Note the "=" instead of "::=". This
signals that the statement is not a rule, and is non-lexical -- it's
location in the file does not matter. Since it's not a rule, it does
not take the form LHS ::= RHS2 ...
The initial colon was for pseudo-symbols. Since the lexeme default
statement is not a rule, it does not have a LHS, so what appears before
the equal sign ("=") is not considered symbol, pseudo- or otherwise.
I am, frankly, less than 100% happy with this "logic" and my design
choices, but there they are.
In an ironic way, it does show Marpa's strength. Because it allows and
exploits ambiguity, I can "unpaint myself out of the corner", by
introducing new statements and syntax. Languages based on other parsers
cannot evolve in that way.
-- jeffrey
On 02/25/2014 08:25 AM, Ruslan Shvedov wrote:
Just caught myself thinking that
:default ::= action => [name, values]
:lexeme default ::= latm => 1
looks like a bit more consistent (well, for some definitions of
consistency at least) syntax than the current
:default ::= action => [name, values]
lexeme default = latm => 1
:default ::= ... and :lexeme ~ ... are pseudo-rules, but lexeme
default = ... is a statement. This is by design, so I'd appreciate any
information from those in the know.
--
You received this message because you are subscribed to the Google
Groups "marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "marpa
parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.