Journal Article

Generalized Bottom Up Parsers With Reduced Stack Activity

Elizabeth Scott and Adrian Johnstone

in The Computer Journal

Published on behalf of British Computer Society

Volume 48, issue 5, pages 565-587
Published in print January 2005 | ISSN: 0010-4620
Published online January 2005 | e-ISSN: 1460-2067 | DOI: https://dx.doi.org/10.1093/comjnl/bxh102
Generalized Bottom Up Parsers With Reduced Stack Activity

More Like This

Show all results sharing this subject:

  • Computer Science

GO

Show Summary Details

Preview

We describe a generalized bottom up parser in which non-embedded recursive rules are handled directly by the underlying automaton, thus limiting stack activity to the activation of rules displaying embedded recursion. Our strategy is motivated by Aycock and Horspool's approach, but uses a different automaton construction and leads to parsers that are correct for all context-free grammars, including those with hidden left recursion. The automaton features edges which directly connnect states containing reduction actions with their associated goto state: hence we call the approach reduction incorporated generalized LR parsing. Our parser constructs shared packed parse forests in a style similar to that of Tomita parsers. We give formal proofs of the correctness of our algorithm, and compare it with Tomita's algorithm in terms of the space and time requirements of the running parsers and the size of the parsers' tables. Experimental results are given for standard grammars for ANSI-C, ISO-Pascal; for a non-deterministic grammar for IBM VS-COBOL, and for a small grammar that triggers asymptotic worst case behaviour in our parser.

Journal Article.  0 words. 

Subjects: Computer Science

Full text: subscription required

How to subscribe Recommend to my Librarian

Users without a subscription are not able to see the full content. Please, subscribe or login to access all content.