HFST - Helsinki Finite-State Transducer Technology - Python API  version 3.11.0
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | List of all members
XreCompiler Class Reference

A compiler holding information needed to compile XREs. More...

Public Member Functions

def __init__
 Construct compiler for unknown format transducers. More...
 
def __init__
 Create compiler for impl format transducers. More...
 
def compile
 Compile a transducer defined by xre. More...
 
def define_function
 todo More...
 
def define_list
 todo More...
 
def define_transducer
 Add a definition macro. More...
 
def define_xre
 Add a definition macro. More...
 
def getOutputToConsole
 (Windows-specific) Whether output is printed to console instead of standard output. More...
 
def is_definition
 Whether name is a definition. More...
 
def is_function_definition
 Whether name is a function definition. More...
 
def set_expand_definitions
 Whether definitions are expanded. More...
 
def set_verbosity
 Set the verbosity of the compiler. More...
 
def setOutputToConsole
 (Windows-specific) Whether output is printed to console instead of standard output. More...
 
def undefine
 todo More...
 

Detailed Description

A compiler holding information needed to compile XREs.

Constructor & Destructor Documentation

def __init__ (   self)

Construct compiler for unknown format transducers.

def __init__ (   self,
  impl 
)

Create compiler for impl format transducers.

Member Function Documentation

def compile (   xre)

Compile a transducer defined by xre.

May return a pointer to empty transducer on non-fatal error. A None pointer is returned on fatal error, if abort is not called.

Returns
An HfstTransducer pointer.
def define_function (   name,
  arguments,
  xre 
)

todo

def define_list (   name,
  symbol_list 
)

todo

def define_transducer (   name,
  transducer 
)

Add a definition macro.

Compilers will replace arcs labeled name, with a transducer transducer in later phases of compilation.

def define_xre (   name,
  xre 
)

Add a definition macro.

Compilers will replace arcs labeled name, with a transducer defined by regular expression xre in later phases of compilation.

def getOutputToConsole ( )

(Windows-specific) Whether output is printed to console instead of standard output.

def is_definition (   name)

Whether name is a definition.

def is_function_definition (   name)

Whether name is a function definition.

def set_expand_definitions (   v)

Whether definitions are expanded.

  • v True or False
def set_verbosity (   v)

Set the verbosity of the compiler.

  • v True or False
def setOutputToConsole (   v)

(Windows-specific) Whether output is printed to console instead of standard output.

  • v True or False
def undefine (   name)

todo


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