Uses of Class
games.stendhal.common.parser.Expression
Package
Description
implements the NPC conversation parser.
-
Uses of Expression in games.stendhal.common.grammar
Modifier and TypeMethodDescriptionstatic Expression
Grammar.mergeCompoundNoun(Expression word1, Expression word2)
Merge two expressions into a compound noun.Modifier and TypeMethodDescriptionstatic Expression
Grammar.mergeCompoundNoun(Expression word1, Expression word2)
Merge two expressions into a compound noun. -
Uses of Expression in games.stendhal.common.parser
Modifier and TypeFieldDescriptionstatic Expression
Expression.EMPTY_EXPRESSION
Instance of an empty Expression.Modifier and TypeMethodDescriptionstatic Expression
ConversationParser.createTriggerExpression(String text)
Create trigger expression to match the parsed user input in the FSM engine.static Expression
ConversationParser.createTriggerExpression(String text, ExpressionMatcher matcher)
Create trigger expression to match the parsed user input in the FSM engine.TriggerList.find(Expression expr)
Search for the given expression in the list.Sentence.getExpression(int idx, String typePrefix)
Return verb [i] of the sentence.protected Expression[]
Sentence.getExpressionsArrayList()
Return an array of the expressions.Sentence.getNumeral()
Return the single numeral of the parsed sentence.Sentence.getNumeral(int i)
Return numeral [i] of the parsed sentence.Sentence.getObject(int i)
Return object [i] of the parsed sentence (e.g.Sentence.getPreposition(int i)
Return the preposition [i] of the parsed sentence.Sentence.getSubject(int i)
Return subject [i] of the sentence.Sentence.getTriggerExpression()
Return trigger Expression for the FSM engine.Sentence.getUnknownTypeExpression(int idx)
Return unknown word [i] of the sentence.Sentence.getVerb()
Return verb as Expression object for the special case of sentences with only one verb.Sentence.getVerb(int i)
Return verb [i] of the sentence.Sentence.nextValid(Iterator<Expression> it)
Advance the iterator and return the next non-ignorable Expression.Modifier and TypeMethodDescriptionSentence.getExpressions()
Return the list of expressions.Sentence.iterator()
Return an iterator over all expressions.Modifier and TypeMethodDescriptionTriggerList.find(Expression expr)
Search for the given expression in the list.protected boolean
Sentence.isIgnorable(Expression expr)
Check if the given Expression should be ignored.boolean
ExpressionMatcher.match(Expression expr1, Expression expr2)
Match two Expressions using the mode in matchingFlags.boolean
Expression.matches(Expression other)
Check if two Expressions match exactly.boolean
Expression.matchesNormalized(Expression other)
Check if two Expressions match each other.boolean
Expression.matchesNormalizedSimilar(Expression other)
Check if the Expression is similar to another Expression.void
Expression.mergeLeft(Expression prec, boolean mergeNormalized)
Merge the given preceding Expression into this Expression, while leaving mainWord unchanged.void
Expression.mergeName(Expression next, ExpressionType newType)
Merge the given following name component into this Expression.void
Expression.mergeRight(Expression other, boolean mergeNormalized)
Merge the given following Expression into this Expression, while leaving mainWord unchanged.void
Expression.mergeSimple(Expression other)
Merge the given preceding Expression into this Expression while leaving mainWord unchanged.The members normalized and original are only touched when negating the expression.boolean
NameSearch.search(Expression item)
Searches for item to match the given Expression.Modifier and TypeMethodDescriptionint
SentenceBuilder.appendUntilBreak(Iterator<Expression> it)
Append a sequence of Expressions until we find a break flag or there is no more Expression.boolean
CompoundName.matches(AbstractList<Expression> expressions, int idx)
Compare this compound name with the words in the expressions list starting at index idx.Sentence.nextValid(Iterator<Expression> it)
Advance the iterator and return the next non-ignorable Expression.WordList.searchCompoundName(AbstractList<Expression> expressions, int idx)
Search for compound names.ModifierConstructorDescriptionSentenceImplementation(Expression... exprs)
Create a SentenceImplementation object for testing purposes. -
Uses of Expression in games.stendhal.server.entity.npc.fsm
Modifier and TypeMethodDescriptionTransition.getTriggers()
TransitionList.getTriggersForState(ConversationStates state)
returns a set of triggers for a given source state.Modifier and TypeMethodDescriptionTransitionList.getTransitionsForStateAndTrigger(ConversationStates state, Expression trigger)
returns a list of transitions for this state-trigger pair.boolean
Transition.matches(ConversationStates state, Expression trigger)
Checks whether this transition is possible now.boolean
Transition.matchesNormalized(ConversationStates state, Expression trigger)
Checks whether this transition is possible now by using matching of the normalized expression.boolean
Transition.matchesNormalizedWithCondition(ConversationStates state, Expression trigger, PreTransitionCondition condition)
Checks for normalized match with the given state/trigger/condition combination.boolean
Transition.matchesWithCondition(ConversationStates state, Expression trigger, PreTransitionCondition condition)
Checks for match with the given state/trigger/condition combination.Modifier and TypeMethodDescriptionvoid
Engine.add(Collection<Expression> triggerExpressions, ConversationStates state, ChatCondition condition, boolean secondary, ConversationStates nextState, String reply, ChatAction action)
Adds a new set of transitions to the FSM.void
Engine.add(Collection<Expression> triggerExpressions, ConversationStates state, ChatCondition condition, boolean secondary, ConversationStates nextState, String reply, ChatAction action, String label)
Adds a new set of transitions to the FSM.ModifierConstructorDescriptionTransition(ConversationStates currentState, Collection<Expression> triggers, PreTransitionCondition condition, boolean secondary, ConversationStates nextState, String reply, PostTransitionAction action)
Creates a new transition.Transition(ConversationStates currentState, Collection<Expression> triggers, PreTransitionCondition condition, boolean secondary, ConversationStates nextState, String reply, PostTransitionAction action, String label)
Creates a new transition.