[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GMP parser
From: |
Hans Aberg |
Subject: |
GMP parser |
Date: |
Thu, 26 Apr 2001 13:10:24 +0200 |
At 08:20 +1000 2001/04/26, Kevin Ryde wrote:
>> In addition, I am now making a Flex/Bison parser, making it easy to test
>> the different arithmetic operations (calculator style).
>
>Have a look at demos/calc.y and calclex.l if you haven't already.
>Very minimal, but better than a poke in the eye with a burnt stick.
>:-)
The also very minimal parser I made compiles under C++. It also parses
rational, fixed, and floating point numbers (fixed produces a floating as
semantic value).
I design it very deliberately to be as a test of the GMP library features
with as few other features as possible.
Note that in the calclex.l file, one do a table binary search, as it is
sorted -- it is of course of no practical importance with such a small
table. The straightforward
"abs" { return ABS; }
"bin" { return BIN; }
...
is probably also much faster, as Flex should translate it into a one
character look-ahead NFA.
Hans Aberg
- Re: GMP compiled under MacOS/C++ wrap, (continued)
- Re: GMP compiled under MacOS/C++ wrap, Hans Aberg, 2001/04/25
- Re: GMP compiled under MacOS/C++ wrap, Kevin Ryde, 2001/04/25
- 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 <=
- Re: GMP parser, Kevin Ryde, 2001/04/29
- Re: GMP parser, Hans Aberg, 2001/04/30
- 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