<link rel="stylesheet" href="styles.cf390c6bfbe7555f.css"> Skip to main content

A Fast General Parser for Automatic Code Generation

Loading...
Thumbnail Image

Date

Journal Title

Journal ISSN

Volume Title

Publisher

DOI

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)

Description

Citation

Endorsement

Review

Supplemented By

Referenced By