Related articles |
---|
Getting rid of backups in flex. robertminsk@yahoo.com (2002-01-17) |
Re: Getting rid of backups in flex. esmond.pitt@bigpond.com (Esmond Pitt) (2002-01-18) |
Re: Getting rid of backups in flex. casse@netcourrier.com (=?ISO-8859-15?q?=22Cass=E9=.Hugues@free.fr,@free.f) (2002-02-06) |
Re: Getting rid of backups in flex. dube@dino04.iro.umontreal.ca (Danny Dube) (2002-02-16) |
Re: Getting rid of backups in flex. esmond.pitt@bigpond.com (Esmond Pitt) (2002-02-28) |
Re: Getting rid of backups in flex. clint@0lsen.net (2002-03-17) |
Re: Getting rid of backups in flex. fjh@cs.mu.OZ.AU (2002-03-19) |
From: | robertminsk@yahoo.com (Robert Minsk) |
Newsgroups: | comp.compilers |
Date: | 17 Jan 2002 00:31:48 -0500 |
Organization: | http://groups.google.com/ |
Keywords: | lex, question |
Posted-Date: | 17 Jan 2002 00:31:48 EST |
Given the following rules I am still getting 1 backup I'm trying to
get rid of.
DIGIT [[:digit:]]
EXP [Ee][+-]?{DIGIT}+
EXPERR [Ee][+-]?
%%
[-+]?{DIGIT}+ { return tInt; }
[-+]?{DIGIT}*"."{DIGIT}+{EXP}? |
[-+]?{DIGIT}+"."{DIGIT}*{EXP}? |
[-+]?{DIGIT}+{EXP} { return tFloat }
[-+]?{DIGIT}*"."{DIGIT}+{EXPERR}? |
[-+]?{DIGIT}+"."{DIGIT}*{EXPERR}? |
[-+]?{DIGIT}+{EXPERR}
. { return tError }
I get:
State #9 is non-accepting -
associated rule line numbers:
7 11
out-transitions: [ 0-9 ]
jam-transitions: EOF [ \000-/ :-\377 ]
1 backing up (non-accepting) states.
I have not been able to fix this backup. Can you get rid of the one
backup? Is there a better way to code this?
Return to the
comp.compilers page.
Search the
comp.compilers archives again.