public void VerifyDefaultState()
        {
            StateSymbol state = _globals.Resolve("default(*)") as StateSymbol;

            if (state == null)
            {
                _listener.Error(
                    "line: 0:0" + " No default state defined"
                    );
            }
        }
        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);
        }
        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
                    );
            }
        }