Filters








8 Hits in 2.0 sec

Generalised Parsing: Some Costs [chapter]

Adrian Johnstone, Elizabeth Scott, Giorgios Economopoulos
2004 Lecture Notes in Computer Science  
Our goal is to provide a roadmap of the available approaches in terms of their space and time performance for programming language applications, focusing mainly on GLR style algorithms.  ...  It is well known that the original Tomita GLR algorithm fails to terminate on hidden left recursion: here we analyse two approaches to correct GLR parsing (i) the modification due to Farshi that is incorporated  ...  Our BRNGLR algorithm uses a 'binarisation' of the search process to yield a Tomita style parser which is cubic on any grammar.  ... 
doi:10.1007/978-3-540-24723-4_7 fatcat:5coet3nt4ne47fvbf6igfd6ah4

The Grammar Tool Box: A Case Study Comparing GLR Parsing Algorithms

Adrian Johnstone, Elizabeth Scott, Giorgios Economopoulos
2004 Electronical Notes in Theoretical Computer Science  
We illustrate the use of the toolset in the construction of a comparative study of three variants of the Tomita-style GLR parsing algorithm running on LR(0), SLR(1) and LR(1) tables for ANSI-C, ISO-Pascal  ...  GTB has three main rôles: as a pedagogic tool; as an experimental platform for novel algorithms and representations; and as a production tool for translator front end generation.  ...  GLR parsing GLR parsing was introduced by Tomita [26] as a means for natural language parsers to capture all possible derivations when parsing potentially highly ambiguous grammars.  ... 
doi:10.1016/j.entcs.2004.06.008 fatcat:q4seiunzfvfkja5z5r77cnquvq

Recognition is not parsing — SPPF-style parsing from cubic recognisers

Elizabeth Scott, Adrian Johnstone
2010 Science of Computer Programming  
The parser version of the RIGLR algorithm constructs Tomita-style SPPFs and thus is also worst-case unbounded polynomial order.  ...  In their basic forms the CYK-, Earley-and GLR-inspired RIGLR [21] algorithms are recognisers, while standard GLR-style algorithms are designed with derivation tree construction, and hence parsing, in mind  ...  the algorithm, and (ii) compare the performance of our cubic Earley parser against the BRNGLR cubic GLR parsing algorithm.  ... 
doi:10.1016/j.scico.2009.07.001 fatcat:pwnvub6vn5de7hcxjvrag5n4gm

Evaluating GLR parsing algorithms

Adrian Johnstone, Elizabeth Scott, Giorgios Economopoulos
2006 Science of Computer Programming  
We present a guide to the parse-time behaviour of these algorithms which illustrates the inefficiencies in conventional Farshi-style GLR parsing.  ...  of Tomita and (iii) the Binary Right Nulled GLR algorithm, on three types of LR table.  ...  Tomita-style GLR algorithms extend the LR parsing technique to cope with conflicts, thus GLR parsers can use any of the LR DFAs.  ... 
doi:10.1016/j.scico.2006.04.004 fatcat:eiqtzniwmvaahnnefzsajteb24

SPPF-Style Parsing From Earley Recognisers

Elizabeth Scott
2008 Electronical Notes in Theoretical Computer Science  
We have given a modified worst-case cubic version, the BRNGLR algorithm, that, for any string and any CFG, returns a binarised SPPF representation of all possible derivations of a given string.  ...  Tomita's GLR parser returns a shared packed parse forest (SPPF) representation of all derivations of a given string from a given CFG but is worst case unbounded polynomial order.  ...  In their basic forms the CYK and Earley algorithms are recognisers while GLR-style algorithms are designed with derivation tree construction, and hence parsing, in mind.  ... 
doi:10.1016/j.entcs.2008.03.044 fatcat:3n452avkjvchfb4uo4sqt4nwta

Speeding up Generalized PSR Parsers by Memoization Techniques

Mark Minas
2019 Electronic Proceedings in Theoretical Computer Science  
To overcome this restriction, we have recently extended PSR parsing to generalized PSR (GPSR) parsing along the lines of Tomita-style generalized LR parsing.  ...  Predictive shift-reduce (PSR) parsing for hyperedge replacement (HR) grammars is very efficient, but restricted to a subclass of unambiguous HR grammars.  ...  The original GLR parsing algorithm by Tomita runs in O(n k+1 ) where k is the length of the longest rule, whereas improved versions like Binary Right Nulled GLR (BRNGLR) parsers run in worst-case cubic  ... 
doi:10.4204/eptcs.309.4 fatcat:6ght5lgrgncsvnf5cunnczm4dy

Practical, general parser combinators

Anastasia Izmaylova, Ali Afroozeh, Tijs van der Storm
2016 Proceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation - PEPM 2016  
Second, we extend the resulting cubic CPS recognizers to parsers that construct a binarized Shared Packed Parse Forest (SPPF).  ...  In this paper we present general parser combinators that support all context-free grammars and construct a parse forest in cubic time and space in the worst case, while behaving nearly linearly on grammars  ...  Johnson [12] showed that any parsing algorithm that produces a Tomita-style SPPF has O(n m+1 ) worst-case runtime, where m is the length of the longest rule in the grammar.  ... 
doi:10.1145/2847538.2847539 dblp:conf/pepm/IzmaylovaAS16 fatcat:o52lti4rdrgfjpml6jw6skju7m

Faster, Practical GLL Parsing [chapter]

Ali Afroozeh, Anastasia Izmaylova
2015 Lecture Notes in Computer Science  
Although GLR parsers accept any context-free grammar, they have a complicated execution model, inherited from LR parsing.  ...  Generalized LL (GLL) parsing is an extension of recursivedescent (RD) parsing that supports all context-free grammars in cubic time and space.  ...  The main challenge in parsing C# files was dealing with C# directives, such as #if and #region. C# front ends, in contrast to C++, do not have a separate preprocessing phase for directives.  ... 
doi:10.1007/978-3-662-46663-6_5 fatcat:ywa6sx4msze2jpha7f73eu2lc4