App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Classes | Functions | Variables
google.appengine._internal.antlr3.dfa Namespace Reference

Classes

class  DFA
 

Functions

def unpack
 def specialTransition(self, state, symbol): return 0 More...
 

Variables

tuple unpack = classmethod(unpack)
 

Detailed Description

ANTLR3 runtime package

Function Documentation

def google.appengine._internal.antlr3.dfa.unpack (   cls,
  string 
)

def specialTransition(self, state, symbol): return 0

@brief Unpack the runlength encoded table data.

Terence implemented packed table initializers, because Java has a
size restriction on .class files and the lookup tables can grow
pretty large. The generated JavaLexer.java of the Java.g example
would be about 15MB with uncompressed array initializers.

Python does not have any size restrictions, but the compilation of
such large source files seems to be pretty memory hungry. The memory
consumption of the python process grew to >1.5GB when importing a
15MB lexer, eating all my swap space and I was to impacient to see,
if it could finish at all. With packed initializers that are unpacked
at import time of the lexer module, everything works like a charm.