[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GMP parser
From: |
Hans Aberg |
Subject: |
Re: GMP parser |
Date: |
Mon, 30 Apr 2001 12:24:55 +0200 |
At 08:41 +1000 2001/04/30, Kevin Ryde wrote:
>> "abs" { return ABS; }
>> "bin" { return BIN; }
>> ...
>> is probably also much faster, as Flex should translate it into a one
>> character look-ahead NFA.
>
>I think I wanted to lex out a whole word, so for instance "hexx" would
>be an error, rather than "hex" followed by "x". Of course in a
>different calculator perhaps the latter would be wanted.
Was not "hexx" to be treated as an identifier? If you use identifiers, then
"hex" { return hex_key; }
[[:alpha:]]+ { ... return identifier; }
will make "hexx" an identifier. However, if you merely strip out the
identifier part above, then "hexx" will be an error. -- Flex always looks
for the longest sequence, so whatever, it expected behavior should be
automatic.
Hans Aberg
- Re: GMP compiled under MacOS/C++ wrap, (continued)
- Re: GMP compiled under MacOS/C++ wrap, Hans Aberg, 2001/04/26
- GMP MacOS PPC assembler, Hans Aberg, 2001/04/26
- Re: GMP MacOS PPC assembler, Linus Nordberg, 2001/04/26
- Re: GMP MacOS PPC assembler, Hans Aberg, 2001/04/26
- Re: GMP MacOS PPC assembler, Torbjorn Granlund, 2001/04/27
- Re: GMP MacOS PPC assembler, Hans Aberg, 2001/04/27
- Re: GMP MacOS PPC assembler, Kevin Ryde, 2001/04/29
- Re: GMP MacOS PPC assembler, Hans Aberg, 2001/04/30
- GMP parser, Hans Aberg, 2001/04/26
- Re: GMP parser, Kevin Ryde, 2001/04/29
- Re: GMP parser,
Hans Aberg <=
- GMP C++ wrap, Hans Aberg, 2001/04/25
- GMP Inputs, Hans Aberg, 2001/04/25
- Re: GMP Inputs, Kevin Ryde, 2001/04/25
- Re: GMP Inputs, Hans Aberg, 2001/04/26
GMP ceil/floor/trunc, Hans Aberg, 2001/04/24