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; }
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; }
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; }
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; }
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; }
private void SetModRefState(ModRefState state) { crntModRefState = state; }
private void EndModule() { Contract.Requires(currentModule != null); currentModule = null; crntModRefState = ModRefState.None; }