NTP Analyzer
0.8.2
Analyze the operation of time servers
|
The config parser transforms configuration texts into a syntax tree. More...
Public Member Functions | |
ConfigParser (string file, ISyntaxNode root) | |
Initializes a new instance of the ConfigParser class. More... | |
void | Dispose () |
void | Execute () |
Execute the parser stage. More... | |
Public Attributes | |
IEnumerable< string > | Errors => errors |
Gets the errors from parsing. More... | |
Properties | |
SymbolTable | SymbolTable [get, set] |
Gets or sets the symbol table. More... | |
Properties inherited from Ntp.Analyzer.Config.Compiler.ICompilerStage | |
IEnumerable< string > | Errors [get] |
Gets the errors from this stage. More... | |
SymbolTable | SymbolTable [get, set] |
Gets or sets the symbol table. More... | |
Private Attributes | |
readonly List< string > | errors |
readonly ISyntaxNode | root |
readonly Tokenizer | tokenizer |
The config parser transforms configuration texts into a syntax tree.
Definition at line 35 of file ConfigParser.cs.
|
inline |
Initializes a new instance of the ConfigParser class.
file | Configuration file. |
root | Syntax root node. |
Definition at line 42 of file ConfigParser.cs.
|
inlineprivate |
Definition at line 120 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Table.SymbolTable.Add(), and Ntp.Analyzer.Config.Table.SymbolTable.Lookup().
|
inline |
Definition at line 115 of file ConfigParser.cs.
|
inline |
Execute the parser stage.
Implements Ntp.Analyzer.Config.Compiler.ICompilerStage.
Definition at line 68 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Table.Token.EndOfFile.
|
inlineprivate |
Definition at line 134 of file ConfigParser.cs.
|
inlineprivate |
Definition at line 140 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 185 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add(), Ntp.Analyzer.Config.Table.Keyword.Content, and Ntp.Analyzer.Config.Table.Token.Text.
|
inlineprivate |
Definition at line 203 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 260 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Table.Token.NewLine.
|
inlineprivate |
Definition at line 270 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 295 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 314 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add(), and Ntp.Analyzer.Config.Syntax.ISyntaxNode.Symbol.
|
inlineprivate |
Definition at line 340 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 359 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Parses a host graph configuration section.
parent | Parent node. |
Definition at line 396 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Parses a host page configuration section.
parent | Parent node. |
Definition at line 450 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 506 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 586 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add(), and Ntp.Analyzer.Config.Table.IntegerToken.Text.
|
inlineprivate |
Definition at line 607 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 636 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 682 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 715 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add(), and Ntp.Analyzer.Config.Syntax.SyntaxNode< T >.Symbol.
|
inlineprivate |
Definition at line 738 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 757 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Parses the options of a setting.
node | Parent node. |
options | Options. |
T | : | SymbolSettingNode | |
T | : | new() |
Definition at line 804 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.SyntaxNode< T >.Add().
|
inlineprivate |
Definition at line 821 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Parses a peer graph configuration section.
parent | Parent node. |
Definition at line 858 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 908 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 959 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 1003 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 1032 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add(), and Ntp.Analyzer.Config.Syntax.Setting.StringSettingNode.Value.
|
inlineprivate |
Parses the footer of a configuration section.
name | Section name. Shown in error messages. |
Definition at line 1075 of file ConfigParser.cs.
|
inlineprivate |
Get the header of a configuration section.
Definition at line 1095 of file ConfigParser.cs.
|
inlineprivate |
Parses the stat configuration section.
parent | Parent node. |
Definition at line 1118 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Definition at line 1155 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Parses a traffic graph configuration section.
parent | Parent node. |
Definition at line 1178 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
inlineprivate |
Parses the value of a setting.
parent | Parent node. |
Definition at line 1239 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add(), Ntp.Analyzer.Config.Table.Token.NewLine, Ntp.Analyzer.Config.Table.IntegerToken.Symbol, Ntp.Analyzer.Config.Table.IntegerToken.TokenType, and Ntp.Analyzer.Config.Table.NumericToken.TokenType.
|
inlineprivate |
Definition at line 1282 of file ConfigParser.cs.
References Ntp.Analyzer.Config.Syntax.ISyntaxNode.Add().
|
private |
Definition at line 49 of file ConfigParser.cs.
IEnumerable<string> Ntp.Analyzer.Config.Compiler.ConfigParser.Errors => errors |
|
private |
Definition at line 50 of file ConfigParser.cs.
|
private |
Definition at line 51 of file ConfigParser.cs.
|
getset |