Exemplo n.º 1
0
 static void Main(string[] args)
 {
     try
     {
         DOMElement_GrammarDefinition.GenerateDOM(CmdUtilities.CreateConfiguration <DOMESettings>(args));
     }
     catch (DOMESyntaxException ex)
     {
         Console.WriteLine("A syntax error occured:");
         Console.WriteLine(ex.GetMessage());
     }
 }
Exemplo n.º 2
0
        public DOMEVariableTypeConcept_Primitive(DOMElement_GrammarDefinition g, string n)
        {
            name = n;
            grammar_definition = g;

            get_as_single = new OperationCache <DOMEVariableType>("get_as_single", delegate() {
                return(new DOMEVariableType_Single_Primitive(this));
            });

            get_as_collection = new OperationCache <DOMEVariableType>("get_as_collection", delegate() {
                return(new DOMEVariableType_Multiple_Primitive_List(this));
            });
        }
Exemplo n.º 3
0
        public DOMEClass_Generated_GrammarElement_SyntaxException(DOMElement_GrammarDefinition g) : base(g)
        {
            get_type_name = new OperationCache <string>("get_type_name", delegate() {
                return(GetGrammarDefinition().GetGrammarName() + "SyntaxException");
            });

            get_base_type = new OperationCache <DOMEClass>("get_base_type", delegate() {
                return(GetGrammarDefinition()
                       .GetClassGeneric(
                           GetGrammarDefinition().GetSettings().GetExceptionBaseTypeName()
                           ));
            });
        }
Exemplo n.º 4
0
 public DOMEClass_Generated_GrammarElement_Helper_Utilities(DOMElement_GrammarDefinition g) : base(g)
 {
     get_type_name = new OperationCache <string>("get_type_name", delegate() {
         return(GetGrammarDefinition().GetGrammarName() + "DOMinatorUtilities");
     });
 }
 public DOMEVariableTypeConcept_Primitive_Simple_Parseable(DOMElement_GrammarDefinition g, string n, string c) : base(g, n, c)
 {
 }
 { public DOMEVariableTypeConcept_Primitive_Simple_Parseable_Decimal(DOMElement_GrammarDefinition g) : base(g, "decimal", "0.0m")
   {
   }
 { public DOMEVariableTypeConcept_Primitive_Simple_Parseable_Double(DOMElement_GrammarDefinition g) : base(g, "double", "0.0")
   {
   }
 static public void GenerateDOM(DOMESettings settings)
 {
     DOMElement_GrammarDefinition.DOMifyGrammar(settings.GetGrammarName()).Generate(settings);
 }
Exemplo n.º 9
0
 public DOMEClass_Generic(DOMElement_GrammarDefinition g, string n)
 {
     type_name          = n;
     grammar_definition = g;
 }
Exemplo n.º 10
0
 public DOMEVariableTypeConcept_Primitive_Simple(DOMElement_GrammarDefinition g, string n, string c) : base(g, n)
 {
     default_construction_expression = c;
 }
 public DOMEClass_Generated_GrammarElement_Helper_SyntaxExceptionThrower(DOMElement_GrammarDefinition g) : base(g)
 {
     get_type_name = new OperationCache <string>("get_type_name", delegate() {
         return(GetGrammarDefinition().GetGrammarName() + "SyntaxExceptionThrower");
     });
 }
 public DOMEVariableTypeConcept_Primitive_Simple_String(DOMElement_GrammarDefinition g) : base(g, "string", "\"\"")
 {
 }
 public DOMEVariableTypeConcept_Primitive_Enum(DOMElement_GrammarDefinition g, string n) : base(g, n)
 {
 }
Exemplo n.º 14
0
 static public DOMElement_GrammarDefinition DOMifyGrammar(string grammar_name)
 {
     return(DOMElement_GrammarDefinition.DOMifyFile(grammar_name + ".g4"));
 }
 public DOMEClass_Generated_GrammarElement(DOMElement_GrammarDefinition g)
     : base(g)
 {
 }
 { public DOMEVariableTypeConcept_Primitive_Simple_Parseable_Bool(DOMElement_GrammarDefinition g) : base(g, "bool", "false")
   {
   }
 { public DOMEVariableTypeConcept_Primitive_Simple_Parseable_Long(DOMElement_GrammarDefinition g) : base(g, "long", "0")
   {
   }
Exemplo n.º 18
0
 public DOMEClass_GrammarElement(DOMElement_GrammarDefinition g)
 {
     grammar_definition = g;
 }
 { public DOMEVariableTypeConcept_Primitive_Simple_Parseable_Float(DOMElement_GrammarDefinition g) : base(g, "float", "0.0f")
   {
   }
 public DOMEClass_Generated_GrammarElement_Helper_IParseTreeExtensions(DOMElement_GrammarDefinition g) : base(g)
 {
     get_type_name = new OperationCache <string>("get_type_name", delegate() {
         return(GetGrammarDefinition().GetGrammarName() + "IParseTreeExtensions");
     });
 }
Exemplo n.º 21
0
 public DOMEVariableTypeConcept_Primitive_NewConstruct(DOMElement_GrammarDefinition g, string n) : base(g, n)
 {
     get_default_construction_expression = new OperationCache <string>("get_default_construction_expression", delegate() {
         return(GetStringToTypeExpression(""));
     });
 }