static CtrlParser()
        {
            NextStateRec next, back;     // used to create a sequence of token states
            NextStateRec record;         // used to create a sequence of token states
            NextStateRec @base = null;   // holds the current record used as the base for a sequence of tokens


            FileRef ctrlParserDef = Settings.Default.CSLangDefFilePath;

            Initialise(ctrlParserDef);
            //string[] lines = File.ReadAllLines(filepath);
            //foreach (string line in lines)
            //{
            //    Match match = s_langDefRE.Match(line);
            //    // HACK: building the definition by hand for now -just reading file to confirm completeness

            //    if (!match.Success)
            //        continue;

            //    string name = match.Groups["name"].Value;

            //}

            NextStateFunc = s_nxtStateFuncBldr.NextStateFunc;
        }
Пример #2
0
        static CtrlParser()
        {
            NextStateRec nsStart = NextStateRec.CreateGrammaDef("Start");

            NSBldr = new NextStateBuilder(nsStart, OnParserAction);
            Initialise(nsStart);
            NextStateFunc = NSBldr.NextStateFunc;
            StructBldr.SetNextStateFunc(NextStateFunc);
        }