Related articles |
---|
flex default rule dmaziuk@bmrb.wisc.edu (Dimitri Maziuk) (2006-04-01) |
Re: flex default rule johnmillaway@yahoo.com (John Millaway) (2006-04-03) |
Re: flex default rule dmaziuk@bmrb.wisc.edu (Dimitri Maziuk) (2006-04-03) |
Re: flex default rule cdodd@acm.org (Chris Dodd) (2006-04-03) |
Re: flex default rule dmaziuk@bmrb.wisc.edu (Dimitri Maziuk) (2006-04-08) |
From: | Dimitri Maziuk <dmaziuk@bmrb.wisc.edu> |
Newsgroups: | comp.compilers |
Date: | 3 Apr 2006 01:41:22 -0400 |
Organization: | only myself |
References: | 06-04-001 |
Keywords: | lex |
Posted-Date: | 03 Apr 2006 01:41:22 EDT |
Dimitri Maziuk sez:
> Hi all,
>
> here's what I can't quite figure out:
Scratch that. I've been staring at my screen too long.
This is a backport from Java, and JFlex has a couple of differences
from flex. Most importantly, when more than one rule matches, JFlex
will apply the first rule in the set whereas flex applies the longest
matching one. As a result, I wrote the JFlex ruleset without regexp
negation and with only one lookahead. With flex I ended up using the
old "declare yet another lexical state and match .|\n in it" trick
in several places.
Dima
--
Relativity, Uncertainty, Incompleteness, Undecidability: choose any four
Return to the
comp.compilers page.
Search the
comp.compilers archives again.