Boost logo

Boost Users :

Subject: Re: [Boost-users] Comparison boost spirit and ANTLR
From: Larry Evans (cppljevans_at_[hidden])
Date: 2013-05-29 12:31:54


On 05/29/13 09:51, Larry Evans wrote:
> On 05/29/13 07:59, salvatore dario minonne wrote:
>> ATLR is LL as well
> More specifically, ANTLR is LL(k) for some k>0:
>
> http://en.wikipedia.org/wiki/LL_parser
>
> Spirit is a PEG:
>
>
> http://www.boost.org/doc/libs/1_43_0/libs/spirit/doc/html/spirit/abstracts/parsing_expression_grammar.html
>
> Both PEG and LL)k) are recursive descent; however, LL(k) means
> the parser can lookahead K tokens to decide which alternative
> to parse. I think spirit's expect operator means it can lookahead
> 1 token. Also, spirit will try alternatives in order until it
> finds a match;
The parsing_expression_grammar.html contain a link to:

http://pdos.csail.mit.edu/~baford/packrat/popl04/

which contains a link to a .pdf and ps.gz file. My Adobe reader
could not read the.pdf file; however, my gv could read the unzipped
ps.gz file, whose page 1 supported the description given above for
how spirit handles the alternative operator, '|', which, on page 1 of
the ps file is called the "prioritized choice operator, '/'".
[snip]

HTH.

-Larry


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net