|ANNOUNCE: Tiny, a parser generator for context sensitive grammars firstname.lastname@example.org (Maurice Gittens) (2001-07-23)|
|Re: ANNOUNCE: Tiny, a parser generator for context sensitive gram email@example.com (2001-07-27)|
|Re: ANNOUNCE: Tiny, a parser generator for context sensitive grammars firstname.lastname@example.org (2001-07-30)|
|Re: ANNOUNCE: Tiny, a parser generator for context sensitive grammar email@example.com (Maurice Gittens) (2001-08-02)|
|From:||"Maurice Gittens" <firstname.lastname@example.org>|
|Date:||2 Aug 2001 02:33:17 -0400|
|Organization:||XS4ALL Internet BV|
|References:||01-07-128 01-07-149 01-07-154|
|Posted-Date:||02 Aug 2001 02:33:17 EDT|
"Wilhelm B. Kloke" <email@example.com> wrote:
> IMHO the a^nb^nc^n example is one such example. What I would like to see
> is some explicit advice how to convert a YACC grammar to Tiny.
Let A->@ be a production rule in a YACC grammar.
For a dotted grammar this might be replaced by:
.A->.@ A and @.A -> A.
So the single YACC production rule is replaced by two dotted production
So dotted grammars would seem to be at a disadvantage because according to
the recipe above the number of production rules in the dotted variant
is twice as many.
On the positive side dotted grammars do offer more flexibility where
semantic actions are concered.
Tiny allows semantic actions to be used for:
- selection of left hand sides
- selection of right hand sides
- execution of arbitrary code after rewritting has taken place
The YACC based grammar only allows one semantic action and
these actions cannot (as for as I know) influence parsing decisions.
> Some other thought is related to vanWijngarden 2level grammars. Could
> Tiny be used to convert the Algol68 grammar given in the Revised Report
> to a working parser?
I've given some thought to this and I currently expect that (some form of)
two level grammars will be able to be translated into dotted
grammars but this is currently just a hunch.
Return to the
Search the comp.compilers archives again.