public void ObserveProcess(VHDLCompilerInterface compiler, ProcessStatement process) { ProcessObserver po = new ProcessObserver(process, logger); po.Observe(compiler); method = new ProcesRoutineInfo(po.MethodName, po.Method); }
public ProcessObserver(ProcessStatement process, Logger logger) { this.logger = logger; this.process = process; declarations = new List <string>(); this.statements = new List <string>(); }
/// <summary> /// Проверка процесса на содержание операторов Wait /// </summary> /// <param name="tree"></param> /// <param name="process"></param> public bool CheckProcess(ParserRuleContext tree, ProcessStatement process) { int WaitCount = 0; foreach (SequentialStatement SeqStatement in process.Statements) { WaitCount += GetWaitCount(SeqStatement); } if (process.SensitivityList.Count > 0) { // no wait statement if (WaitCount > 0) { throw new VHDL.ParseError.vhdlIllegalWaitInProcessException(tree, FileName); } } else { // at least one wait statement if (WaitCount == 0) { throw new VHDL.ParseError.vhdlWaitStatementRequiredException(tree, FileName); } } return(true); }