C# Class Microsoft.Fast.CsharpGenerator

Mostrar archivo Open project: AutomataDotNet/Automata

Public Methods

Method Description
GenerateCode ( FastPgm fpg, String namefile ) : bool

Generates C# code into the file "namefile" from a fast program

GenerateCode ( FastPgm fpg, String namefile, String ns ) : bool

Generates C# code into the file "namefile" from a fast program with the namespace "ns"

GenerateCode ( FastPgm fpg, StringBuilder sb ) : bool

Generates C# code into the file "namefile" from a fast program with the namespace "ns"

GenerateCode ( FastPgm fpg, StringBuilder sb, string ns ) : bool

Generates C# code into the file "namefile" from a fast program with the namespace "ns"

RemoveDuplicates ( ) : void

Private Methods

Method Description
ComputeIterators ( AppExp ex, String range, StringBuilder sb, bool isApplied ) : bool
ComputeIterators ( FExp ex, String range, StringBuilder sb, bool isApplied ) : bool
ComputeIterators ( Variable ex, String range, StringBuilder sb, bool isApplied ) : bool
GenerateAlphabet ( AlphabetDef def, StringBuilder sb ) : bool
GenerateAlphabets ( List defs, StringBuilder sb ) : bool
GenerateConst ( ConstDef def, StringBuilder sb ) : bool
GenerateConstructor ( StringBuilder sb, AlphabetDef aDef ) : bool
GenerateConsts ( List defs, StringBuilder sb ) : bool
GenerateDefExpr ( BuiltinLangExp expr, StringBuilder sb, string tree, int varIndex, int &nextVar ) : bool
GenerateDefExpr ( BuiltinTransExp expr, StringBuilder sb, string tree, int varIndex, int &nextVar ) : bool
GenerateEnum ( EnumDef def, StringBuilder sb ) : bool
GenerateEnums ( List defs, StringBuilder sb ) : bool
GenerateFun ( FunctionDef def, StringBuilder sb ) : bool
GenerateFuns ( List defs, StringBuilder sb ) : bool
GenerateLanguage ( LangDef def, StringBuilder sb ) : bool
GenerateLanguageDefinition ( LangDefDef def, StringBuilder sb ) : bool
GenerateLanguagesAndTransductions ( List defs, StringBuilder sb, AlphabetDef aDef ) : bool
GenerateLookahead ( List defs, StringBuilder sb, AlphabetDef aDef ) : bool
GenerateLookaheadExpr ( LangDef def, StringBuilder sb, AlphabetDef aDef ) : bool
GenerateTransduction ( TransDef def, StringBuilder sb, AlphabetDef aDef ) : bool
GenerateTransductionDefinition ( TransDefDef def, StringBuilder sb, AlphabetDef aDef ) : bool
GenerateTree ( TreeDef def, StringBuilder sb ) : bool
GenerateTreeClass ( List defs, StringBuilder sb, AlphabetDef aDef ) : bool
GenerateTreeClasses ( List defs, StringBuilder sb ) : bool
GenerateTrees ( List defs, StringBuilder sb, AlphabetDef aDef ) : bool
PrintExpr ( List children, AppExp ex, StringBuilder sb ) : bool
PrintExpr ( List children, FExp ex, StringBuilder sb ) : bool
PrintExpr ( List children, Value ex, StringBuilder sb ) : bool
PrintExpr ( List children, Variable ex, StringBuilder sb ) : bool
PrintIteration ( List children, String range, StringBuilder sb, List it ) : bool
PrintIterator ( List children, String range, StringBuilder sb, List it ) : bool
PrintIterators ( List children, String range, StringBuilder sb ) : bool
PrintOutputTree ( List children, AppExp ex, String range, StringBuilder sb, bool isapplied ) : bool
PrintOutputTree ( List children, FExp ex, String range, StringBuilder sb, bool isapplied ) : bool
PrintOutputTree ( List children, Variable ex, String range, StringBuilder sb, bool isapplied ) : bool

Method Details

GenerateCode() public static method

Generates C# code into the file "namefile" from a fast program
public static GenerateCode ( FastPgm fpg, String namefile ) : bool
fpg Microsoft.Fast.AST.FastPgm fast program
namefile String path of the output file
return bool

GenerateCode() public static method

Generates C# code into the file "namefile" from a fast program with the namespace "ns"
public static GenerateCode ( FastPgm fpg, String namefile, String ns ) : bool
fpg Microsoft.Fast.AST.FastPgm fast program
namefile String path of the output file
ns String namespace for the generated file
return bool

GenerateCode() public static method

Generates C# code into the file "namefile" from a fast program with the namespace "ns"
public static GenerateCode ( FastPgm fpg, StringBuilder sb ) : bool
fpg Microsoft.Fast.AST.FastPgm fast program
sb StringBuilder
return bool

GenerateCode() public static method

Generates C# code into the file "namefile" from a fast program with the namespace "ns"
public static GenerateCode ( FastPgm fpg, StringBuilder sb, string ns ) : bool
fpg Microsoft.Fast.AST.FastPgm fast program
sb StringBuilder
ns string namespace for the generated file
return bool

RemoveDuplicates() public static method

public static RemoveDuplicates ( ) : void
return void