You need to have L0 rules, for example

digit ~ '0' | '1'

Warning: this is off top of my head and untested.

The error message you got is not of the best.  I think we improved it in
the latest release, Marpa::R2 2.104

On Fri, Mar 13, 2015 at 9:10 PM, <[email protected]> wrote:

> Hi!
>
> I have a small example:
> ======================================
> #!/usr/bin/perl
> use strict;
> use warnings;
> use Marpa::R2;
>
> my $dsl = <<'END_OF_DSL';
> :default ::= action => [name,values]
> lexeme default = latm => 1
>
> seq ::= digit seq
> | digit
>
> digit ::= 0 | 1
> END_OF_DSL
>
>
> my $grammar = Marpa::R2::Scanless::G->new({ source => \$dsl });
> my $input = '01';
> my $value_ref = $grammar->parse(\$input, 'MyActions');
> ======================================
> When I run it I get an error:
> Problem in u->new(): L0 arg is not of type Marpa::R2::Thin::G at
> d:/Programs/_develop/strawberry/perl/site/lib/Marpa/R2/SLG.pm line 550.
>
> Version of (Strawberry) perl is v5.18.2, MARPA is 2.102.
>
> What's wrong?
>
> Thank you in advance,
> *Maxim Suslov*.
>
>  --
> 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/d/optout.
>

-- 
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/d/optout.

Reply via email to