Re: Precedence based parsing (Hans Aberg)
27 Dec 2003 14:15:32 -0500

          From comp.compilers

Related articles
[4 earlier articles]
Re: Precedence based parsing (Andi Kleen) (2003-12-08)
Re: Precedence based parsing (2003-12-13)
Re: Precedence based parsing (Rob Thorpe) (2003-12-13)
Re: Precedence based parsing (Clint Olsen) (2003-12-20)
Re: Precedence based parsing (Steve Meyer) (2003-12-23)
Re: Precedence based parsing (Joachim Durchholz) (2003-12-27)
Re: Precedence based parsing (2003-12-27)
Re: Precedence based parsing (Derk Gwen) (2004-01-02)
| List of all articles for this month |

From: (Hans Aberg)
Newsgroups: comp.compilers
Date: 27 Dec 2003 14:15:32 -0500
Organization: Mathematics
References: 03-12-035 03-12-056 03-12-097 03-12-113 03-12-130
Keywords: parse
Posted-Date: 27 Dec 2003 14:15:32 EST wrote:

> Verilog expressions are complex and language is irregular and non context
>free. For example, scanner requires information from state of parser to
>distinguish tokens. Such language constructs are what hardware designers

This is a common lexer tweak in languages that are implemented with
context free parser generators. Since many strictly non-context free
computer languages can be reduced to context-free one by the use of
such tweaks, non-context free parser generators have in the past not
been in a very great need. The Bison manual contains though an example
how to use a GLR parser to handle a common C++ construct.

> In a more general sense, I have never understood why people insist
>on using weak push down autamata (PDA) machine parsing tables when
>programming languages provide the full power of Turing Machines.

I am not sure what you mean here: PDA's are used to implement programming
languages. Also, LL(k) (not only LR(k)) grammars, which you say you use,
can be implemented using a push-down automaton; see for example Waite &
Goose, "Compiler construction", theorem 5.23, p.123.

    Hans Aberg

Post a followup to this message

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