Per suggestions, for example this one and Ron's, I am going to shelve the idea of an "if" or "interface" option. For the time being, resetting the defaults by specifying the options at the beginning of the script as a kind of "incantation" should be adequate.

-- jeffrey

On 02/24/2014 12:25 AM, Ruslan Shvedov wrote:
I'm mostly with Ron on that — to me, merely declaring/documenting

    :default ::= action => [name,values]

as the current best practice to start grammar development by looking at the names/values returned by the recognizer, like that once was the case with :default ::= action => ::array seems to be a better way to introduce it when compared with new SLIF DSL syntax or use Marpa::R2 qw(if2).

As for backward compatibility concern related to

    lexeme default = latm => 1

I'd just refwer to my (possibly mistaken) opinion in previous RFD.


On Mon, Feb 24, 2014 at 1:08 AM, Jeffrey Kegler <[email protected] <mailto:[email protected]>> wrote:

    I've taken input from the first RFD on this topic, and have added
    some new features to Marpa.  What I propose to do now is to allow
    you to specify "if2" in Marpa::R2's import list.  That is, you can do

       use Marpa::R2 qw(if2);

    If you choose to specify interface 2 this way, your defaults will
    change to the following:

        :default ::= action => [name,values]
        lexeme default = latm => 1

    Here "name" is a new array descriptor element, whose value for a
    rule is the rule's name, if it has one.  For an unnamed rule it is
    the name of the LHS, and for lexemes and nulled symbols, it is the
    symbol name.

    The "latm" adverb is new, but it's just a synonym for "forgiving".
     The "forgiving" adverb is also retained, for backward
    compatibility.  I've added "latm" because "forgiving" describe the
    behavior in terms of a now obsolete implementation.  The behavior
    is Longest Acceptable Tokens Matching, so it's easiest to call it
    that.

    Rule names can be defined with a new "name" adverb, which can used
    as follows:

        start ::= number1 number2 name => top
        number1 ::= <forty two> name => 'number 1'
        number2 ::= <forty three> name => 'number 2'

    Please let me know your thoughts,

    -- 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]
    <mailto:marpa-parser%[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.

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