NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Config.Compiler.ConfigCompiler Class Reference

The config compiler transforms syntax nodes into configurations and assemble all missing links. More...

Inheritance diagram for Ntp.Analyzer.Config.Compiler.ConfigCompiler:
Collaboration diagram for Ntp.Analyzer.Config.Compiler.ConfigCompiler:

Public Member Functions

 ConfigCompiler (ISyntaxNode root)
 Initializes a new instance of the ConfigCompiler class. More...
 
void Execute ()
 Execute this stage. More...
 

Public Attributes

IEnumerable< string > Errors => new List<string>()
 Gets the errors from this stage. 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...
 

Static Private Member Functions

static void Assemble (ISyntaxNode node)
 Assemble compiled syntax tree buttom up. More...
 
static void Compile (ISyntaxNode node)
 Compile the specified syntax node tree buttom up. More...
 

Private Attributes

readonly ISyntaxNode root
 

Detailed Description

The config compiler transforms syntax nodes into configurations and assemble all missing links.

Definition at line 32 of file ConfigCompiler.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Config.Compiler.ConfigCompiler.ConfigCompiler ( ISyntaxNode  root)
inline

Initializes a new instance of the ConfigCompiler class.

Parameters
rootThe root node.

Definition at line 38 of file ConfigCompiler.cs.

39  {
40  this.root = root;
41  }

Member Function Documentation

static void Ntp.Analyzer.Config.Compiler.ConfigCompiler.Assemble ( ISyntaxNode  node)
inlinestaticprivate

Assemble compiled syntax tree buttom up.

Parameters
nodeNode.

Definition at line 72 of file ConfigCompiler.cs.

73  {
74  foreach (var child in node)
75  {
76  Assemble(child);
77  child.Assemble(node);
78  }
79  }
static void Assemble(ISyntaxNode node)
Assemble compiled syntax tree buttom up.
static void Ntp.Analyzer.Config.Compiler.ConfigCompiler.Compile ( ISyntaxNode  node)
inlinestaticprivate

Compile the specified syntax node tree buttom up.

Parameters
nodeNode.

Definition at line 85 of file ConfigCompiler.cs.

86  {
87  foreach (var child in node)
88  {
89  Compile(child);
90  }
91 
92  node.CompileNode();
93  }
static void Compile(ISyntaxNode node)
Compile the specified syntax node tree buttom up.
void Ntp.Analyzer.Config.Compiler.ConfigCompiler.Execute ( )
inline

Execute this stage.

Implements Ntp.Analyzer.Config.Compiler.ICompilerStage.

Definition at line 62 of file ConfigCompiler.cs.

63  {
64  Compile(root);
65  Assemble(root);
66  }
static void Compile(ISyntaxNode node)
Compile the specified syntax node tree buttom up.
static void Assemble(ISyntaxNode node)
Assemble compiled syntax tree buttom up.

Member Data Documentation

IEnumerable<string> Ntp.Analyzer.Config.Compiler.ConfigCompiler.Errors => new List<string>()

Gets the errors from this stage.

The compiler stage does not yield errors>

The errors.

Definition at line 57 of file ConfigCompiler.cs.

readonly ISyntaxNode Ntp.Analyzer.Config.Compiler.ConfigCompiler.root
private

Definition at line 43 of file ConfigCompiler.cs.

Property Documentation

SymbolTable Ntp.Analyzer.Config.Compiler.ConfigCompiler.SymbolTable
getset

Gets or sets the symbol table.

The symbol table is not used by the compiler stage

The symbol table.

Definition at line 50 of file ConfigCompiler.cs.

Referenced by Ntp.Analyzer.Config.ConfigBuilder.Execute().


The documentation for this class was generated from the following file: