How to replace failure by a list of successes
Proc. of a conference on Functional programming languages and computer architecture
Compilers: principles, techniques, and tools
Compilers: principles, techniques, and tools
Scannerless NSLR(1) parsing of programming languages
PLDI '89 Proceedings of the ACM SIGPLAN 1989 Conference on Programming language design and implementation
ANTLR: a predicated-LL(k) parser generator
Software—Practice & Experience
ACM Transactions on Programming Languages and Systems (TOPLAS)
Fast context-free grammar parsing requires fast boolean matrix multiplication
Journal of the ACM (JACM)
Efficient Parsing for Natural Language: A Fast Algorithm for Practical Systems
Efficient Parsing for Natural Language: A Fast Algorithm for Practical Systems
The Theory of Parsing, Translation, and Compiling
The Theory of Parsing, Translation, and Compiling
Adding Semantic and Syntactic Predicates To LL(k): pred-LL(k)
CC '94 Proceedings of the 5th International Conference on Compiler Construction
Disambiguation Filters for Scannerless Generalized LR Parsers
CC '02 Proceedings of the 11th International Conference on Compiler Construction
Advanced Functional Programming, First International Spring School on Advanced Functional Programming Techniques-Tutorial Text
Journal of Functional Programming
Parsing expression grammars: a recognition-based syntactic foundation
Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
MinCaml: a simple and efficient compiler for a minimal functional language
Proceedings of the 2005 workshop on Functional and declarative programming in education
The next 700 data description languages
Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Better extensibility through modular syntax
Proceedings of the 2006 ACM SIGPLAN conference on Programming language design and implementation
Realization of natural language interfaces using lazy functional programming
ACM Computing Surveys (CSUR)
A backtracking LR algorithm for parsing ambiguous context-dependent languages
CASCON '06 Proceedings of the 2006 conference of the Center for Advanced Studies on Collaborative research
Journal of Computing Sciences in Colleges
A history of Haskell: being lazy with class
Proceedings of the third ACM SIGPLAN conference on History of programming languages
OMeta: an object-oriented language for pattern matching
Proceedings of the 2007 symposium on Dynamic languages
Executable Grammars in Newspeak
Electronic Notes in Theoretical Computer Science (ENTCS)
Packrat parsers can support left recursion
PEPM '08 Proceedings of the 2008 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
DLS '08 Proceedings of the 2008 symposium on Dynamic languages
ANTLRWorks: an ANTLR grammar development environment
Software—Practice & Experience
Designing Syntax Embeddings and Assimilations for Language Libraries
Models in Software Engineering
Partial Parsing: Combining Choice with Commitment
Implementation and Application of Functional Languages
Sectional domain specific languages
Proceedings of the 4th workshop on Domain-specific aspect languages
Some Aspects of Parsing Expression Grammar
Fundamenta Informaticae - Concurrency Specification and Programming (CS&P)
Building language towers with ziggurat
Journal of Functional Programming
Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications
The next 700 data description languages
Journal of the ACM (JACM)
Semantics and algorithms for data-dependent grammars
Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Parser combinators for ambiguous left-recursive grammars
PADL'08 Proceedings of the 10th international conference on Practical aspects of declarative languages
DCGs + memoing = packrat parsing but is it worth it?
PADL'08 Proceedings of the 10th international conference on Practical aspects of declarative languages
Packrat parsers can handle practical grammars in mostly constant space
Proceedings of the 9th ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering
Typed and unambiguous pattern matching on strings using regular expressions
Proceedings of the 12th international ACM SIGPLAN symposium on Principles and practice of declarative programming
Domain-Specific Languages for Composable Editor Plugins
Electronic Notes in Theoretical Computer Science (ENTCS)
Pure and declarative syntax definition: paradise lost and regained
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Explicitly recursive grammar combinators: a better model for shallow parser DSLs
PADL'11 Proceedings of the 13th international conference on Practical aspects of declarative languages
LL(*): the foundation of the ANTLR parser generator
Proceedings of the 32nd ACM SIGPLAN conference on Programming language design and implementation
Worlds: controlling the scope of side effects
Proceedings of the 25th European conference on Object-oriented programming
Parsing with derivatives: a functional pearl
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
Variability-aware parsing in the presence of lexical macros and conditional compilation
Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
Natural and flexible error recovery for generated parsers
SLE'09 Proceedings of the Second international conference on Software Language Engineering
Language boxes: bending the host language with modular language changes
SLE'09 Proceedings of the Second international conference on Software Language Engineering
TRX: a formally verified parser interpreter
ESOP'10 Proceedings of the 19th European conference on Programming Languages and Systems
Simple, functional, sound and complete parsing for all context-free grammars
CPP'11 Proceedings of the First international conference on Certified Programs and Proofs
ESOP'12 Proceedings of the 21st European conference on Programming Languages and Systems
Proceedings of the 34th International Conference on Software Engineering
Some Aspects of Parsing Expression Grammar
Fundamenta Informaticae - Concurrency Specification and Programming (CS&P)
Natural and Flexible Error Recovery for Generated Modular Language Environments
ACM Transactions on Programming Languages and Systems (TOPLAS)
Left recursion in parsing expression grammars
SBLP'12 Proceedings of the 16th Brazilian conference on Programming Languages
Adaptable parsing expression grammars
SBLP'12 Proceedings of the 16th Brazilian conference on Programming Languages
Science of Computer Programming
Fundamenta Informaticae - Concurrency, Specification and Programming
Hi-index | 0.00 |
Packrat parsing is a novel technique for implementing parsers in a lazy functional programming language. A packrat parser provides the power and flexibility of top-down parsing with backtracking and unlimited lookahead, but nevertheless guarantees linear parse time. Any language defined by an LL(k) or LR(k) grammar can be recognized by a packrat parser, in addition to many languages that conventional linear-time algorithms do not support. This additional power simplifies the handling of common syntactic idioms such as the widespread but troublesome longest-match rule, enables the use of sophisticated disambiguation strategies such as syntactic and semantic predicates, provides better grammar composition properties, and allows lexical analysis to be integrated seamlessly into parsing. Yet despite its power, packrat parsing shares the same simplicity and elegance as recursive descent parsing; in fact converting a backtracking recursive descent parser into a linear-time packrat parser often involves only a fairly straightforward structural change. This paper describes packrat parsing informally with emphasis on its use in practical applications, and explores its advantages and disadvantages with respect to the more conventional alternatives.