summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2020-08-29 18:44:57 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2020-08-29 18:44:57 +0200
commit3032a36f8b3f154a66ead1c418968afdc1b586e8 (patch)
treee217f0461c8726c12558eeec6471f643e06c44ea
parente0d33c967f5631f988bd4240691eb87f62fc6374 (diff)
New 'set' aliases, forces spaces for instr list.
Local variables seem to have issues, but not with hierarchical instructions: it's the context stuff that's not working properly (for lambdas) and the 'global'/'local' in the main sequence not behaving as expected.
-rw-r--r--src/core/src/tonkadur/fate/v1/parser/FateLexer.g42
-rw-r--r--src/core/src/tonkadur/fate/v1/parser/FateParser.g42
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/src/tonkadur/fate/v1/parser/FateLexer.g4 b/src/core/src/tonkadur/fate/v1/parser/FateLexer.g4
index 4684a3e..7077127 100644
--- a/src/core/src/tonkadur/fate/v1/parser/FateLexer.g4
+++ b/src/core/src/tonkadur/fate/v1/parser/FateLexer.g4
@@ -87,7 +87,7 @@ REQUIRE_EXTENSION_KW: L_PAREN 'require'US'extension' SEP+;
REQUIRE_KW: L_PAREN 'require' SEP+;
SEQUENCE_KW: L_PAREN 'seq'('uence')? SEP+;
SET_FIELDS_KW: L_PAREN 'set'US'fields' SEP+;
-SET_KW: L_PAREN 'set' SEP+;
+SET_KW: L_PAREN 'set'(US(('val''ue'?)|('var''iable'?)))? SEP+;
LIST_KW: L_PAREN 'list' SEP+;
SIZE_KW: L_PAREN 'size' SEP+;
SWITCH_KW: L_PAREN 'switch' SEP+;
diff --git a/src/core/src/tonkadur/fate/v1/parser/FateParser.g4 b/src/core/src/tonkadur/fate/v1/parser/FateParser.g4
index 06b123c..4e326b5 100644
--- a/src/core/src/tonkadur/fate/v1/parser/FateParser.g4
+++ b/src/core/src/tonkadur/fate/v1/parser/FateParser.g4
@@ -420,7 +420,7 @@ catch [final Throwable e]
general_fate_instr
returns [Instruction result]
:
- L_PAREN WS* general_fate_sequence WS* R_PAREN
+ L_PAREN WS+ general_fate_sequence WS+ R_PAREN
{
$result =
new InstructionList