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); }
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); }
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; }
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; }
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); }
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); }
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; }
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; }
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); }
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); }