Re: Compiling expressions

James Harris <james.harris.1@gmail.com>
Wed, 2 Jan 2013 09:10:32 -0800 (PST)

          From comp.compilers

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)
Re: Compiling expressions james.harris.1@gmail.com (James Harris) (2013-01-06)
[2 later articles]
| List of all articles for this month |
From: James Harris <james.harris.1@gmail.com>
Newsgroups: comp.compilers
Date: Wed, 2 Jan 2013 09:10:32 -0800 (PST)
Organization: Compilers Central
References: 12-12-035 12-12-038
Keywords: parse
Posted-Date: 03 Jan 2013 15:11:36 EST

On Dec 30 2012, 7:58 am, "Dmitry A. Kazakov" <mail...@dmitry-
kazakov.de> wrote:
> On Sat, 29 Dec 2012 05:11:16 -0800 (PST), James Harris wrote:


> > Compiling expressions ...


...


> > requirements are:
>
> > 1. Hand-written, not the output of a parser generator.
> > 2. Efficient and without backtracking.
> > 3. Precedences (and possibly associativities) defined in tables.
> > 4. Output to be a tree structure.
> > 5. Parenthesised subexpressions allowed.
> > 6. Some operator families are *not* to associate with each other. See
> > below.
> > 7. Monadic prefix, dyadic infix and monadic postfix operators are all
> > allowed.
> > 8. Prefix and infix operators can use some same symbols (e.g. minus
> > sign).
>
> Here is an implementation with an explanation of the technique used:
>
> http://www.dmitry-kazakov.de/ada/components.htm#Parsers_etc
>
> I extended the method, which fairly old, towards non-associativity (#6),
> advanced parenthesis (#5, keyed parameter associations), and split
> association priorities into left-right pairs. But basically it is still the
> same twin-stack method. Everything is table-driven, of course.


Thanks, a took a look. As mentioned I'm not looking for a solution as
yet but I'll keep a note of it for guidance if nothing else. If it
covers all the points I was asking about it's impressive.


James



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.