Ejemplo n.º 1
0
        public void VerifyDefaultState()
        {
            StateSymbol state = _globals.Resolve("default(*)") as StateSymbol;

            if (state == null)
            {
                _listener.Error(
                    "line: 0:0" + " No default state defined"
                    );
            }
        }
Ejemplo n.º 2
0
        public void Define(StateSymbol stateSym, IScope currentScope)
        {
            if (stateSym.Name != "default(*)" && _globals.Resolve("default(*)") == null)
            {
                _listener.Error(
                    "line " + stateSym.Def.Line + ":" + stateSym.Def.CharPositionInLine + " State '"
                    + stateSym.Name + "' cannot be defined yet. Default state must be defined first."
                    );
            }

            this.Define((Symbol)stateSym, currentScope);
        }
Ejemplo n.º 3
0
        public void CheckStateChange(LSLAst chgNode, LSLAst destID)
        {
            string      stateName = destID != null ? destID.Text + "(*)" : "default(*)";
            StateSymbol state     = _globals.Resolve(stateName) as StateSymbol;

            if (state == null)
            {
                _listener.Error(
                    "line " + chgNode.Token.Line + ":" + chgNode.Token.CharPositionInLine +
                    " Undefined state " + stateName
                    );
            }
        }