Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2001-05-24 08:58:50


On Thursday 24 May 2001 08:01, you wrote:
> Hello.
> Discussion about Spirit touched on possibility of creating automata
> building library. I view such library as providing very simple
> functionality: given a grammar (=BNF), build automaton for recognition of
> the grammar.

I would envision a bit more for such a library - for instance, automatic
construction of abstract syntax trees from the grammar (ANTLR does this).
 
> Futher direction may include EBNF->BNF conversion and probably NFA & DFA
> building and DFA minimization facilities.

Perhaps regex could be augmented with a NFA & DFA back-end. We could borrow
the graph library for representing the graphs of the automata...

> I myslef can implement LALR(1) and SLR(1) methods, probably LR(1)
> (if needed).
>
> As for LL(?) methods, I'm not sure if these have much in common with LR(?).

It's a different subset of context-free languages. LL(k) parsers are
generally considered easier to understand/write that LR or LALR parsers.

> Is there any interest for such a library?

Absolutely.

        Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk