예제 #1
0
        public List <PossibleMatch> Match(PossibleMatch State, MatchContext Context)
        {
            var r = new List <PossibleMatch>();

            if (State.Next == null)
            {
                return(r);
            }

            var word = State.Next.Value.ToUpper();

            if (word == "ON")
            {
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.On));
            }
            else if (word == "IN")
            {
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.In));
            }
            else if (word == "UNDER")
            {
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.Under));
            }
            else if (word == "BEHIND")
            {
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.Behind));
            }
            return(r);
        }
예제 #2
0
        override protected List <PossibleMatch> ImplementMatch(PossibleMatch State, MatchContext Context)
        {
            var r = new List <PossibleMatch>();

            if (State.Next == null)
            {
                return(r);
            }

            var word = State.Next.Value.ToUpper();

            if (word == "ON")
            {
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.ON));
            }
            else if (word == "IN")
            {
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.IN));
            }
            else if (word == "UNDER")
            {
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.UNDER));
            }
            else if (word == "BEHIND")
            {
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.BEHIND));
            }
            return(r);
        }
예제 #3
0
        public List<PossibleMatch> Match(PossibleMatch State, MatchContext Context)
        {
            var r = new List<PossibleMatch>();
            if (State.Next == null) return r;

            var word = State.Next.Value.ToUpper();
            if (word == "ON")
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.On));
            else  if (word == "IN")
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.In));
            else if (word == "UNDER")
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.Under));
            else if (word == "BEHIND")
                r.Add(State.AdvanceWith(ArgumentName, RelativeLocations.Behind));
            return r;
        }
예제 #4
0
 public List<PossibleMatch> Match(PossibleMatch State, MatchContext Context)
 {
     var r = new List<PossibleMatch>();
     if (State.Next != null)
         r.Add(State.AdvanceWith(ArgumentName, State.Next.Value));
     return r;
 }
예제 #5
0
        public List <PossibleMatch> Match(PossibleMatch State, MatchContext Context)
        {
            var r = new List <PossibleMatch>();

            if (State.Next != null)
            {
                r.Add(State.AdvanceWith(ArgumentName, State.Next.Value));
            }
            return(r);
        }
예제 #6
0
        override protected List <PossibleMatch> ImplementMatch(PossibleMatch State, MatchContext Context)
        {
            var r = new List <PossibleMatch>();

            if (State.Next != null)
            {
                r.Add(State.AdvanceWith(ArgumentName, State.Next.Value));
            }
            return(r);
        }
예제 #7
0
        public List<PossibleMatch> Match(PossibleMatch State, MatchContext Context)
        {
            var r = new List<PossibleMatch>();
            if (State.Next == null) return r;

            if (Link.IsCardinal(State.Next.Value.ToUpper()))
                r.Add(State.AdvanceWith(ArgumentName, Link.ToCardinal(State.Next.Value.ToUpper())));

            return r;
        }
예제 #8
0
        public List<PossibleMatch> Match(PossibleMatch State, MatchContext Context)
        {
            var r = new List<PossibleMatch>();
            if (State.Next == null) return r;

            int value = 0;
            if (Int32.TryParse(State.Next.Value, out value))
                r.Add(State.AdvanceWith(ArgumentName, value));

            return r;
        }
예제 #9
0
        public List <PossibleMatch> Match(PossibleMatch State, MatchContext Context)
        {
            var r = new List <PossibleMatch>();

            if (State.Next == null)
            {
                return(r);
            }

            if (Link.IsCardinal(State.Next.Value.ToUpper()))
            {
                r.Add(State.AdvanceWith(ArgumentName, Link.ToCardinal(State.Next.Value.ToUpper())));
            }

            return(r);
        }
예제 #10
0
        override protected List <PossibleMatch> ImplementMatch(PossibleMatch State, MatchContext Context)
        {
            var r = new List <PossibleMatch>();

            if (State.Next == null)
            {
                return(r);
            }

            int value = 0;

            if (Int32.TryParse(State.Next.Value, out value))
            {
                r.Add(State.AdvanceWith(ArgumentName, value));
            }

            return(r);
        }