Package EasyExtend :: Module eecompiler :: Class EECompiler
[hide private]
[frames] | no frames]

Class EECompiler



     object --+    
              |    
eecommon.EEShow --+
                  |
                 EECompiler

Instance Methods [hide private]
 
__init__(self, fiber)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
createGrammarObject(self, PyGrammar)
Function used to create ext-language specific grammarObjects that contain dfa parser tables.
 
mapSymbols(self, grammarObj)
A new language specific symbol.py file will be created.
 
eetransform(self, cst, **kwd)
 
eeparse_file(self, filename)
 
eeparse_source(self, source, start_symbol)
 
eeparse_expr(self, source)
 
eeparse_suite(self, source)
 
eecompile_cst(self, node, **kwd)
 
eecompile_suite(self, source, **kwd)
 
eecompile_expr(self, source, **kwd)
 
try_compile(self, cst, **kwd)
 
eecompile_file(self, filename, **kwd)
Compile file according to a specific extension language into a Python module.

Inherited from eecommon.EEShow: maybe_show_cst_after, maybe_show_cst_before, maybe_show_python, maybe_show_token

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, fiber)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

createGrammarObject(self, PyGrammar)

 
Function used to create ext-language specific grammarObjects that contain dfa parser tables. These grammar objects will be created using lifted nodes of the the used fibers.
Parameters:
  • PyGrammar - PyGrammar module that contains a grammarObj. If the object is not present it will be created using the languages Grammar file.

Note: The grammarObj will be replaced by a newer version if the Grammar file is more recent than the PyGrammar.py module.

eeparse_file(self, filename)

 
Parameters:
  • filename - file to be parsed.
  • grammarObj - language specific grammarObj read from PyGrammar.py

eecompile_suite(self, source, **kwd)

 
Parameters:
  • source - source in string form
  • grammarObj - language specific grammarObj read from PyGrammar.py
  • fiber - module object containing language definitions

eecompile_expr(self, source, **kwd)

 
Parameters:
  • source - source in string form
  • grammarObj - language specific grammarObj read from PyGrammar.py
  • fiber - module object containing language definitions

eecompile_file(self, filename, **kwd)

 
Compile file according to a specific extension language into a Python module.
Parameters:
  • filename - path to the destination file that will be compiled
  • grammarObj - language specific grammarObj read from PyGrammar.py
  • fiber (Python module object) - Python module defining the fiber semantics and transformation rules.