PyFoam.Basics.PlyParser module

Base class for all parser classes based on PLY

Most of this class was shamelessly stolen from the examples

class PyFoam.Basics.PlyParser.PlyParser(**kw)[source]

Bases: object

Base class for a lexer/parser that has the rules defined as methods

__dict__ = mappingproxy({'__module__': 'PyFoam.Basics.PlyParser', '__doc__': '\n Base class for a lexer/parser that has the rules defined as methods\n ', 'tokens': (), 'precedence': (), '__init__': <function PlyParser.__init__>, 'parse': <function PlyParser.parse>, '__dict__': <attribute '__dict__' of 'PlyParser' objects>, '__weakref__': <attribute '__weakref__' of 'PlyParser' objects>})
__init__(**kw)[source]

Constructs the parser and the lexer

__module__ = 'PyFoam.Basics.PlyParser'
__weakref__

list of weak references to the object (if defined)

parse(content)[source]

Do the actual parsing :param content: String that is to be parsed :return: Result of the parsing

precedence = ()
tokens = ()