PythonGenerator class
A PythonCodeGenerator.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildFunction(
String name, SubProductionsList productions, Map< String, Set< firsts, GivenInformation givenInformation) → StringString> > - Build all functions that are inside the syntactic analyzer
-
buildNeededImports(
StringBuffer buffer) → void - Build all imports that the generated code will need
-
buildTypeDeclarations(
StringBuffer buffer) → void - Generates a custom types needed by the generated code
-
buildVerifyTokenTypes(
Set< String> listTerminals, GivenInformation givenInformation, [bool varDeclaration = true]) → String - Build a token type verification
-
genFunctionDoc(
String name, SubProductionsList productions) → String - Generate a documentation of a function to provide help during generation analysis
-
genFunctionName(
String productionName) → String - Generate a function name in the way the language allows
-
isProduction(
String toTest) → bool -
Check whether a string represents a production
<PRODUCTION>
or notinherited -
joinSets(
Set< String> main, Set<String> secondary) → Set<String> -
Takes two Set objects and return the concatenation of both,
disregarding the empty values using the
method
AbstractAnalyzer.valueIsEmpty
inherited -
listTerminalToString(
Set< String> terminals, {String delimiter = ',', Set<String> excluded = const <String>{}}) → String -
Stringfy a list of terminals, and put it in a array form
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
replaceQuote(
String original, [int desiredCharacter = CHAR_SINGLE_QUOTE]) → String -
Takes a quoted or unquoted string and replaces the quotes with the given
desired rune.
inherited
-
sanitizeName(
String productionName, [bool allLower = true]) → String -
Sanitize a name to be in correct way to be used as an identifier
inherited
-
sanitizeTerminal(
String original) → String -
Must return a string with single quote
inherited
-
stringifyTerminal(
String original, [int quoteType = CHAR_SINGLE_QUOTE]) → String -
Converts a terminal into a string, making possible to convert
escape characters and quotes, so it will generate a valid string
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
valueIsEmpty(
String toTest) → bool -
Checks if the character has an empty value.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited