Hot Downloads
Home»backtracking parsers related tags
Search Software:Search
    backtracking parsers in tags
  • Kelbt
    Kelbt

    Kelbt generates backtracking LALR parsers. Kelbt project can generate backtracking LALR parsers. Standard LALR parser generators emit an error upon encountering a conflict in the parse tables. Kelbt forges onward, generating parsers which handle conflicts by backtracking at runtime. Kelbt is able to generate a parser for any context-free grammar and therefore implements a generalized parsing method.Kelbt is different from other backtracking LR systems in two ways. First, it elevates backtracking to the level of semantic actions by introducing a class of actions called undo actions. Undo actions are invoked as the backtracker undoes parsing and allow the user to revert any side effects of forward semantic actions. This makes it possible to backtrack over language constructs which must modify global state in preparation for handling context dependencies.Second, Kelbt enables a user-controlled parsing strategy which approximates that of generalized recursive-descent parsing. This makes it easy for the user to resolve language ambiguities by ordering the grammar productions of a nonterminal according to their precedence. It is approximate in the sense that for most grammars the equivalent of an ordered choice parsing strategy is achieved. In cases where productions are parsed out of the order given, there is a simple grammar transformation which remedies the problem. See the CASCON paper for more details.As a proof of concept, Kelbt has been used to write a partial C++ parser (included) which is composed of strictly a scanner, a name lookup stage and a grammar with standard semantic actions and semantic undo actions. What's New in This Release: [ read full changelog ] · The -I option was added for specifying include directories. · The "token uses" construct was fixed.

    Size: Download
    backtracking parsers in description
  • Rats!
    Rats!

    Rats! is an easily extensible parser generator for C-like languages. Rats! is an easily extensible parser generator for C-like languages; though currently it only generates parsers in Java. Rats! project has been explicitly designed so that grammars are concise and easily modifiable. To this end, Rats!? organizes grammars into modules,? builds on parsing expression grammars instead of context-free grammars and vintegrates lexing with parsing, i.e., is scannerless,? supports the automatic generation of abstract syntax trees,? and provides a well-defined interface for extending parsers to recognize context-sensitive languages and formats.Parsers generated by Rats! memoize intermediate results, which ensures linear time performance in the presence of unlimited lookahead and backtracking. As a result, they are essentially functional (even though they are implemented in an imperative language) and also called "packrat parsers." Here are some key features of "Rats!": · Rats! relies on a module system to structure grammars and their extensions. In particular, it relies on modules to group related productions into separate units. Next, module modifications concisely express extensions to other modules and can add, change, or remove individual alternatives in productions. Finally, module parameters are used to compose modules and their extensions with each other. · Rats!' grammars build on parsing expression grammars (PEGs). While PEGs share many constructs with the familiar EBNF notation, a key difference is that they utilize ordered choices instead of the unordered choices used by context-free grammars (CFGs) and other parser generators, such as Yacc or ANTLR. As a result, Rats! grammars avoid ambiguities and support localized changes. Additional flexibility is offered through syntactic predicates, which match expressions but do not consume the input, thus providing unlimited lookahead, and through the integration of lexing with parsing, which greatly simplifies the addition of new tokens to a grammar. PEGs have the additional benefit that they are not only closed under composition (unlike the LR or LL grammars used by Yacc and ANTLR), but also intersection and complement (unlike CFGs in general). · To eliminate the need for explicit semantic actions, Rats! can automatically generate abstract syntax trees. In particular, it supports productions that return no semantic values (such as those recognizing spaces or comments), string values (such as those recognizing literals or identifiers), and generic tree nodes (potentially all other productions). · Since some computer-readable formats are inherently context-sensitive and cannot be expressed as PEGs (or CFGs), Rats! supports two techniques for managing parser context or state, thus providing a well-defined interface for extending parsers. First, Rats! provides parser actions to recognize expressions that depend on local context, i.e., expressions that depend on immediately preceding expressions within the same production. An example for such local context is an explicit length preceding as many instances of some expression. Second, Rats! supports a global state object to recognize expressions that depend on possibly global context. State modifications are performed within lightweight transactions, which preserve the basically functional nature of Rats!-generated parsers. An example for a global context is the symbol table used for disambiguating variable and typedef names when parsing C. What's New in This Release: [ read full changelog ] · This release improves error reporting by generated parsers and fixes a code generation bug.

    Size: Download
  • Kelbt
    Kelbt

    Kelbt generates backtracking LALR parsers. Kelbt project can generate backtracking LALR parsers. Standard LALR parser generators emit an error upon encountering a conflict in the parse tables. Kelbt forges onward, generating parsers which handle conflicts by backtracking at runtime. Kelbt is able to generate a parser for any context-free grammar and therefore implements a generalized parsing method.Kelbt is different from other backtracking LR systems in two ways. First, it elevates backtracking to the level of semantic actions by introducing a class of actions called undo actions. Undo actions are invoked as the backtracker undoes parsing and allow the user to revert any side effects of forward semantic actions. This makes it possible to backtrack over language constructs which must modify global state in preparation for handling context dependencies.Second, Kelbt enables a user-controlled parsing strategy which approximates that of generalized recursive-descent parsing. This makes it easy for the user to resolve language ambiguities by ordering the grammar productions of a nonterminal according to their precedence. It is approximate in the sense that for most grammars the equivalent of an ordered choice parsing strategy is achieved. In cases where productions are parsed out of the order given, there is a simple grammar transformation which remedies the problem. See the CASCON paper for more details.As a proof of concept, Kelbt has been used to write a partial C++ parser (included) which is composed of strictly a scanner, a name lookup stage and a grammar with standard semantic actions and semantic undo actions. What's New in This Release: [ read full changelog ] · The -I option was added for specifying include directories. · The "token uses" construct was fixed.

    Size: Download
  • PyBison
    PyBison

    PyBison is a Python-based parser that operates at the speed of C. PyBison is a Python binding to the Bison (yacc) and Flex (lex) parser-generator utilities.It allows parsers to be quickly and easily developed as Python class declarations, and for these parsers to take advantage of the fast and powerful C-based Bison/Flex.Users write a subclass of a basic Parser object, containing a set of methods and attributes specifying the grammar and lexical analysis rules, and taking callbacks for providing parser input, and receiving parser target events.Presently, PyBison is only working on Linux (and possibly *BSD-based) systems. However, in time, (or if someone volunteers to help out with probably 2 hours' coding for a small shim layer) it's very possible PyBison will work on Windows as well. Here are some key features of "PyBison": · Runs at near the speed of C-based parsers, due to direct hooks into bison-generated C code · Full LALR(1) grammar support · Includes a utility to convert your legacy grammar (.y) and scanner (.l) scripts into python modules compatible with PyBison · Easy to understand - the walkthrough and the examples will have you writing your own parsers in minutes · Comfortable and intuitive callback mechanisms · Can export parse tree to XML with a simple method call (New!) · Can reconstitute a parse tree from XML (New!) Examples include working parsers for the languages: · - ANSI C · - Java (1.4.2)

    Size: Download
  • SJPT: Simple Java Parsing Toolkit
    SJPT: Simple Java Parsing Toolkit

    SJPT: Simple Java Parsing Toolkit is a simple Java parser toolkit. SJPT is parsing toolkit that supports both top-down (LL(1) and Simple Precedence) and bottom-up parsing (LR(0), SLR(1), LR(1) and LALR(1)). The toolkit also supports generating Java parsers for all the bottom-up parsing methods, based on a CUP definition (similar to Yacc and CUP, but not restricted to LALR parsers only). I worked alone on this project for the laboratory on Compilers.SJPT is free software under the terms of the GNU GPL.

    Size: Download
  • email-address-parser
    email-address-parser

    email-address-parser is a tool to parse email addresses from an outlook-like "To:" field.The nice thing about this parser is you could give it a ridiculously jacked up list of emails: no commas, no names, names and emails stuck together (no spaces), and it'll still parse that string and give you a pretty list back.To use:from eparser.parsers import email_address_parser...emails = email_address_parser.parse(some_email_list)Alternatively, you can instantiate your own with a list of additional bad tokens you want stripped from names:from eparser.parsers import EmailAddressParser parser = EmailAddressParser(bad_tokens=[";"])emails = parser.parse(some_email_list)String and Unicode representations are in the format: "Foo Bar" If there is no name, it's just the email.Product's homepage

    Size: Download

Top Freeware

Top shareware

Related Search