Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Parsing Expression Grammar


Related Topics

In the News (Tue 2 Dec 08)

  
  Grammar List
The grammar submitted by Michael Studman and revised by Scott Wisniewski, adapted to compile without error also in eclipse with antlr plugin and jdk 1.5, and the java preprocessor ported in Java as a subclass of Reader.
Eiffel's grammar is not context free (not even close), and that makes it very hard to fully implement with antlr (or any other context-free based grammar generator such as yacc/bison).
The zip includes the grammar file, as well as the cs token classes (the grammar uses a heterogeneous tree, though that should be simple to turn off).
www.antlr.org /grammar/list   (0 words)

  
  Parsing expression grammar
A parsing expression grammar, or PEG, is a type of analytic formal grammar that describes a formal language in terms of a set of rules for recognizing strings in the language.
A parsing expression grammar essentially represents a recursive descent parser in a pure schematic form that only expresses syntax and is independent of the way an actual parser might be implemented or what it might be used for.
By memoizing the results of intermediate parsing steps and ensuring that each parsing function is only invoked at most once at a given input position, however, it is possible to convert any parsing expression grammar into a packrat parser, which always runs in linear time at the cost of substantially greater storage space requirements.
www.brainyencyclopedia.com /encyclopedia/p/pa/parsing_expression_grammar.html   (1429 words)

  
 peg(n): Create/change parsing expression ... - Linux man page
The start expression of a grammar is a parsing expression from which all the sentences contained in the language specified by the grammar are derived.
A parsing expression A' is now a derivation of a parsing expression A if we pick one of the nonterminals N in the expression, and one of the alternative rules R for N, and then replace the nonterminal in A with the RHS of the chosen rule.
A nonterminal symbol A is a parsing expression.
linux.die.net /man/n/peg   (2510 words)

  
 Context-free grammar Summary
Two major approaches are possible in respect of the specification of the relationship between grammars and languages--either the language must be specified formally and then a grammar constructed that generates it; or else, a grammar must be specified formally and the language that it generates must be derived analytically.
On the other hand, context-free grammars are simple enough to allow the construction of efficient parsing algorithms which, for a given string, determine whether and how it can be generated from the grammar.
For instance, given a context-free grammar, one can use the Chomsky Normal Form to construct a polynomial-time algorithm which decides whether a given string is in the language represented by that grammar or not (the CYK algorithm).
www.bookrags.com /Context-free_grammar   (1915 words)

  
 Definition of Parsing expression grammar
Parsing expression grammars look similar to regular expressions or context-free grammars in Backus-Naur form (BNF) notation, but have a different interpretation.
The parsing expression foo !(bar) matches the text "foo" but only if it is not followed by the text "bar".
The expression !(a+ b) a matches a single "a" but only if it is not the first in an arbitrarily-long sequence of a's followed by a b.
www.wordiq.com /definition/Parsing_expression_grammar   (1430 words)

  
  peg(n): Create/change parsing expression ... - Linux man page
The start expression of a grammar is a parsing expression from which all the sentences contained in the language specified by the grammar are derived.
A parsing expression A' is now a derivation of a parsing expression A if we pick one of the nonterminals N in the expression, and one of the alternative rules R for N, and then replace the nonterminal in A with the RHS of the chosen rule.
A nonterminal symbol A is a parsing expression.
www.die.net /doc/linux/man/mann/peg.n.html   (2510 words)

  
  Parsing expression grammar
A parsing expression grammar, or PEG, is a type of analytic formal grammar that describes a formal language in terms of a set of rules for recognizing strings in the language.
A parsing expression grammar essentially represents a recursive descent parser in a pure schematic form that only expresses syntax and is independent of the way an actual parser might be implemented or what it might be used for.
By memoizing the results of intermediate parsing steps and ensuring that each parsing function is only invoked at most once at a given input position, however, it is possible to convert any parsing expression grammar into a packrat parser, which always runs in linear time at the cost of substantially greater storage space requirements.
www.xasa.com /wiki/en/wikipedia/p/pa/parsing_expression_grammar_1.html   (899 words)

  
 NationMaster - Encyclopedia: Parse   (Site not responding. Last check: 2007-10-29)
Parsing used to be taught as a formal activity in schools as part of language education.
Parsing a sentence means to compute the structural description (descriptions) of the sentence assigned by a grammar, assuming, of course, that the sentence is well-formed.
Parsing is also an earlier term for diagraming of sentences in grammar of the English language, and is still used to digram the grammar of inflected languages, such as the Romance languages or Latin.
www.nationmaster.com /encyclopedia/Parse   (729 words)

  
 NationMaster - Encyclopedia: Parsing expression grammar   (Site not responding. Last check: 2007-10-29)
A parsing expression is a hierarchical expression similar to a regular expression, which is constructed in the following fashion: A nonterminal symbol is that symbol which has the capability of being further defined in terms of terminals and/or non-terminals.
Parsing is also an earlier term for the diagraming of sentences in grammar of natural language, and is still used to diagram the grammar of inflected languages, such as the Romance languages or Latin.
The choice of grammar is affected by both linguistics and computational concerns; for instance some parsing systems use lexical functional grammar, but in general, parsing for grammars of this type is known to be NP-complete.
www.nationmaster.com /encyclopedia/Parsing-expression-grammar   (3176 words)

  
 Parsing Expression Grammar - TheBestLinks.com - Context-free grammar, Formal grammar, LR parser, Regular expressions, ...   (Site not responding. Last check: 2007-10-29)
Parsing Expression Grammar, Context-free grammar, Formal grammar, LR parser...
A parsing expression grammar (PEG) is a type of formal grammar for unambiguous languages, devised by Bryan Ford.
PEGs are generally used to parse computer languages, and they are particularly suited to this purpose because of their lack of ambiguity.
www.thebestlinks.com /Parsing_Expression_Grammar.html   (939 words)

  
 Expression Grammar
In an expression language, everything that would have been a statement is defined to yield a value, and is therefore allowed to nest freely within other expressions.
The define expression is the main form for explicitly using pattern matching to define new variables.
An interval expression is used to form a region that represents all the positions between two boundaries.
www.erights.org /elang/grammar/expr.html   (2404 words)

  
 RFC 2396 (rfc2396) - Uniform Resource Identifiers (URI): Generic Syntax
Parsing a URI Reference A URI reference is typically parsed according to the four main components and fragment identifier in order to determine what components are present and whether the reference is relative or absolute.
Parsing a URI Reference with a Regular Expression As described in Section 4.3, the generic URI syntax is not sufficient to disambiguate the components of some forms of URI.
Since the "greedy algorithm" described in that section is identical to the disambiguation method used by POSIX regular expressions, it is natural and commonplace to use a regular expression for parsing the potential four components and fragment identifier of a URI reference.
www.faqs.org /rfcs/rfc2396.html   (9716 words)

  
 JavaScript 2.0   (Site not responding. Last check: 2007-10-29)
Revised the lexical and syntactic grammar and semantics.
Renamed the parser grammar to the syntactic grammar and the lexer grammar to the lexical grammar for consistency with ECMAScript Edition 3.
Revised all grammars and semantics to simplify the grammars.
www.mozilla.org /js/language/js20   (3965 words)

  
 Parsing - Qwika
Parsing In informatica, parsing it is the process to analyze a...
Parsing table A parsing table is the part of a parser...
Parsing expression grammar A parsing expression grammar, or PEG, is a type...
www.qwika.com /find/Parsing   (438 words)

  
 Crafting an interpreter Part 2 - The Calc0 Toy Language - The Code Project - C++ / MFC
We use a Parsing Expression Grammar [1] [2] to define the syntax and implement the parser.
In the PEG parsing method, there is a one to one correspondence between grammar rule and parsing function.
Parsing errors can be handled easily within the PEG framework, because the components of a PEG grammar rule are sequentially evaluated, which makes execution order predictable.
www.codeproject.com /cpp/crafting_interpreter_p2.asp   (1955 words)

  
 Crafting an interpreter Part 1 - Parsing and Grammars - The Code Project - C++ / MFC
Parsing is the first task in language processing and one of the most important ones, because it guides all the later steps of a translation system.
The PEG formalism is nothing else than a mapping of common practices in recursive descent parsing to grammars.
In LR parsing (LALR parsing to be precise) as used by YACC (the UNIX parser generator), backtracking is avoided by the internal use of a stack for symbols which wait for further processing.
www.codeproject.com /cpp/crafting_interpreter_p1.asp   (3866 words)

  
 Spartanburg SC | GoUpstate.com | Spartanburg Herald-Journal   (Site not responding. Last check: 2007-10-29)
The origins of regular expressions lies in automata theory and formal language theory, both of which are part of theoretical computer science.
Part of the effort in the design of Perl 6 is to improve Perl's regular expression integration, and to increase their scope and capabilities to allow the definition of parsing expression grammars.
Regular expressions correspond to the type 3 grammars of the Chomsky hierarchy and may be used to describe a regular language.
www.goupstate.com /apps/pbcs.dll/section?category=NEWS&template=wiki&text=regular_expression   (3019 words)

  
 [No title]
This is the essence of recursive descent parsing.
The shunting yard algorithm can be used to directly evaluate expressions as they are parsed (it is commonly used in electronic calculators for this task), to create a reverse Polish notation translation of an infix expression, or to create an abstract syntax tree.
Note that the number of calls to parse an expression consisting of a single identifier is proportional to the number of levels of precedence.
www.engr.mun.ca /~theo/Misc/exp_parsing.htm   (2605 words)

  
 ONLamp.com -- Building a Parrot Compiler
grammars are pretty standard as grammars go, and the examples you'll find in most any compiler or parsing book will work just fine.
If you've never written a grammar before, or are only familiar with LALR grammars such as the ones that yacc uses, it may seem a little odd.
In this case the grammar is for a mathematical or logical expression, with standard precedence.
www.onlamp.com /pub/a/onlamp/2004/04/15/parrot_compiler_construction.html   (1552 words)

  
 grammar::peg::interp - Grammar operations and usage   (Site not responding. Last check: 2007-10-29)
This package provides commands for the controlled matching of a character stream via a parsing expression grammar and the creation of an abstract syntax tree for the stream and partials.
It should be noted that the package provides exactly one instance of the interpreter, and interpreting a second grammar requires the user to either abort or complete a running interpretation, or to put them into different Tcl interpreters.
peg is the handle of an object containing the parsing expression grammar to interpret.
www.evolane.net /support/manuals/shared/manuals/tcltk/tcllib/peg_interp.html   (352 words)

  
 Parsing
A parser is an algorithm that determines whether a given input string is in a language and, as a side-effect, usually produces a parse tree for the input.
Recursive-descent parsing is one of the simplest parsing techniques that is used in practice.
Since recursive-descent parsing uses an implicit stack of procedure calls, it is possible to replace the parsing procedures and implicit stack with an explicit stack and a single parsing procedure that manipulates the stack.
www.cs.rochester.edu /u/nelson/courses/csc_173/grammars/parsing.html   (1765 words)

  
 Roman Redziejowski Publications
Parsing Expression Grammar as a primitive recursive-descent parser with backtracking
The PEG formalism is similar to BNF, but defines syntax in terms of recognizing strings, rather than constructing them.
Packrat parsing is a general method to handle backtracking in recursive-descent parsers.
home.swipnet.se /redz/roman/pubs.htm   (741 words)

  
 Parsing expression grammar   (Site not responding. Last check: 2007-10-29)
is a form of parser similar to a recursive descent parser in construction, except that during the parsing process it memoizes the intermediate results of all invocations of the mutually recursive parsing functions.
Because of this memoization, a packrat parser has the ability to parse many context-free grammars and any parsing expression grammar (including some that do not represent context-free languages) in linear time.
PyPy rlib parsing, a packrat parser generator for Python.
en.askmore.net /Packrat_parser.htm   (1555 words)

  
 PostgreSQL: Documentation: Manuals: PostgreSQL 8.2: The Parser Stage
The code of the actions (which is actually C code) is used to build up the parse tree.
The reason for separating raw parsing from semantic analysis is that system catalog lookups can only be done within a transaction, and we do not wish to start a transaction immediately upon receiving a query string.
The query tree created by the transformation process is structurally similar to the raw parse tree in most places, but it has many differences in detail.
www.postgresql.org /docs/8.2/static/parser-stage.html   (494 words)

  
 Parsing expression grammar - Definition, explanation
This is a PEG for mathematical formulas that use the basic four operations:
Both of these parser generators build semantic actions into the PEG syntax: after an expression, you can write a segment of code that specifies what value that expression should have.
The alternative is to have the parser output an abstract syntax tree, and then write code that processes that tree to arrive at a value.
www.calsky.com /lexikon/en/txt/p/pa/parsing_expression_grammar_1.php   (1455 words)

  
 Speech Recognition Grammar Specification Version 1.0
The grammars are intended for use by speech recognizers and other grammar processors so that developers can specify the words and patterns of words to be listened for by a speech recognizer.
Grammar authors should consider the possibility that a grammar will be used to interpret input in a non-speech recognition device.
By default a grammar is a single language document with a language identifier provided in the language declaration in the grammar header (see Section 4.5).
www.w3.org /TR/speech-grammar   (0 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.