Filters








22,204 Hits in 5.5 sec

A Practical Parser with Combined Parsing Techniques

Donghui Wang
2015 International Journal of Software Engineering & Applications  
The new parser adds a noncanonical parsing technique, along with a Shunting-Yard-style algorithm and other techniques as a second step after the original canonical LALR [2], resulting in a powerful and  ...  efficient two-level parsing approach.  ...  For the level 2 parser, we have adapted the precedence parsing technique and constructed an operator-precedence table.  ... 
doi:10.5121/ijsea.2015.6401 fatcat:v2spmqvhordffbp4agjlmvvbii

Precedences in specifications and implementations of programming languages

Annika Aasa
1995 Theoretical Computer Science  
A problem with a language containing infix, prefix and postfix operators of different precedences is that the well-known algorithm, which transforms a grammar with infix operator precedences to an ordinary  ...  This paper gives an algorithm that works also for prefix and postfix operators, and the correctness of it is proved.  ...  We could easily extend the algorithm to allow distfix operators.  ... 
doi:10.1016/0304-3975(95)90680-j fatcat:tqgwplj7ezc7ngnjz4kbyvsg4m

Parsing Expression Grammars Made Practical [article]

Nicolas Laurent, Kim Mens
2015 arXiv   pre-print
We also explore the extensibility of the PEG paradigm by showing how one can easily introduce new parsing operators and how our parser accommodates custom memoization and error handling strategies.  ...  Likewise, support for associativity and explicit precedence is spotty.  ...  As such, each type of parsing expression has its own mini parsing algorithm. Precedence Implementing precedence is relatively straightforward.  ... 
arXiv:1509.02439v1 fatcat:3yvvebmm4vccpph7j3rarswlvq

Context-aware scanning for parsing extensible languages

Eric R. Van Wyk, August C. Schwerdfeger
2007 Proceedings of the 6th international conference on Generative programming and component engineering - GPCE '07  
This paper introduces new parsing and context-aware scanning algorithms in which the scanner uses contextual information to disambiguate lexical syntax.  ...  The parser uses a slightly modified LRstyle algorithm that passes to the scanner the set of valid symbols that the scanner may return at that point in parsing.  ...  For example, specifying that a keyword takes precedence over an identifier does not require any detailed knowledge of the algorithm or the parse table.  ... 
doi:10.1145/1289971.1289983 dblp:conf/gpce/WykS07 fatcat:5abwuaiepzg2tax3y6uut72czi

Pika parsing: reformulating packrat parsing as a dynamic programming algorithm solves the left recursion and error recovery problems [article]

Luke A. D. Hutchison
2020 arXiv   pre-print
Both problems are solved by the pika parser, a novel reformulation of packrat parsing as a dynamic programming algorithm, which requires parsing the input in reverse: bottom-up and right to left, rather  ...  Several new insights into precedence, associativity, and left recursion are presented.  ...  The Seq class (Listing 9), which extends Clause, implements the Seq PEG operator.  ... 
arXiv:2005.06444v4 fatcat:t3b5n6nqbvc53gezitsxngsqri

Iguana: a practical data-dependent parsing framework

Ali Afroozeh, Anastasia Izmaylova
2016 Proceedings of the 25th International Conference on Compiler Construction - CC 2016  
., for operator precedence and indentation rules, which are implemented as desugaring to data-dependent grammars.  ...  In this paper we present Iguana, a data-dependent parsing framework, implemented on top of the GLL parsing algorithm.  ...  Future work Currently Iguana reports the source location of a parse error, but does not provide error recovery facilities. Error recovery is future work.  ... 
doi:10.1145/2892208.2892234 dblp:conf/cc/AfroozehI16 fatcat:dte6t5jcqfabvkweef2343gevy

Page 378 of Computational Linguistics Vol. 18, Issue 3 [page]

1992 Computational Linguistics  
Johnson points out that a crude representation of a packed parse forest can lead the algorithm to use an amount of space exponential in the grammar size.  ...  As a minor note, in the discussion of Earley’s algorithm, Kipps attributes an overall amount of time O( wl’) to the predictor operation, w being the input string.  ... 

Composable user-defined operators that can express user-defined literals

Kazuhiro Ichikawa, Shigeru Chiba
2014 Proceedings of the 13th international conference on Modularity - MODULARITY '14  
The operators have two important features to be parsed in pragmatic time: overloading by return type and a precedence rule for operators.  ...  We present an experiment to show that the programs including user-defined literals cannot be parsed in pragmatic time in existing approaches but can be efficiently parsed in our approach.  ...  VarAccess(v) else backtrack [ parse by any other predefined rules ] return Failure } Figure 6. the parsing algorithm for statements PEG protean operators parsing rule A ← e → an operator  ... 
doi:10.1145/2577080.2577092 dblp:conf/aosd/IchikawaC14 fatcat:yewf5svivfdnphqr3v6cshte6m

Composable user-defined operators that can express user-defined literals

Kazuhiro Ichikawa, Shigeru Chiba
2014 Proceedings of the 13th international conference on Modularity - MODULARITY '14  
The operators have two important features to be parsed in pragmatic time: overloading by return type and a precedence rule for operators.  ...  We present an experiment to show that the programs including user-defined literals cannot be parsed in pragmatic time in existing approaches but can be efficiently parsed in our approach.  ...  VarAccess(v) else backtrack [ parse by any other predefined rules ] return Failure } Figure 6. the parsing algorithm for statements PEG protean operators parsing rule A ← e → an operator  ... 
doi:10.1145/2584469.2577092 fatcat:7gv7a5jjxrbfbg32iyukgo4lk4

Scannerless Boolean Parsing

Adam Megacz
2006 Electronical Notes in Theoretical Computer Science  
This paper explains how scannerless parsers for boolean grammars (context-free grammars extended with intersection and negation) can specify such languages unambiguously, and can also describe other interesting  ...  The sbp package implements this parsing technique and is publicly available as Java source code.  ...  SBP: a Scannerless Boolean Parser The sbp package is an implementation of the Lang-Tomita Generalized LR Parsing Algorithm [2, 3] , employing Johnstone & Scott's RNGLR algorithm [13] for handling -productions  ... 
doi:10.1016/j.entcs.2006.10.007 fatcat:zhdwszitpjgqjcmarvq24ufgzu

Operator precedence and the visibly pushdown property

Stefano Crespi Reghizzi, Dino Mandrioli
2012 Journal of computer and system sciences (Print)  
As a corollary, an extended regular expression of precedence-compatible FLs is a FL and a deterministic parser for it can be algorithmically obtained.  ...  Operator precedence languages, designated as Floyd's Languages (FL) to honor their inventor, are a classical deterministic context-free family.  ...  Three binary operator precedence (OP) relations are defined: equal-precedence: . = ⇐⇒ ∃ → , ∈ ∪ { } takes precedence: ⋗ ⇐⇒ ∃ → and ∈ ℛ ( ) (3) yields precedence: ⋖ ⇐⇒ ∃ → and ∈ ℒ ( ) For an OG , the operator  ... 
doi:10.1016/j.jcss.2011.12.006 fatcat:iqq23cjw7rbhplm2shjxuzy7su

A Small Domain Specific Language for Cryptographic Algorithms

Jaimandeep Singh, Brijendra Kumar Joshi
2014 International Journal of Computer Applications  
This paper establishes the need for a small Domain Specific Language to support rapid testing and diagnosis of cryptographic algorithm.  ...  Fig 2 : 2 Output of a Typical Lexer Listing 1 . 1 Parser for Printing AST for Simple Arithmetic Operations # Precedence rules for the arithmetic # operators precedence = ( ('left','PLUS','MINUS'), ('  ...  Extension of Grammar for Modular Arithmetic The typical arithmetic grammar was extended to support modulo operations. The extended grammar is given as docstrings in Lisitng 2.  ... 
doi:10.5120/17521-8083 fatcat:d3snhx77vna4fp7zydtykses2e

Operator precedence for data-dependent grammars

Ali Afroozeh, Anastasia Izmaylova
2016 Proceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation - PEPM 2016  
In this paper we present an implementation of declarative specification of operator precedence for general parsing that (1) is independent of the underlying parsing algorithm, (2) does not require any  ...  Our new approach to operator precedence is formulated using data-dependent grammars, which extend context-free grammars with arbitrary computation, variable binding and constraints.  ...  parsing algorithm.  ... 
doi:10.1145/2847538.2847540 dblp:conf/pepm/AfroozehI16 fatcat:2ac6y43wsrakzdmvknqmezqj7e

Well-typed Islands Parse Faster [article]

Erik Silkensen, Jeremy G. Siek
2011 arXiv   pre-print
In this paper, we present the design of a system that uses a type-oriented variant of island parsing to efficiently parse the syntax of composable DSLs.  ...  In particular, we show how type-oriented island parsing is constant time with respect to the number of DSLs imported.  ...  But first, we annotate our parse trees with the precedence and associativity, so an internal node has the form A → ,p t. Definition 5.1.  ... 
arXiv:1201.0024v1 fatcat:a6phhvtbb5b2rdsugmjex4ynfq

Well-Typed Islands Parse Faster [chapter]

Erik Silkensen, Jeremy Siek
2013 Lecture Notes in Computer Science  
In this paper, we present the design of a system that uses a type-oriented variant of island parsing to efficiently parse the syntax of composable DSLs.  ...  In particular, we show how type-oriented island parsing is constant time with respect to the number of DSLs imported.  ...  But first, we annotate our parse trees with the precedence and associativity, so an internal node has the form A → ,p t. Definition 5.1.  ... 
doi:10.1007/978-3-642-40447-4_5 fatcat:hdlxp4nqx5emtnwdgueqg77zie
« Previous Showing results 1 — 15 out of 22,204 results