Skip to content

Commit

Permalink
Add respond(s)/response as synonym for answer/answers
Browse files Browse the repository at this point in the history
+ Added `respond/responds` as a synonym for `answer/answers`. #163
+ Added `response` as a synonym for `answer`. #163

Closes #163
  • Loading branch information
Clashsoft committed Mar 4, 2020
1 parent fd9201d commit 65b8e3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/main/antlr/ScenarioLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ READS: 'reads';
REGISTER: 'register';
REMOVE: 'remove';
REMOVES: 'removes';
RESPOND: 'respond';
RESPONDS: 'responds';
RESPONSE: 'response';
SAME: 'same';
TAKE: 'take';
TAKES: 'takes';
Expand Down
4 changes: 2 additions & 2 deletions src/main/antlr/ScenarioParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ createSentence: actor verb=(CREATE | CREATES) (simpleDescriptor | multiDescripto
callSentence: actor verb=(CALL | CALLS) name (ON expr)? withClauses?;
tellSentence: actor verb=(TELL | TELLS) expr TO name withClauses?;

answerSentence: actor verb=(ANSWER | ANSWERS) WITH expr (INTO THE? name)?;
answerSentence: actor verb=(ANSWER | ANSWERS | RESPONDS) WITH expr (INTO THE? name)?;

writeSentence: actor verb=(WRITE | WRITES) expr INTO expr;
addSentence: actor verb=(ADD | ADDS) expr TO expr;
Expand Down Expand Up @@ -116,7 +116,7 @@ primaryExpr: primary;
number: DECIMAL | INTEGER;
stringLiteral: STRING_LITERAL;
it: IT;
answer: THE? ANSWER;
answer: THE? (ANSWER | RESPONSE);

simpleName: WORD;
name: WORD+;
Expand Down

0 comments on commit 65b8e3b

Please sign in to comment.