Re: Using functional notation to extend BNF

RLake@Oxfam.org.uk
15 Jan 2007 14:06:26 -0500

          From comp.compilers

Related articles
Using functional notation to extend BNF zzq@hvc.rr.com (Bill Fenlason) (2007-01-08)
Re: Using functional notation to extend BNF danwang74@gmail.com (Daniel C. Wang) (2007-01-09)
Re: Using functional notation to extend BNF roar.foshaug@systor.st (Roar) (2007-01-09)
Re: Using functional notation to extend BNF RLake@Oxfam.org.uk (2007-01-15)
| List of all articles for this month |
From: RLake@Oxfam.org.uk
Newsgroups: comp.compilers
Date: 15 Jan 2007 14:06:26 -0500
Organization: Compilers Central
References: 07-01-025
Keywords: parse, bibliography
Posted-Date: 15 Jan 2007 14:06:26 EST

Bill Fenlason writes:


> For example, things like:
> oneOrMore(1) ::= 1 | oneOrMore(1) 1 ;
> optional(1) ::= | 1 ;
> inParens(1) ::= "(" 1 ")" ;
> commaList(1) ::= 1 | commaList(1) "," 1 ;
> separatedList(1,2) ::= 1 | separatedList(1,2) 2 1 ;


By an extraordinary coincidence, I was just reading this paper when your
email dropped into my mailbox:


http://www.cs.lth.se/Research/LDTA2004/d09_TheimannNeubauer.pdf


"Parameterized LR Parsing" by Peter Thiemann and Matthias Neubauer


The examples therein are quite similar:


SepList (Sep, Item) : /* empty */
                                            | NESepList (Sep, Item) ;
NESepList (Sep, Item) : Item
                                            | NESepList (Sep, Item) Sep Item ;
List (Item) : /* empty */
                                            | NEList (Item) ;
NEList (Item) : Item
                                            | NEList (Item) Item ;
Option (Item) : /* empty */
                                            | Item ;



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.