Results 1 - 10
of
12
Efficient Demultiplexing of Network Packets by Automatic Parsing
- UNIVERSITY OF ARIZONA
, 1995
"... Packet filters are a mechanism for efficiently demultiplexing network packets to application endpoints. There is currently no general, formal specification method for packet filters that allows for easy or efficient composition of specifications. In this paper we present an automatic approach that a ..."
Abstract
-
Cited by 18 (3 self)
- Add to MetaCart
Packet filters are a mechanism for efficiently demultiplexing network packets to application endpoints. There is currently no general, formal specification method for packet filters that allows for easy or efficient composition of specifications. In this paper we present an automatic approach that achieves all of these goals. We approach packet filter specification as a language recognition problem: each filter is represented by a context-free grammar, whose language is the set of packets the filter should accept. Thus, packet filters can be formulated through a general, well defined specification; further, the grammar-based approach simplifies filter composition, which is essential where scalability is important. However packet filters based on standard LR parsing techniques suffer from poor performance: they touch every portion of the input, they check input bit by bit, they occupy large amount of space. We present new optimizations to LR parsing that enable our automatic approach to...
The Essence of LR Parsing
- In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation
, 1995
"... Partial evaluation can turn a generalparser into a parser generator. The generated parsers surpass those produced by traditional parser generators in speed and compactness. We use an inherently functional approach to implement general LR(k) parsers and specialize them using the partial evaluator Si ..."
Abstract
-
Cited by 16 (5 self)
- Add to MetaCart
Partial evaluation can turn a generalparser into a parser generator. The generated parsers surpass those produced by traditional parser generators in speed and compactness. We use an inherently functional approach to implement general LR(k) parsers and specialize them using the partial evaluator Similix. The functional implementation of LR parsing allows for concise implementation of the algorithmsthemselves and requires only straightforwardchanges to achieve good specialization results. In contrast, a traditional, stack-based implementation of a general LR parser requires significant structural changes to make it amenable to satisfactory specialization. 1 Introduction We present two inherently functional implementations of general LR(k) parsers: a direct-style first-order textbook version and one using continuation-passing style (CPS) for statetransitions. Neither requires the handling of an explicit parsing stack. These parsers, when specialized with respect to a grammar and lookah...
Towards efficient, typed LR parsers
- In ACM SIGPLAN Workshop on ML, Electronic Notes in Theoretical Computer Science
, 2005
"... Abstract The LR parser generators that are bundled with many functional programming language implementations produce code that is untyped, needlessly inefficient, or both. We show that, using generalized algebraic data types, it is possible to produce parsers that are well-typed (so they cannot unex ..."
Abstract
-
Cited by 13 (5 self)
- Add to MetaCart
Abstract The LR parser generators that are bundled with many functional programming language implementations produce code that is untyped, needlessly inefficient, or both. We show that, using generalized algebraic data types, it is possible to produce parsers that are well-typed (so they cannot unexpectedly crash or fail) and nevertheless efficient. This is a pleasing result as well as an illustration of the new expressiveness offered by generalized algebraic data types.
Faster Generalized LR Parsing
- CC’99, volume 1575 of LNCS
, 1999
"... Tomita devised a method of generalized LR (GLR) parsing to parse ambiguous grammars efficiently. A GLR parser uses linear-time LR parsing techniques as long as possible, falling back on more expensive general techniques when necessary. Much research has addressed speeding up LR parsers. However, we ..."
Abstract
-
Cited by 13 (2 self)
- Add to MetaCart
Tomita devised a method of generalized LR (GLR) parsing to parse ambiguous grammars efficiently. A GLR parser uses linear-time LR parsing techniques as long as possible, falling back on more expensive general techniques when necessary. Much research has addressed speeding up LR parsers. However, we argue that this previous work is not transferable to GLR parsers. Instead, we speed up LR parsers by building larger pushdown automata, trading space for time. A variant of the GLR algorithm then incorporates our faster LR parsers. Our timings show that our new method for GLR parsing can parse highly ambiguous grammars significantly faster than a standard GLR parser.
Hard-coding Bottom-up Code Generation Tables to Save Time and Space
, 1991
"... This paper describes a program that compiles BURS tables into a combination of hard code and data. Hard-coding exposed important opportunities for compression that were previously hidden in the tables, so the hard-coded code generators are not just faster but also significantly smaller than their pr ..."
Abstract
-
Cited by 12 (4 self)
- Add to MetaCart
This paper describes a program that compiles BURS tables into a combination of hard code and data. Hard-coding exposed important opportunities for compression that were previously hidden in the tables, so the hard-coded code generators are not just faster but also significantly smaller than their predecessors. A VAX code generator takes 21.4Kbytes and identifies optimal assembly code in about 50 VAX instructions per node
Very Fast YACC-Compatible Parsers (For Very Little Effort)
- Software - Practice & Experience
, 1995
"... We have developed a yacc-compatible parser generator that creates parsers that are 2.5 to 6.5 times faster than those generated by yacc or bison. Our tool, mule, creates directly-executable, hard-coded parsers in ANSI C; yacc produces interpreted, tabledriven parsers. Hard-coding LR parsers for spee ..."
Abstract
-
Cited by 12 (0 self)
- Add to MetaCart
We have developed a yacc-compatible parser generator that creates parsers that are 2.5 to 6.5 times faster than those generated by yacc or bison. Our tool, mule, creates directly-executable, hard-coded parsers in ANSI C; yacc produces interpreted, tabledriven parsers. Hard-coding LR parsers for speed is not a new idea. Two attributes distinguish mule from other parser generators that create hard-coded LR parsers: mule is compatible with yacc (including yacc's peculiar error recovery mechanisms), and mule does absolutely none of the complex automata analysis of previous hard-coded-parser generators. Mule creates simple, fast parsers after very little analysis. September 22, 1995 Department of Computer Science The University of Arizona Tucson, AZ 1 Introduction We have developed a yacc-compatible parser generator that creates parsers that are 2.5 to 6.5 times faster than those generated by yacc [Joh75] or the Free Software Foundation's yacc clone, bison. Our tool, mule, creates direc...
Parallel Attribute Grammar Evaluation
- Proceedings of the 7th International Conference on Distributed Computing Systems, IEEE
, 1987
"... This paper reports on experiments with parallel compilation of programming languages. In order to take advantage of the potential parallelism, we express the language translation process as an attribute grammar evaluation problem. We see three primary benefits to using attribute grammars: First, sin ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
This paper reports on experiments with parallel compilation of programming languages. In order to take advantage of the potential parallelism, we express the language translation process as an attribute grammar evaluation problem. We see three primary benefits to using attribute grammars: First, since attribute grammars provide a functional specification of the language translation process, they are easily amenable to parallel implementation, with relatively little synchronization overhead. Second, as a high-level specification of the language, they allow parallel translators to be produced automatically, relieving the compiler writer from the burden of dealing with parallelism. Third, they provide a basis for a wide variety of language translation problems, ranging from traditional programming language compilation to more ambitious problems such as proof checking, text formatting, etc. We study the efficiency and the potential for parallelism of various attribute grammar evaluation me...
Generation of LR Parsers by Partial Evaluation
- ACM Transactions on Programming Languages and Systems
, 2000
"... this paper appeared in Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, 1995 under the title "The Essence of LR Parsing." Authors' addresses: Michael Sperber, Wilhelm-Schickard-Institut fur Informatik, Universitat Tubingen, Sand 13, D72076 Tubi ..."
Abstract
-
Cited by 7 (2 self)
- Add to MetaCart
this paper appeared in Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, 1995 under the title "The Essence of LR Parsing." Authors' addresses: Michael Sperber, Wilhelm-Schickard-Institut fur Informatik, Universitat Tubingen, Sand 13, D72076 Tubingen, Germany, sperber@informatik.uni-tuebingen.de.
Directly-Executable Earley Parsing
, 2001
"... Deterministic parsing techniques are typically used in favor of general parsing algorithms for efficiency reasons. However, general algorithms such as Earley's method are more powerful and also easier for developers to use, because no seemingly arbitrary restrictions are placed on the grammar. We de ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
Deterministic parsing techniques are typically used in favor of general parsing algorithms for efficiency reasons. However, general algorithms such as Earley's method are more powerful and also easier for developers to use, because no seemingly arbitrary restrictions are placed on the grammar. We describe how to narrow the performance gap between general and deterministic parsers, constructing a directly executable Earley parser that can reach speeds comparable to deterministic methods even on grammars for commonly-used programming languages.
Recursive Ascent-Descent Parsing
- Journal of Computer Languages
, 1991
"... Generalized left-corner parsing was originally presented as a technique for generating a parser for the SLR#1# class of grammars but with far fewer states than the SLR#1# parser. ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Generalized left-corner parsing was originally presented as a technique for generating a parser for the SLR#1# class of grammars but with far fewer states than the SLR#1# parser.

