Adding semantic and syntactic predicates to LL(K): Pred-LL(k)

22Citations
Citations of this article
18Readers
Mendeley users who have this article in their library.

This article is free to access.

Abstract

Most language translation problems can be solved with existing LALR(1) or LL(k) language tools; e.g., YACC [Joh78] or ANTLR [PDC92]. However, there are language constructs that defy almost all parsing strategy commonly in use. Some of these constructs cannot be parsed without semantics, such as symbol table information, and some cannot be properly recognized without first examining the entire construct, that is we need “infinite lookahead.” In this paper, we introduce a new LL(k) parser strategy, pred- LL(k), that uses semantic or syntactic predicates to recognize language constructs when normal deterministic LL(k) parsing breaks down. Semantic predicates indicate the semantic validity of applying a production; syntactic predicates are grammar fragments that describe a syntactic context that must be satisfied before application of an associated production is authorized. Throughout, we discuss the implementation of predicates in ANTLR—the parser generator of The Purdue Compiler-Construction Tool Set.

Cite

CITATION STYLE

APA

Parr, T. J., & Quong, R. W. (1994). Adding semantic and syntactic predicates to LL(K): Pred-LL(k). In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 786 LNCS, pp. 263–277). Springer Verlag. https://doi.org/10.1007/3-540-57877-3_18

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free