19e57058d4
EBNF as input, and outputs memoizing (Packrat) PEG parsers in Python. Grako can also compile a grammar stored in a string into a Grammar object that can be used to parse any given input, much like the re module does with regular expressions. Grako is different from other PEG parser generators: * Generated parsers use Python's very efficient exception-handling system to backtrack. Grako generated parsers simply assert what must be parsed. There are no complicated if-then-else sequences for decision making or backtracking. Memoization allows going over the same input sequence several times in linear time. * Positive and negative lookaheads, and the cut element (with its cleaning of the memoization cache) allow for additional, hand-crafted optimizations at the grammar level. * Delegation to Python's re module for lexemes allows for (Perl-like) powerful and efficient lexical analysis. * The use of Python's context managers considerably reduces the size of the generated parsers for code clarity, and enhanced CPU-cache hits. * Include files, rule inheritance, and rule inclusion give Grako grammars considerable expressive power. * Automatic generation of Abstract Syntax Trees and Object Models, along with Model Walkers and Code Generators make analysis and translation approachable.
6 lines
388 B
Text
6 lines
388 B
Text
$NetBSD: distinfo,v 1.1 2017/06/01 12:04:38 adam Exp $
|
|
|
|
SHA1 (grako-3.99.9.zip) = b8751e9e40b8f51aae7316b80d2bed65e56ddbd4
|
|
RMD160 (grako-3.99.9.zip) = 151edb61fd019d98734cf959b1ea28178fce3ba8
|
|
SHA512 (grako-3.99.9.zip) = 1251a669cafc37021405f63005eab974fc1d9acab04f14ef16132411c1c36e540a3a092ae58a6ca5c3f46d3e040d2402cb287cc1fc56aa422eb5200555f29a74
|
|
Size (grako-3.99.9.zip) = 159278 bytes
|