help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Flex vs. POSIX 1003.2-1992 repeat operator {} precedence


From: W. L. Estes
Subject: Re: Flex vs. POSIX 1003.2-1992 repeat operator {} precedence
Date: Sun, 28 Apr 2002 15:56:26 -0400
User-agent: Mutt/1.3.28i

On Sunday, 28 April 2002,12:09 +0200, Hans Aberg wrote:

> If there is something wrong with the standard, then the standard should be
> changed. -- But one should still be able to write programs compatible with
> the standard.

But the folks at sgi point out that the standard is what it is and
they want to comply with it--even if it's brain-dead.

> In view of that this is a pit that most unassuming would fall into, should
> not Flex issue a warning (that it can be turned off) whenever a expression
> of the form ab{n} appears in the input? For example:
>   Warning, file <name>.l: ab{n} interpreted as (ab){n} (resp. a(b{n})), see
>     Flex manual ...

No. The standard is the dangerous part, not flex's syntax for EREs.

> Also, would it not be better to have simply one Flex distribution, so that
> "lex" can be aliased to "flex -l". What prevents such an approach?

Nothing. Although, it's worth pointing out that "flex -l" is an
attempt to confirm to AT&T lex, which is a slightly different beast
then posix-mandated lex. (The posix-mandated interpretation should be
implied by "flex -l", however.)

-- 
Will Estes
Unix Systems Programmer
UNCG MIS, Systems Group



reply via email to

[Prev in Thread] Current Thread [Next in Thread]