コード例 #1
0
ファイル: Parser.cs プロジェクト: thisiscam/formula
 private void StartModel(string name, bool isPartial, Span span)
 {
     Contract.Requires(currentModule == null);
     currentModule = new Model(span, name, isPartial);
     parseResult.Program.Node.AddModule(currentModule);
     crntModRefState = ModRefState.Other;
 }
コード例 #2
0
ファイル: Parser.cs プロジェクト: thisiscam/formula
        private void StartMachine(string name, Span span)
        {
            Contract.Requires(currentModule == null);
            var mach = new Machine(span, name);

            parseResult.Program.Node.AddModule(mach);
            currentModule   = mach;
            crntModRefState = ModRefState.Input;
        }
コード例 #3
0
ファイル: Parser.cs プロジェクト: thisiscam/formula
        private void StartTSystem(string name, Span span)
        {
            Contract.Requires(currentModule == null);
            var tsys = new TSystem(span, name);

            parseResult.Program.Node.AddModule(tsys);
            crntModRefState = ModRefState.Input;
            currentModule   = tsys;
        }
コード例 #4
0
ファイル: Parser.cs プロジェクト: thisiscam/formula
        private void StartDomain(string name, ComposeKind kind, Span span)
        {
            Contract.Requires(currentModule == null);
            var dom = new Domain(span, name, kind);

            parseResult.Program.Node.AddModule(dom);
            currentModule   = dom;
            crntModRefState = ModRefState.Other;
        }
コード例 #5
0
ファイル: Parser.cs プロジェクト: thisiscam/formula
        private void ResetState()
        {
            currentModule = null;
            parseResult.ClearFlags();
            /******* State for building terms ********/
            appStack.Clear();
            argStack.Clear();
            quoteStack.Clear();
            /*****************************************/

            /******* State for building rules, contracts, and comprehensions ********/
            crntRule     = null;
            crntContract = null;
            crntBody     = null;
            /*****************************************/

            /******* State for building types and type declarations ********/
            crntTypeDeclName = null;
            crntTypeDeclSpan = default(Span);
            crntTypeDecl     = null;
            crntTypeTerm     = null;
            currentEnum      = null;
            /*****************************************/

            /******* State for ModRefs, steps, and updates ********/
            crntModRef      = null;
            crntStep        = null;
            crntUpdate      = null;
            crntModRefState = ModRefState.None;
            /*************************************/

            /******* State for sentence configs ********/
            crntSentConf = null;
            /*************************************/

            IsBuildingNext   = false;
            IsBuildingUpdate = false;
            IsBuildingCod    = false;
        }
コード例 #6
0
ファイル: Parser.cs プロジェクト: thisiscam/formula
 private void SetModRefState(ModRefState state)
 {
     crntModRefState = state;
 }
コード例 #7
0
ファイル: Parser.cs プロジェクト: thisiscam/formula
 private void EndModule()
 {
     Contract.Requires(currentModule != null);
     currentModule   = null;
     crntModRefState = ModRefState.None;
 }