Re: Leftmost longest match with DFA search

"Russ Cox" <rsc@swtch.com>
Wed, 14 May 2008 16:30:00 -0400

          From comp.compilers

Related articles
Leftmost longest match with DFA search monnier@iro.umontreal.ca (Stefan Monnier) (2008-05-10)
Re: Leftmost longest match with DFA search daniel2villeneuve@videotron.ca (Daniel Villeneuve) (2008-05-11)
Re: Leftmost longest match with DFA search rsc@swtch.com (Russ Cox) (2008-05-12)
Re: Leftmost longest match with DFA search monnier@iro.umontreal.ca (Stefan Monnier) (2008-05-13)
Re: Leftmost longest match with DFA search monnier@iro.umontreal.ca (Stefan Monnier) (2008-05-13)
Re: Leftmost longest match with DFA search Danny.Dube@ift.ulaval.ca (2008-05-13)
Re: Leftmost longest match with DFA search rsc@swtch.com (Russ Cox) (2008-05-14)
Re: Leftmost longest match with DFA search Danny.Dube@ift.remove.ulaval.remove.ca (2008-05-15)
| List of all articles for this month |

From: "Russ Cox" <rsc@swtch.com>
Newsgroups: comp.compilers
Date: Wed, 14 May 2008 16:30:00 -0400
Organization: Compilers Central
References: 08-05-049
Keywords: lex, DFA
Posted-Date: 14 May 2008 22:38:29 EDT

> I'm not sure whether there is confusion between "leftmost longest
> match" and "longest leftmost match". For me, "leftmost longest match"
> refers to the leftmost of the longest matches while "longest leftmost
> match" refers to the longest of the leftmost matches


In the context of regular expression search, "leftmost longest"
means the longest of the leftmost matches, not the leftmost
of the longest matches. As you point out, it doesn't stand up
to syntactic scrutiny, but it's the standard term.


Rarely, one sees it written with a comma--leftmost, longest--to
encourage interpreting "longest" as the tiebreaker.


Russ



Post a followup to this message

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