Related articles |
---|
Compiling expressions james.harris.1@gmail.com (James Harris) (2012-12-29) |
Re: Compiling expressions gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-12-29) |
Re: Compiling expressions mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2012-12-30) |
Re: Compiling expressions james.harris.1@gmail.com (James Harris) (2013-01-02) |
Re: Compiling expressions james.harris.1@gmail.com (James Harris) (2013-01-02) |
Re: Compiling expressions matzebraun@googlemail.com (matzebraun@googlemail.com) (2013-01-03) |
Re: Compiling expressions torbenm@diku.dk (2013-01-03) |
Re: Compiling expressions james.harris.1@gmail.com (James Harris) (2013-01-03) |
Re: Compiling expressions james.harris.1@gmail.com (James Harris) (2013-01-03) |
Re: Compiling expressions mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2013-01-04) |
[3 later articles] |
From: | James Harris <james.harris.1@gmail.com> |
Newsgroups: | comp.compilers |
Date: | Wed, 2 Jan 2013 09:04:40 -0800 (PST) |
Organization: | Compilers Central |
References: | 12-12-035 12-12-036 |
Keywords: | parse |
Posted-Date: | 02 Jan 2013 13:20:40 EST |
On Dec 29 2012, 11:33 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu>
wrote:
> James Harris <james.harri...@gmail.com> wrote:
> > Compiling expressions ...
> > ... I'm not after a prebuilt solution but would be interested to
> > hear from other folks who have had similar issues to address. The
> > requirements are:
> > 1. Hand-written, not the output of a parser generator.
>
> An interesting requirement.
>
> I can understand need for speed, size, and such, and maybe one
> of those requires a hand-written (hand optimized) parser.
>
> If you are so restricted, do you allow your parser to be written
> in a high-level language? To be compiled by a non-handwritten
> compiler?
The parser for the rest of the language is handwritten and top-down.
Therefore it makes sense to parse expressions the same way. I don't
want to have generated code just to recognise expressions. It doesn't
feel like a restriction per se, just a choice.
HLL is fine. How the compiler is compiled doesn't matter.
...
> > 3. Precedences (and possibly associativities) defined in tables.
>
> Tables most easily generated automatically, by a parser generator?
I would rather the result is easy to understand but I don't mind too
much how the tables are generated.
James
Return to the
comp.compilers page.
Search the
comp.compilers archives again.