Exemple #1
0
        public GOLD.Reduction root;     //You might derive a specific object

        public void Setup()
        {
            //This procedure can be called to load the parse tables. The class can
            //read tables using a BinaryReader.

            parser.LoadTables(Path.Combine(Application.StartupPath, "grammar.egt"));
        }
Exemple #2
0
        public object program;     // You might derive a specific object

        public void Setup()
        {
            // This procedure can be called to load the parse tables. The class can
            // read tables using a BinaryReader.
            using (var stream = new MemoryStream(Properties.Resources.UDMFGrammar, false)) {
                using (var reader = new BinaryReader(stream))
                    parser.LoadTables(reader);
            }
        }
Exemple #3
0
 /// <summary>
 /// A Setup függvény a nyelvtanfájl megnyitásáért felelős.
 /// </summary>
 /// <returns>Logikai igaz, ha sikeres a nyelvtanfájl megnyitása, ellenkező esetben logikai hamis.</returns>
 public bool Setup()
 {
     try
     {
         return(parser.LoadTables(Environment.CurrentDirectory + @"/../../../WoLaDLL/ParseLogic/lang0.54.egt"));
     }
     catch (Exception exc)
     {
         Console.WriteLine(exc.Message);
         return(false);
     }
 }
Exemple #4
0
 /// <summary>
 /// A Setup függvény a nyelvtanfájl megnyitásáért felelős.
 /// </summary>
 /// <returns>Logikai igaz, ha sikeres a nyelvtanfájl megnyitása, ellenkező esetben logikai hamis.</returns>
 public bool Setup()
 {
     try
     {
         return(parser.LoadTables(Environment.CurrentDirectory + @"/../../../Luna_interpreter/Gold_Engine/lang0.53.egt"));
     }
     catch (Exception exc)
     {
         Console.WriteLine(exc.Message);
         return(false);
     }
 }
 public bool Setup(string FilePath)
 {
     return(parser.LoadTables(FilePath));
 }
        private string FailMessage;  // Updated if a parse error occured

        public bool Setup(byte[] grammarTable)
        {
            return(parser.LoadTables(new BinaryReader(new MemoryStream(grammarTable))));
        }
Exemple #7
0
        public object program;             //You might derive a specific object

        public GoldJsonParser()
        {
            var type = typeof(GoldJsonParser);

            parser.LoadTables(new BinaryReader(type.Assembly.GetManifestResourceStream(type.Namespace + ".JSON.egt")));
        }
Exemple #8
0
 public bool LoadTables(BinaryReader r)
 {
     return(parser.LoadTables(r));
 }
Exemple #9
0
        public object program;     //You might derive a specific object

        public void Setup()
        {
            //This procedure can be called to load the parse tables. The class can
            //read tables using a BinaryReader.
            parser.LoadTables(new BinaryReader(new MemoryStream(Resource.UIScript)));
        }