PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
June 4, 2011ACM SIGPLAN Notices178 citations

Ll(*)

View Full Paper
TPTerence ParrKFKathleen Fisher

Key Points

  • The aim is to introduce the LL(*) parsing strategy and analyze its effectiveness with ANTLR grammars.
  • Developed an associated grammar analysis algorithm for LL(*) parsing decisions.
  • Implemented parsing decisions that adjust from fixed lookahead to arbitrary lookahead and backtracking.
  • Evaluated performance against traditional LL and LR parsers.
  • LL(*) parsing outperforms traditional parsers in handling context-sensitive languages.
  • Achieved improved expressivity similar to PEGs while maintaining good error handling.
  • Static removal of speculation enhanced parsing efficiency and effectiveness.

Abstract

Despite the power of Parser Expression Grammars (PEGs) and GLR, parsing is not a solved problem. Adding nondeterminism (parser speculation) to traditional LL and LR parsers can lead to unexpected parse-time behavior and introduces practical issues with error handling, single-step debugging, and side-effecting embedded grammar actions. This paper introduces the LL (*) parsing strategy and an associated grammar analysis algorithm that constructs LL (*) parsing decisions from ANTLR grammars. At parse-time, decisions gracefully throttle up from conventional fixed k>=1 lookahead to arbitrary lookahead and, finally, fail over to backtracking depending on the complexity of the parsing decision and the input symbols. LL (*) parsing strength reaches into the context-sensitive languages, in some cases beyond what GLR and PEGs can express. By statically removing as much speculation as possible, LL (*) provides the expressivity of PEGs while retaining LL 's good error handling and unrestricted grammar actions. Widespread use of ANTLR (over 70,000 downloads/year) shows that it is effective for a wide variety of applications.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Parr et al. (2011) studied this question.

synapsesocial.com/papers/6a211f84eff8306d03c3b5f1https://doi.org/10.1145/1993316.1993548
Ask AI
Helpful
Bookmark
Share
View Full Paper