示例#1
0
        private NvdlInterpretation CreateInterp(NvdlDispatcher d,
                                                SimpleMode m, SimpleAction a, NvdlInterpretation p)
        {
            SimpleValidate v = a as SimpleValidate;

            if (v != null)
            {
                return(new NvdlValidateInterp(d, m, v, p));
            }
            return(new NvdlResultInterp(d, m, (SimpleResultAction)a, p));
        }
示例#2
0
        private NvdlInterpretation CreateInterp(NvdlDispatcher d,
                                                SimpleMode m, SimpleAction a, NvdlInterpretation p)
        {
            NvdlDebug.Writer.WriteLine("***** new interp from action {0} from mode {1}", a.Location, m.Location);
            SimpleValidate v = a as SimpleValidate;

            if (v != null)
            {
                return(new NvdlValidateInterp(d, m, v, p));
            }
            return(new NvdlResultInterp(d, m, (SimpleResultAction)a, p));
        }
示例#3
0
 private SimpleMode FindContextMode(SimpleAction a, NvdlSection parentState)
 {
     if (a.Contexts != null)
     {
         foreach (SimpleContext ctx in a.Contexts)
         {
             foreach (SimplePath path in ctx.Path)
             {
                 if (MatchPath(path, parentState))
                 {
                     return(ctx.UseMode);
                 }
             }
         }
     }
     return(a.DefaultMode);
 }
示例#4
0
 private SimpleMode FindContextMode(SimpleAction a, NvdlSection parentState)
 {
     if (a.Contexts != null)
     {
         foreach (SimpleContext ctx in a.Contexts)
         {
             foreach (SimplePath path in ctx.Path)
             {
                 if (MatchPath(path, parentState))
                 {
                     NvdlDebug.Writer.WriteLine("------ matched context at {0}.", ctx.Location);
                     return(ctx.UseMode);
                 }
             }
         }
     }
     return(a.DefaultMode);
 }
示例#5
0
 private NvdlInterpretation GetInterp(
     SimpleAction a, NvdlDispatcher d)
 {
     return(CreateInterp(d, d.Rules.StartMode, a, null));
 }
示例#6
0
		public NvdlInterpretation (NvdlDispatcher dispatcher,
			SimpleMode createdMode, SimpleAction action,
			NvdlInterpretation parent)
		{
			this.dispatcher = dispatcher;
			this.createdMode = createdMode;
			this.action = action;
			this.parent = parent;
		}
示例#7
0
		private SimpleMode FindContextMode (SimpleAction a, NvdlSection parentState)
		{
			if (a.Contexts != null)
				foreach (SimpleContext ctx in a.Contexts)
					foreach (SimplePath path in ctx.Path)
						if (MatchPath (path, parentState)) {
NvdlDebug.Writer.WriteLine ("------ matched context at {0}.", ctx.Location);
							return ctx.UseMode;
}
			return a.DefaultMode;
		}
示例#8
0
		private NvdlInterpretation CreateInterp (NvdlDispatcher d,
			SimpleMode m, SimpleAction a, NvdlInterpretation p)
		{
NvdlDebug.Writer.WriteLine ("***** new interp from action {0} from mode {1}", a.Location, m.Location);
			SimpleValidate v = a as SimpleValidate;
			if (v != null)
				return new NvdlValidateInterp (d, m, v, p);
			return new NvdlResultInterp (d, m, (SimpleResultAction) a, p);
		}
示例#9
0
		private NvdlInterpretation GetInterp (
			SimpleAction a, NvdlDispatcher d)
		{
			return CreateInterp (d, d.Rules.StartMode, a, null);
		}