manpagez: man pages & more
info flex
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Why can’t flex understand this variable trailing context pattern?

To: Gregory Margo <>
Subject: Re: flex-2.5.3 bug report
In-reply-to: Your message of Sat, 23 Nov 1996 16:50:09 PST.
Date: Sat, 23 Nov 1996 17:07:32 PST
From: Vern Paxson <vern>

> Enclosed is a lex file that "real" lex will process, but I cannot get
> flex to process it.  Could you try it and maybe point me in the right direction?

Your problem is that some of the definitions in the scanner use the '/'
trailing context operator, and have it enclosed in ()'s.  Flex does not
allow this operator to be enclosed in ()'s because doing so allows undefined
regular expressions such as "(a/b)+".  So the solution is to remove the
parentheses.  Note that you must also be building the scanner with the -l
option for AT&T lex compatibility.  Without this option, flex automatically
encloses the definitions in parentheses.


This document was generated on August 12, 2012 using texi2html 5.0.

© 2000-2018
Individual documents may contain additional copyright information.