C# Class Antlr4.AntlrTool

Datei anzeigen Open project: sharwell/antlr4cs Class Usage Examples

Public Properties

Property Type Description
ALL_GRAMMAR_EXTENSIONS IList
GRAMMAR_EXTENSION string
LEGACY_GRAMMAR_EXTENSION string
ST_inspector_wait_for_close bool
VERSION string
args string[]
errMgr Antlr4.Tool.ErrorManager
force_atn bool
genPackage string
gen_dependencies bool
gen_listener bool
gen_visitor bool
generate_ATN_dot bool
grammarEncoding string
grammarOptions string>.IDictionary
inputDirectory string
internalOption_PrintGrammarTree bool
internalOption_ShowATNConfigsInDFA bool
launch_ST_inspector bool
libDirectory string
log bool
logMgr Antlr4.Misc.LogManager
longMessages bool
msgFormat string
optionDefs Option[]
outputDirectory string
warnings_are_errors bool

Protected Properties

Property Type Description
grammarFiles IList
haveOutputDir bool
return_dont_exit bool

Public Methods

Method Description
AddListener ( ANTLRToolListener tl ) : void
AntlrTool ( string args ) : System.Collections.Generic
CheckForRuleIssues ( Grammar g ) : bool
CreateGrammar ( GrammarRootAST ast ) : Grammar
Error ( ANTLRMessage msg ) : void
FindOptionValueAST ( GrammarRootAST root, string option ) : GrammarAST
GenerateATNs ( Grammar g ) : void
GetImportedGrammarFile ( Grammar g, string fileName ) : string
GetListeners ( ) : IList
GetNumErrors ( ) : int
GetOutputDirectory ( string fileNameWithPath ) : string
GetOutputFileWriter ( Grammar g, string fileName ) : System.IO.TextWriter
Help ( ) : void
Info ( string msg ) : void
LoadGrammar ( string fileName ) : Grammar
LoadImportedGrammar ( Grammar g, GrammarAST nameNode ) : Grammar
Log ( [ component, string msg ) : void
Log ( string msg ) : void
Main ( string args ) : int
Panic ( ) : void
Parse ( string fileName, Antlr.Runtime.ICharStream @in ) : GrammarRootAST
ParseGrammar ( string fileName ) : GrammarRootAST
ParseGrammarFromString ( string grammar ) : GrammarRootAST
Process ( Grammar g, bool gencode ) : void
ProcessGrammarsOnCommandLine ( ) : void
ProcessNonCombinedGrammar ( Grammar g, bool gencode ) : void
RemoveListener ( ANTLRToolListener tl ) : void
RemoveListeners ( ) : void
SortGrammarByTokenVocab ( IList fileNames ) : IList
Version ( ) : void
Warning ( ANTLRMessage msg ) : void

Protected Methods

Method Description
HandleArgs ( ) : void
HandleOptionSetArg ( string arg ) : void
WriteDOTFile ( Grammar g, Rule r, string dot ) : void
WriteDOTFile ( Grammar g, string name, string dot ) : void

Private Methods

Method Description
AntlrTool ( ) : System.Collections.Generic
GetField ( System.Type type, string name ) : FieldInfo

Method Details

AddListener() public method

public AddListener ( ANTLRToolListener tl ) : void
tl ANTLRToolListener
return void

AntlrTool() public method

public AntlrTool ( string args ) : System.Collections.Generic
args string
return System.Collections.Generic

CheckForRuleIssues() public method

public CheckForRuleIssues ( Grammar g ) : bool
g Antlr4.Tool.Grammar
return bool

CreateGrammar() public method

public CreateGrammar ( GrammarRootAST ast ) : Grammar
ast Antlr4.Tool.Ast.GrammarRootAST
return Antlr4.Tool.Grammar

Error() public method

public Error ( ANTLRMessage msg ) : void
msg Antlr4.Tool.ANTLRMessage
return void

FindOptionValueAST() public static method

public static FindOptionValueAST ( GrammarRootAST root, string option ) : GrammarAST
root Antlr4.Tool.Ast.GrammarRootAST
option string
return Antlr4.Tool.Ast.GrammarAST

GenerateATNs() public method

public GenerateATNs ( Grammar g ) : void
g Antlr4.Tool.Grammar
return void

GetImportedGrammarFile() public method

public GetImportedGrammarFile ( Grammar g, string fileName ) : string
g Antlr4.Tool.Grammar
fileName string
return string

GetListeners() public method

public GetListeners ( ) : IList
return IList

GetNumErrors() public method

public GetNumErrors ( ) : int
return int

GetOutputDirectory() public method

public GetOutputDirectory ( string fileNameWithPath ) : string
fileNameWithPath string
return string

GetOutputFileWriter() public method

public GetOutputFileWriter ( Grammar g, string fileName ) : System.IO.TextWriter
g Antlr4.Tool.Grammar
fileName string
return System.IO.TextWriter

HandleArgs() protected method

protected HandleArgs ( ) : void
return void

HandleOptionSetArg() protected method

protected HandleOptionSetArg ( string arg ) : void
arg string
return void

Help() public method

public Help ( ) : void
return void

Info() public method

public Info ( string msg ) : void
msg string
return void

LoadGrammar() public method

public LoadGrammar ( string fileName ) : Grammar
fileName string
return Antlr4.Tool.Grammar

LoadImportedGrammar() public method

public LoadImportedGrammar ( Grammar g, GrammarAST nameNode ) : Grammar
g Antlr4.Tool.Grammar
nameNode Antlr4.Tool.Ast.GrammarAST
return Antlr4.Tool.Grammar

Log() public method

public Log ( [ component, string msg ) : void
component [
msg string
return void

Log() public method

public Log ( string msg ) : void
msg string
return void

Main() public static method

public static Main ( string args ) : int
args string
return int

Panic() public method

public Panic ( ) : void
return void

Parse() public method

public Parse ( string fileName, Antlr.Runtime.ICharStream @in ) : GrammarRootAST
fileName string
@in Antlr.Runtime.ICharStream
return Antlr4.Tool.Ast.GrammarRootAST

ParseGrammar() public method

public ParseGrammar ( string fileName ) : GrammarRootAST
fileName string
return Antlr4.Tool.Ast.GrammarRootAST

ParseGrammarFromString() public method

public ParseGrammarFromString ( string grammar ) : GrammarRootAST
grammar string
return Antlr4.Tool.Ast.GrammarRootAST

Process() public method

public Process ( Grammar g, bool gencode ) : void
g Antlr4.Tool.Grammar
gencode bool
return void

ProcessGrammarsOnCommandLine() public method

public ProcessGrammarsOnCommandLine ( ) : void
return void

ProcessNonCombinedGrammar() public method

public ProcessNonCombinedGrammar ( Grammar g, bool gencode ) : void
g Antlr4.Tool.Grammar
gencode bool
return void

RemoveListener() public method

public RemoveListener ( ANTLRToolListener tl ) : void
tl ANTLRToolListener
return void

RemoveListeners() public method

public RemoveListeners ( ) : void
return void

SortGrammarByTokenVocab() public method

public SortGrammarByTokenVocab ( IList fileNames ) : IList
fileNames IList
return IList

Version() public method

public Version ( ) : void
return void

Warning() public method

public Warning ( ANTLRMessage msg ) : void
msg Antlr4.Tool.ANTLRMessage
return void

WriteDOTFile() protected method

protected WriteDOTFile ( Grammar g, Rule r, string dot ) : void
g Antlr4.Tool.Grammar
r Antlr4.Tool.Rule
dot string
return void

WriteDOTFile() protected method

protected WriteDOTFile ( Grammar g, string name, string dot ) : void
g Antlr4.Tool.Grammar
name string
dot string
return void

Property Details

ALL_GRAMMAR_EXTENSIONS public_oe static_oe property

public static IList ALL_GRAMMAR_EXTENSIONS
return IList

GRAMMAR_EXTENSION public_oe static_oe property

public static string GRAMMAR_EXTENSION
return string

LEGACY_GRAMMAR_EXTENSION public_oe static_oe property

public static string LEGACY_GRAMMAR_EXTENSION
return string

ST_inspector_wait_for_close public_oe property

public bool ST_inspector_wait_for_close
return bool

VERSION public_oe static_oe property

public static string VERSION
return string

args public_oe property

public string[] args
return string[]

errMgr public_oe property

public ErrorManager,Antlr4.Tool errMgr
return Antlr4.Tool.ErrorManager

force_atn public_oe property

public bool force_atn
return bool

genPackage public_oe property

public string genPackage
return string

gen_dependencies public_oe property

public bool gen_dependencies
return bool

gen_listener public_oe property

public bool gen_listener
return bool

gen_visitor public_oe property

public bool gen_visitor
return bool

generate_ATN_dot public_oe property

public bool generate_ATN_dot
return bool

grammarEncoding public_oe property

public string grammarEncoding
return string

grammarFiles protected_oe property

protected IList grammarFiles
return IList

grammarOptions public_oe property

public IDictionary grammarOptions
return string>.IDictionary

haveOutputDir protected_oe property

protected bool haveOutputDir
return bool

inputDirectory public_oe property

public string inputDirectory
return string

internalOption_PrintGrammarTree public_oe static_oe property

public static bool internalOption_PrintGrammarTree
return bool

internalOption_ShowATNConfigsInDFA public_oe static_oe property

public static bool internalOption_ShowATNConfigsInDFA
return bool

launch_ST_inspector public_oe property

public bool launch_ST_inspector
return bool

libDirectory public_oe property

public string libDirectory
return string

log public_oe property

public bool log
return bool

logMgr public_oe property

public LogManager,Antlr4.Misc logMgr
return Antlr4.Misc.LogManager

longMessages public_oe property

public bool longMessages
return bool

msgFormat public_oe property

public string msgFormat
return string

optionDefs public_oe static_oe property

public static Option[] optionDefs
return Option[]

outputDirectory public_oe property

public string outputDirectory
return string

return_dont_exit protected_oe property

protected bool return_dont_exit
return bool

warnings_are_errors public_oe property

public bool warnings_are_errors
return bool