I'd like opinions on adding a "interface" statement to the SLIF.
Currently, for backward compatibility reasons, some of the defaults are
not the best.  I'd like to add a

    interface 2

statement which, if present, will makes these the new defaults:

  lexeme default = forgiving => 1
  :default ::= action => ::array

The first line would make LATM the default, and the second would make
the make the default semantics for rules return the child values in
an array.

A specific reason for changing the default for rule semantics is that
in the first stages of development, array output is useful in checking
your grammar.  So it's a great way to start.

The current behavior, returning 'undef' by default, is especially
perplexing to newcomers to Marpa.  It means that, by default, value()
returns \undef on success, and undef on failure.  This behavior is
unintuitive, unhelpful and confusing.

A specific question I have: Should one of the bless options also be the
default for rules?  If so, what about lexemes?  A reason not to bless
is clutter.  A reason to bless is that it provides even more information
for grammar checking.

As usual, these defaults will be able to be overriden, but they do make
a real difference in convenience, and to those just finding their way
in Marpa.  Whichever is the choice, I'll change all the synopses in the
docs to include a

  revision 2

statement at the beginning, so that it becomes more or less like the
"use strict", etc. incantation at the beginning of Perl scripts.

Please comment or ask questions -- jeffrey

-- 
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.

Reply via email to