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

Topic: Recursive descent parser


Related Topics
562

In the News (Thu 12 Nov 09)

  
  Recursive descent parser - Definition, explanation
A recursive descent parser is a top-down parser built from a set of mutually-recursive procedures or a non-recursive equivalent where each such procedure usually implements one of the production rules of the grammar.
The running time of a recursive descent parser is exponential, although there is a modification to the algorithm called a packrat parser, which trades memory for linear time.
Recursive descent parsers are used less often in practice than LR or LALR parsers because of their lack of speed.
www.calsky.com /lexikon/en/txt/r/re/recursive_descent_parser.php   (0 words)

  
  Recursive descent parser Summary
A recursive descent parser is a top-down parser built from a set of mutually-recursive procedures (or a non-recursive equivalent) where each such procedure usually implements one of the production rules of the grammar.
Recursive descent with backup is not limited to LL(k) grammars, but is not guaranteed to terminate unless the grammar is LL(k).
A packrat parser is a modification of recursive descent with backup that avoids nontermination by remembering its choices, so as not to make exactly the same choice twice.
www.bookrags.com /Recursive_descent_parser   (1052 words)

  
 CS 5363 -- Recursive Descent Parser
Overview: A recursive descent parser is a top-down parser, so called because it effectively builds a parse tree from the top (the start symbol) down, and from left to right.
This parser uses a recursive function corresponding to each grammar rule (that is, corresponding to each non-terminal symbol in the language).
Perhaps the hardest part of a recursive descent parser is the scanning: repeatedly fetching the next token from the scanner.
www.cs.utsa.edu /~wagner/CS5363/rdparse.html   (0 words)

  
 recursive, predictive, factor, backup, accept, return, getsym, Recursive, recursion, packrat, expect, block, Symbol - ...
Recursive descent with backup is a technique that determines which production to use by trying each production in turn.
Recursive descent with backup is not limited to LL(k) grammars, but is not guaranteed to terminate unless the grammar is LL(k).
A packrat parser is a modification of recursive descent with backup that avoids nontermination by remembering its choices, so as not to make exactly the same choice twice.
www.alphasearch.org /Recursive-descent-parser.html   (673 words)

  
 Creating a Recursive-Descent Parser
A parser is a program that given a sentence in its language, will construct a derivation of that sentence to check it for syntactic correctness.
Although parsers can be generated by parser generators, it is still sometimes convenient to write a parser by hand.
An LALR(1) grammar is not appropriate for constructing a recursive descent parser.
www.cs.luther.edu /~leekent/tutorials/ll1.html   (0 words)

  
 LL(1) Parsers
The method is called recursive descent because the parser is implemented as a set of mutually recursive parsing routines, and because it is a top-down method.
Recursive descent parsers have the disadvantage that code has to be written specifically tailored to each LL(1) grammar.
The parser, once written, becomes the foundation of the whole compiler, and the scope analyser, type analyser, and code generator are all relatively easily integrated into the parser.
www.mcs.csuhayward.edu /~simon/handouts/4110/notes/ll1.html   (3158 words)

  
 [No title]
Recursive descent parser generated from the attributed grammar Taste.ATG.
If you want to knock together a grammar-only parser for a specialized scripting language and you know you are up to the challenge of the cutting-edge technology of Meta-S, it may be the right tool.
This is a top-down process in which the parser attempts to verify that the syntax of the input stream is correct as it is read from left to right.
www.lycos.com /info/recursive-descent-parser--grammars.html   (348 words)

  
 compilers.net > directory > parser generators
Happy is a parser generator system for Haskell, similar to the tool `yacc' for C. Like `yacc', it takes a file containing an annotated BNF specification of a grammar and produces a Haskell module containing a parser for the grammar.
Parser objects are composed through operator overloading and the result is a backtracking LL(inf) parser that is capable of parsing rather ambiguous grammars.
GRDP is a new style of parser generator that allows you to protoype new languages without regard to the underlying parsing technology.
www.compilers.net /Dir/ParserGens.htm   (1219 words)

  
 Terence Parr Introduces ANTLR 3.0
A recursive-descent strategy follows a set of mutually recursive methods to implement a parser.] The lexers were a bit slow in ANTLR version 2, and in some sense the linear approximate lookahead strategy used there was a little weak.
The parser implementation I use, and that you would build by hand, is called recursive descent: You create a series of mutually recursive functions that apply grammatical structure.
The recursive descent parser is a direct translation, a one-to-one mapping, from a grammar to an implementation.
www.artima.com /lejava/articles/antlr_3.html   (0 words)

  
 Preface
This made me wish for a tool similar to big-time parser generators such as YACC and ANTLR, where a parser is built automatically from a grammar specification.
Dynamic-spirit needed a parser to implement itself anyway.
The original employed a hand-coded recursive-descent parser to parse the input grammar specification strings.
www.boost.org /libs/spirit/doc/preface.html   (875 words)

  
 ANTLR-centric Language Glossary
LL(k) is synonymous with a "top-down" parser because the parser begins at the start symbol and works its way down the derivation/parse tree (tree here means the stack of method activations for recursive descent or symbol stack for a table-driven parser).
A recursive-descent parser is particular implementation of an LL parser that uses functions or method calls to implement the parser rather than a table.
In a parser, this is the nth lookahead Token object.
www.antlr.org /doc/glossary.html   (2508 words)

  
 [No title]   (Site not responding. Last check: )
In recursive descent parsers and translators it is essential that each parsing procedure can see any other parsing procedures that it needs to call.
To create the recursive descent parser, each nonterminal in the grammar should be turned into a method.
A recursive descent parser had to be written to translate the source program into a tree structure.
www.lycos.com /info/recursive-descent-parser.html   (449 words)

  
 YARD (Yet Another Recursive Descent Parser)
The YARD parser is an open-source library for constructing high-performance recursive-descent parsers in C++ at compile-time using a syntax approximating EBNF (Extended Backus-Naur Form).
The Biscuit Parser Library - Biscuit is an object-oriented recursive-descent parser generator framework implemented using class templates.
Boost Spirit - Spirit is an object oriented recursive descent parser framework implemented using template meta-programming techniques and is part of Boost.
www.ootl.org /yard   (0 words)

  
 RECURSIVE DESCENT PARSER - Definition
A "top-down" parser built from a set of mutually-recursive procedures or a non-recursive equivalent where each such procedure usually implements one of the productions of the grammar.
Thus the structure of the resulting program closely mirrors that of the grammar it recognises.
["Recursive Programming Techniques", W.H. Burge, 1975, ISBN 0-201-14450-6].
www.hyperdictionary.com /dictionary/recursive+descent+parser   (0 words)

  
 Weblogs Forum - Yet Another Recursive Descent Parser for C++
The YARD parser is a simple regular expression parsing toolset which can operate on generic data.
The YARD parser is a very simple regular expression pattern matcher which can match regular expression in arbitrary data.
The YARD parser is designed as a simpler alternative to external tools like Bison and Flex, and is even simpler to use than the Boost Spirit Library.
www.artima.com /forums/flat.jsp?forum=106&thread=84781   (0 words)

  
 ONLamp.com -- Building Recursive Descent Parsers with Python
Software parsers are usually special-purpose programs, built to process a specific form of text.
This text could be a set of encoded notations on insurance or medical forms; function declarations in a C header file; node-edge descriptions showing interconnections of a graph; HTML tags in a web page; or interactive commands to configure a network, modify or rotate a 3D image, or navigate through an adventure game.
A common technique is to develop a recursive-descent parser, one that defines functions that read individual terminal constructs of the grammar, and then higher-level functions that call the lower-level functions.
www.onlamp.com /pub/a/python/2006/01/26/pyparsing.html   (518 words)

  
 Recursive Descent Parser   (Site not responding. Last check: )
A recursive descent parser is a top-down parser which basically has a function for every nonterminal.
Recursive descent parsers are easy to implement, but they are limited in the languages they can handle.
For example, parsing ordinary arithmetic expressions requires more work from a recursive descent parser; CompilersPrinciplesTechniquesAndTools describes a way to refactor the grammar to accommodate them, but there are other ways.
c2.com /cgi/wiki?RecursiveDescentParser   (373 words)

  
 General Business Portal
IParse - An interpretting parser, meaning that it accept on the input a grammar and a source file which should be parsed according to that grammar, and produces an abstract program tree from this.
LRgen Lexer and Parser Generator from Parsetec - LRgen is an LALR parser generator and LALR lexer generator, featuring TBNF grammar notation and LALR lexers for parser and compiler development.
The RDP parser generator - A parser generator which compiles attributed LL(1) grammars decorated with C semantic actions into recursive descent compilers.
www.brint.com /cgi-bin/links/links.pl?passurl=/Computers/Programming/Compilers/Lexer_and_Parser_Generators   (1791 words)

  
 Recursive-Descent Parser Generator   (Site not responding. Last check: )
Given a context-free grammar, a recursive-descent parser can be constructed in a few easy steps: (1) convert the grammar from BNF to EBNF; (2) check that the EBNF grammar is suitable; (3) transcribe the EBNF grammar into parsing procedures.
The goal of this project is to build a parser generator that provides such assistance.
In step 1 the parser generator should assist the user by responding to instructions such as "left-factorise production rules 21 and 22" or "eliminate left recursion in production rules 13 and 14".
www.dcs.gla.ac.uk /~daw/teaching/projects/parser-generator.html   (138 words)

  
 Dr. Dobb's | Recursive Descent, Tail Recursion, & the Dreaded Double Divide | November 24, 2005   (Site not responding. Last check: )
doesn't work because the parser gets stuck in an infinite recursive loop (a term is a term is a term is a term is a term...) and doesn't stop until it runs out of stack space.
The test program uses parsing objects to make comparing the results of the formula evaluation easier, but the recursive descent is performed by the methods of the parsing object in the same manner just described.
One of the nice things about recursive descent is the way the functional expression closely follows the BNF rules for the language.
www.ddj.com /dept/debug/184406384   (1390 words)

  
 Open Directory - Computers: Programming: Compilers: Lexer and Parser Generators
IParse - An interpretting parser, meaning that it accept on the input a grammar and a source file which should be parsed according to that grammar, and produces an abstract program tree from this.
PCCTS is an LL(k) recursive descent parser generator with semantic predicates and backtracking.
The RDP parser generator - A parser generator which compiles attributed LL(1) grammars decorated with C semantic actions into recursive descent compilers.
dmoz.org /Computers/Programming/Compilers/Lexer_and_Parser_Generators   (1732 words)

  
 The Spirit recursive descent parser compiler
Left recursion is not suitable with recursive parsers in general.
The hierarchical composition of objects as opposed to the hierarchical composition of functions defines the top-down structure of the parser.
The scanner is a simple yet integral part of the parser and works in conjunction with the parser and is not a separate program.
spirit.sourceforge.net /dl_docs/pre-spirit.htm   (2313 words)

  
 Parser   (Site not responding. Last check: )
A parser converts an expression based on a grammar to an object that can be executed as a computer program.
A recursive descent parser produces a tree object for expressions derived from a recursive grammar.
The method of recursive descent based on walking through a tree is especially powerful for evaluating algebraic expressions because expressions can be infinitely nested (as far as we have the resources to encode and walk the tree).
www.spss.com /research/wilkinson/Applets/parser.html   (516 words)

  
 cs375 p. 82   (Site not responding. Last check: )
A parser for some context-free languages can be written using the technique of recursive descent.
Recursive descent works well for a well-structured language such as Pascal.
It may be necessary to restructure a grammar to avoid left recursion, which can cause a recursive descent parser to go into a loop.
www.cs.utexas.edu /~novak/cs37582.html   (123 words)

  
 A new implementation of recursive-descent parsing? | Lambda the Ultimate
It is well known that the classic way to model a recursive-descent parser is to write (or automatically produce) a set of mutually-recursive functions either by writing procedures or combining parser modules using a DSL (like in Boost::Spirit) or using templates/generics (for those languages that support such a concept).
In the success/failure continuation backtracking parser, you have to indicate to the trampoline loop whether it is calling a success or failure continuation next, because they have different types.
It means that the parser would execute 'r2', which invokes 'r1' to try to execute rule 'a', then hit the [fail] in 'r2', backtrack (and rebuild the stack) to 'r1' and execute rule 'b', and finally hit the final failure.
lambda-the-ultimate.org /node/1599   (8022 words)

  
 ICS 142 Winter 2004, Assignment #2
Remember that the primary job of the parser is twofold: verifying that the input program is syntactically correct and, in the case of a correct program, beginning to discern the meaning of the input program by discovering a parse tree for it.
A recursive descent parser is a parser that is constructed from a set of mutually recursive functions, each of which corresponds to one nonterminal symbol in a grammar.
Your parser is not required to (and should not) build a parse tree or any intermediate representation of the program; output should be generated on the fly as statements are recognized.
www.ics.uci.edu /~thornton/ics142/LabManual/Assignment2   (2453 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.