Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Protected Member Functions | List of all members
parsimonious.grammar.TokenGrammar Class Reference
Inheritance diagram for parsimonious.grammar.TokenGrammar:
Inheritance graph
[legend]
Collaboration diagram for parsimonious.grammar.TokenGrammar:
Collaboration graph
[legend]

Protected Member Functions

 _expressions_from_rules (self, rules, custom_rules)
 
- Protected Member Functions inherited from parsimonious.grammar.Grammar
 _copy (self)
 
 _check_default_rule (self)
 

Additional Inherited Members

- Public Member Functions inherited from parsimonious.grammar.Grammar
 __init__ (self, rules='', **more_rules)
 
 default (self, rule_name)
 
 parse (self, text, pos=0)
 
 match (self, text, pos=0)
 
 __str__ (self)
 
 __repr__ (self)
 
- Public Attributes inherited from parsimonious.grammar.Grammar
 default_rule
 

Detailed Description

A Grammar which takes a list of pre-lexed tokens instead of text

This is useful if you want to do the lexing yourself, as a separate pass:
for example, to implement indentation-based languages.

Member Function Documentation

◆ _expressions_from_rules()

parsimonious.grammar.TokenGrammar._expressions_from_rules (   self,
  rules,
  custom_rules 
)
protected
Return a 2-tuple: a dict of rule names pointing to their
expressions, and then the first rule.

It's a web of expressions, all referencing each other. Typically,
there's a single root to the web of references, and that root is the
starting symbol for parsing, but there's nothing saying you can't have
multiple roots.

:arg custom_rules: A map of rule names to custom-coded rules:
    Expressions

Reimplemented from parsimonious.grammar.Grammar.


The documentation for this class was generated from the following file: