Re: [sqlite] Some questions about the Lemon parser

2013-01-19 Thread Maël Nison
I have removed the c++11 features from the code, it should now compile fine
on Ubuntu


On 19 January 2013 08:10, Richard Hipp  wrote:

> On Fri, Jan 18, 2013 at 10:59 PM, Maël Nison  wrote:
>
> > Hi,
> >
> > I'm trying to understand how works Lemon error recovery, but it does not
> > seems to work as specified in the documentation (if I understand it
> > correctly).
> >
> > You can check this repository for an minimal showcase of my issue :
> > https://github.com/arcanis/lemon.error-recovery
> >
>
> cc1plus: error: unrecognized command line option ‘-std=c++11’
>
> The above is on a recent Ubuntu.
>
>
> >
> > As you can see in test.cc, I feed the grammar (test.lm) with : If, Expr,
> > If, Expr, Ok, Else, Ok
> >
> > Firstly, I would expect that the right-association-rule accepts the input
> > as
> >
> > - if
> > - if
> > - ok
> > - ok
> >
> > since using %left instead of %right gives me
> >
> > - if
> > - if
> > - ok
> > - ok
> >
> > But it does not. Instead, it calls syntax error then (and that's the
> > weirdest) accepts an incomplete input, dropping the remaining input
> tokens
> > :
> >
> > - if
> > - ok
> >
> > The parse_failure directive is never called, even if there is no 'error'
> > non-terminal in my grammar.
> >
> > I'm fairly new with this kind of parser, so please forgive me if I said
> > something horrible, but is it normal ? Is there something that I have
> > missed ?
> >
> > Thanks,
> >
> > --
> > Maël Nison
> > JS Github hipster, Assistant C++ chez Epitech
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
>
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Maël Nison
JS Github hipster, Assistant C++ chez Epitech
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Some questions about the Lemon parser

2013-01-19 Thread Richard Hipp
On Fri, Jan 18, 2013 at 10:59 PM, Maël Nison  wrote:

> Hi,
>
> I'm trying to understand how works Lemon error recovery, but it does not
> seems to work as specified in the documentation (if I understand it
> correctly).
>
> You can check this repository for an minimal showcase of my issue :
> https://github.com/arcanis/lemon.error-recovery
>

cc1plus: error: unrecognized command line option ‘-std=c++11’

The above is on a recent Ubuntu.


>
> As you can see in test.cc, I feed the grammar (test.lm) with : If, Expr,
> If, Expr, Ok, Else, Ok
>
> Firstly, I would expect that the right-association-rule accepts the input
> as
>
> - if
> - if
> - ok
> - ok
>
> since using %left instead of %right gives me
>
> - if
> - if
> - ok
> - ok
>
> But it does not. Instead, it calls syntax error then (and that's the
> weirdest) accepts an incomplete input, dropping the remaining input tokens
> :
>
> - if
> - ok
>
> The parse_failure directive is never called, even if there is no 'error'
> non-terminal in my grammar.
>
> I'm fairly new with this kind of parser, so please forgive me if I said
> something horrible, but is it normal ? Is there something that I have
> missed ?
>
> Thanks,
>
> --
> Maël Nison
> JS Github hipster, Assistant C++ chez Epitech
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Some questions about the Lemon parser

2013-01-19 Thread Maël Nison
Hi,

I'm trying to understand how works Lemon error recovery, but it does not
seems to work as specified in the documentation (if I understand it
correctly).

You can check this repository for an minimal showcase of my issue :
https://github.com/arcanis/lemon.error-recovery

As you can see in test.cc, I feed the grammar (test.lm) with : If, Expr,
If, Expr, Ok, Else, Ok

Firstly, I would expect that the right-association-rule accepts the input as

- if
- if
- ok
- ok

since using %left instead of %right gives me

- if
- if
- ok
- ok

But it does not. Instead, it calls syntax error then (and that's the
weirdest) accepts an incomplete input, dropping the remaining input tokens :

- if
- ok

The parse_failure directive is never called, even if there is no 'error'
non-terminal in my grammar.

I'm fairly new with this kind of parser, so please forgive me if I said
something horrible, but is it normal ? Is there something that I have
missed ?

Thanks,

-- 
Maël Nison
JS Github hipster, Assistant C++ chez Epitech
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users