Resolve() 공개 메소드

public Resolve ( ScriptingContext context ) : Expression
context ScriptingContext
리턴 Expression
예제 #1
0
파일: Command.cs 프로젝트: baulig/debugger
        protected override bool DoResolve(ScriptingContext context)
        {
            if (Repeating)
                return true;

            expression = ParseExpression (context);
            if (expression == null)
                return false;

            expression = expression.Resolve (context);
            return expression != null;
        }
예제 #2
0
파일: Command.cs 프로젝트: baulig/debugger
            protected override bool DoResolve(ScriptingContext context)
            {
                if ((Args == null) || (Args.Count != 1)) {
                    context.Print ("Invalid arguments: expression expected");
                    return false;
                }

                expression = ParseExpression (context);
                if (expression == null)
                    return false;

                expression = expression.Resolve (context);
                return expression != null;
            }
예제 #3
0
파일: Command.cs 프로젝트: baulig/debugger
            protected override bool DoResolve(ScriptingContext context)
            {
                expr = DoParseExpression (context, arg);
                if (expr == null)
                    return false;

                expr = expr.Resolve (context);
                return expr != null;
            }
예제 #4
0
파일: Command.cs 프로젝트: baulig/debugger
        protected override bool DoResolve(ScriptingContext context)
        {
            expression = ParseExpression (context);
            if (expression == null)
                return false;

            expression = expression.Resolve (context);
            if (expression == null)
                return false;

            pexpr = expression as PointerExpression;
            if (pexpr == null)
                throw new ScriptingException (
                    "Expression `{0}' is not a pointer.",
                    expression.Name);

            return true;
        }
예제 #5
0
파일: Command.cs 프로젝트: baulig/debugger
        protected override bool DoResolve(ScriptingContext context)
        {
            if (Repeating)
                return true;

            if (Args == null)
                throw new ScriptingException ("Argument expected");

            if (Args.Count > 1) {
                string formatArgument = (string) Args [0];
                Match match = formatRegex.Match (formatArgument);

                if (match.Success) {
                    string countString = match.Groups [1].Value;
                    string formatString = match.Groups [2].Value;
                    string sizeString = match.Groups [3].Value;

                    if (countString != null && countString != "") {
                        count = Int32.Parse (countString);
                    }
                    if (formatString != null && formatString != "") {
                        format = formatString [0];
                    }
                    if (sizeString != null && sizeString != "") {
                        size = sizeString [0];
                    }

                    //context.Print ("EXAMINE: count {0}, format{1}, size {2}", count, format, size);

                    Args.RemoveAt (0);
                    //context.Print ("EXAMINE: Argument now is '" + Argument + "'");
                } else {
                    //context.Print ("EXAMINE: " + formatArgument + " did not match");
                    if (formatArgument.Length > 0 && formatArgument [0] == '/') {
                        throw new ScriptingException ("Invalid format " + formatArgument);
                    }
                }
            } else {
                //context.Print ("EXAMINE: by default: count {0}, format{1}, size {2}", count, format, size);
            }

            if (format == '_') {
                format = 'x';
            }
            if (size == '_') {
                size = DefaultSize ();
            }
            //context.Print ("EXAMINE: finally: count {0}, format{1}, size {2}", count, format, size);

            expression = ParseExpression (context);
            if (expression == null)
                return false;

            expression = expression.Resolve (context);
            return expression != null;
        }
예제 #6
0
파일: Command.cs 프로젝트: baulig/debugger
        protected override bool DoResolve(ScriptingContext context)
        {
            if (Repeating)
                return true;

            if (Argument != "") {
                if (count < 0)
                    count = 1;

                expression = ParseExpression (context);
                if (expression == null)
                    return false;

                expression = expression.Resolve (context);
                return expression != null;
            }

            if (count < 0)
                count = 10;

            address = CurrentFrame.TargetAddress;
            method = CurrentFrame.Method;
            return true;
        }