Re: Regular Expressions

natasha@softlab.ece.ntua.gr (Natasa Manousopoulou)
Fri, 3 Nov 1995 07:56:25 GMT

          From comp.compilers

Related articles
[8 earlier articles]
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: natasha@softlab.ece.ntua.gr (Natasa Manousopoulou)
Keywords: lex, DFA
Organization: National Technical University of Athens, Greece
References: 95-10-087 95-11-016
Date: Fri, 3 Nov 1995 07:56:25 GMT

cgh@cs.rice.edu (Christopher G. Hyams) writes:


>How about:


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


>R' ::= a | b


This grammar is not adequate for regular expressions, as e.g. does
not accept the legal expression a+(bb). You can work around the
ambiguity if you define operator precedence, i.e. :


R ::= R + T
T ::= T F
F ::= S | S*
S ::= a | b | (R)


Natasa Manousopoulou
natasha@iit.nrcps.ariadne-t.gr
natasha@softlab.ece.ntua.gr
--


Post a followup to this message

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