Package gavo :: Package base :: Module unitconv :: Class getUnitGrammar
[frames] | no frames]

Class getUnitGrammar

source code

                     object --+    
                              |    
utils.codetricks.CachedResource --+
                                  |
                                 getUnitGrammar

the grammar to parse VOUnits.

After initialization, the class has a "symbols" dictionary containing the individual nonterminals.

Instance Methods

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods
 
impl(cls) source code
 
enableDebuggingOutput(cls)
(not user-servicable)
source code

Inherited from utils.codetricks.CachedResource: __new__

Class Variables
  cache = unit expression
hash(x)
  symbols = {'CLOSE_P': ")", 'FLOAT': Re:('[+-]?([0-9]+(\\.[0-9]...
Properties

Inherited from object: __class__

Class Variable Details

symbols

Value:
{'CLOSE_P': ")",
 'FLOAT': Re:('[+-]?([0-9]+(\\.[0-9]*)?)'),
 'FUNCTION_NAME': W:(ABCD...),
 'Forward': <class 'pyparsing.Forward'>,
 'Literal': <class 'pyparsing.Literal'>,
 'OPEN_P': "(",
 'Optional': <class 'pyparsing.Optional'>,
 'Regex': <class 'pyparsing.Regex'>,
...