Name : python3-pygmars
| |
Version : 0.8.0
| Vendor : Fedora Project
|
Release : 5.fc41
| Date : 2024-07-20 04:47:57
|
Group : Unspecified
| Source RPM : python-pygmars-0.8.0-5.fc41.src.rpm
|
Size : 0.14 MB
| |
Packager : Fedora Project
| |
Summary : Craft simple regex-based small language lexers and parser
|
Description :
pygmars is a simple lexing and parsing library designed to craft lightweight lexers and parsers using regular expressions.
pygmars allows you to craft simple lexers that recognizes words based on regular expressions and identify sequences of words using lightweight grammars to obtain a parse tree.
The lexing task transforms a sequence of words or strings (e.g. already split in words) in a sequence of Token objects, assigning a label to each word and tracking their position and line number.
In particular, the lexing output is designed to be compatible with the output of Pygments lexers. It becomes possible to build simple grammars on top of existing Pygments lexers to perform lightweight parsing of the many (130+) programming languages supported by Pygments.
The parsing task transforms a sequence of Tokens in a parse Tree where each node in the tree is recognized and assigned a label. Parsing is using regular expression-based grammar rules applied to recognize Token sequences.
These rules are evaluated sequentially and not recursively: this keeps things simple and works very well in practice. This approach and the rules syntax has been battle-tested with NLTK from which pygmars is derived.
|
RPM found in directory: /vol/rzm3/linux-fedora-buffet/fedora-secondary/development/rawhide/Everything/s390x/os/Packages/p |