Re: Regular Expressions

cgh@cs.rice.edu (Christopher G. Hyams)
Sun, 29 Oct 1995 03:11:17 GMT

          From comp.compilers

Related articles
[6 earlier articles]
Re: Regular Expressions dmaze@mit.edu (David Z Maze) (2004-10-12)
Re: Regular Expressions Martin.Ward@durham.ac.uk (Martin Ward) (2004-10-17)
Re: Regular Expressions choksheak@yahoo.com (ChokSheak Lau) (2004-10-21)
Re: regular expressions wendt@CS.ColoState.EDU (1993-03-22)
Regular Expressions rafae1@hp.fciencias.unam.mx (trejo ortiz alejandro augusto) (1995-10-16)
Re: Regular Expressions mnp@compass-da.com (Mitchell Perilstein) (1995-10-23)
Re: Regular Expressions cgh@cs.rice.edu (1995-10-29)
Re: Regular Expressions odunlain@maths.tcd.ie (Colm O'Dunlaing) (1995-10-31)
Re: Regular Expressions natasha@softlab.ece.ntua.gr (1995-11-03)
Re: Regular Expressions sjmccaug@prairienet.org (1995-11-28)
Re: Regular Expressions jmccarty@spdmail.spd.dsccc.com (1995-11-29)
| List of all articles for this month |

Newsgroups: comp.compilers
From: cgh@cs.rice.edu (Christopher G. Hyams)
Keywords: lex, DFA
Organization: Rice University, Houston, Texas
References: 95-10-087
Date: Sun, 29 Oct 1995 03:11:17 GMT

trejo ortiz alejandro augusto (rafae1@hp.fciencias.unam.mx) wrote:
: Hi everyone.
: I have some problems about regular expressions:


: 3) An ambiguous grammar for regular expressions over the alphabet {a, b}is the
: following:
: R::=RR | R + R | R* | (R) |a|b
: The question is: How can I state an unambiguous grammar for regular
: expressions?


How about:


R ::= R R'
      | R + R'
      | R *
      | ( R )
      | R'


R' ::= a | b


--
Chris Hyams
cgh@cs.rice.edu
--


Post a followup to this message

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