Title: | A Fast General Parser for Automatic Code Generation |
Authors: | Yang, Wuu 交大名義發表 National Chiao Tung University |
Keywords: | ambiguous grammar;code generator;compiler;context-free grammar;parsing;general parsing;pattern matching;tree pattern;tree-pattern matching |
Issue Date: | 2010 |
Abstract: | The code generator in a compiler attempts to match a subject tree against a collection of tree-shaped patterns for generating instructions. Tree-pattern matching may be considered as a generalization of string parsing. We propose a new generalized LR (GLR) parser, which extends the LR parser stack with a parser cactus. GLR explores all plausible parsing steps to find the least-cost matching. GLR is fast due to two properties: (1) duplicate parsing steps are eliminated and (2) partial parse trees that will not lead to a least-cost matching are discarded as early as possible.(1) |
URI: | http://hdl.handle.net/11536/18517 |
ISBN: | 978-3-642-14821-7 |
ISSN: | 0302-9743 |
Journal: | METHODS AND TOOLS OF PARALLEL PROGRAMMING MULTICOMPUTERS |
Volume: | 6083 |
Begin Page: | 30 |
End Page: | 39 |
Appears in Collections: | Conferences Paper |