LL(*)
Despite the power of Parser Expression Grammars (
PEGs) andGLR, parsing is not a solved problem. Adding nondeterminism (parser speculation) to traditionalLLandLRparsers 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 theLL(*)parsing strategy and an associated grammar analysis algorithm that constructsLL(*)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 whatGLRandPEGs can express. By statically removing as much speculation as possible,LL(*)provides the expressivity ofPEGs while retainingLL’s good error handling and unrestricted grammar actions.