Skip to content

Commit

Permalink
Extract unit test updates by @ericvergnaud in antlr#4027 then he can …
Browse files Browse the repository at this point in the history
…rebase after we merge this into dev. All tests pass locally (didn't check python2 actually but python3 works).

Signed-off-by: Terence Parr <[email protected]>
  • Loading branch information
parrt committed Dec 20, 2022
1 parent 539ffaf commit 8a8141f
Show file tree
Hide file tree
Showing 26 changed files with 94 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Parser
grammar T;
s : e {<writeln("$e.v")>};
e returns [int v]
: e '*' e {$v = <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(0)}, {<Result("v")>})> * <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| e '+' e {$v = <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(0)}, {<Result("v")>})> + <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(1)}, {<Result("v")>})>;} # binary
: e '*' e {$v = <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(0)}, {<Result("v")>})> * <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| e '+' e {$v = <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(0)}, {<Result("v")>})> + <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| INT{$v = $INT.int;} # anInt
| '(' e ')' {$v = $e.v;} # parens
| left=e INC {<ContextRuleFunction(Cast("UnaryContext","$ctx"), "INC()"):Concat(" != null"):Assert()>$v = $left.v + 1;} # unary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Parser
grammar T;
s : e {<writeln("$e.v")>};
e returns [int v]
: e '*' e {$v = <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(0)}, {<Result("v")>})> * <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| e '+' e {$v = <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(0)}, {<Result("v")>})> + <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(1)}, {<Result("v")>})>;} # binary
: e '*' e {$v = <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(0)}, {<Result("v")>})> * <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| e '+' e {$v = <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(0)}, {<Result("v")>})> + <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| INT{$v = $INT.int;} # anInt
| '(' e ')' {$v = $e.v;} # parens
| left=e INC {<ContextRuleFunction(Cast("UnaryContext","$ctx"), "INC()"):Concat(" != null"):Assert()>$v = $left.v + 1;} # unary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Parser
grammar T;
s : e {<writeln("$e.v")>};
e returns [int v]
: e '*' e {$v = <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(0)}, {<Result("v")>})> * <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| e '+' e {$v = <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(0)}, {<Result("v")>})> + <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(1)}, {<Result("v")>})>;} # binary
: e '*' e {$v = <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(0)}, {<Result("v")>})> * <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| e '+' e {$v = <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(0)}, {<Result("v")>})> + <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| INT{$v = $INT.int;} # anInt
| '(' e ')' {$v = $e.v;} # parens
| left=e INC {<ContextRuleFunction(Cast("UnaryContext","$ctx"), "INC()"):Concat(" != null"):Assert()>$v = $left.v + 1;} # unary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Parser
grammar T;
s : e {<writeln("$e.v")>};
e returns [int v]
: e '*' e {$v = <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(0)}, {<Result("v")>})> * <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| e '+' e {$v = <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(0)}, {<Result("v")>})> + <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(1)}, {<Result("v")>})>;} # binary
: e '*' e {$v = <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(0)}, {<Result("v")>})> * <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| e '+' e {$v = <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(0)}, {<Result("v")>})> + <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| INT{$v = $INT.int;} # anInt
| '(' e ')' {$v = $e.v;} # parens
| left=e INC {<ContextRuleFunction(Cast("UnaryContext","$ctx"), "INC()"):Concat(" != null"):Assert()>$v = $left.v + 1;} # unary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Parser
grammar T;
s : e {<writeln("$e.v")>};
e returns [int v]
: e '*' e {$v = <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(0)}, {<Result("v")>})> * <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| e '+' e {$v = <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(0)}, {<Result("v")>})> + <Cast("BinaryContext","$ctx"):ContextMember({<Production("e")>(1)}, {<Result("v")>})>;} # binary
: e '*' e {$v = <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(0)}, {<Result("v")>})> * <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| e '+' e {$v = <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(0)}, {<Result("v")>})> + <Cast("BinaryContext","$ctx"):SubContextLocal({<Production("e")>(1)}, {<Result("v")>})>;} # binary
| INT{$v = $INT.int;} # anInt
| '(' e ')' {$v = $e.v;} # parens
| left=e INC {<ContextRuleFunction(Cast("UnaryContext","$ctx"), "INC()"):Concat(" != null"):Assert()>$v = $left.v + 1;} # unary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ grammar T;

s
@after {
<ContextRuleFunction("$ctx", "r"):ToStringTree():writeln()>
<ContextRuleFunction("$ctx", "r"):WalkListener()>
<ContextMember("$ctx", "r"):ToStringTree():writeln()>
<ContextMember("$ctx", "r"):WalkListener()>
}
: r=a ;
a : INT INT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ grammar T;

s
@after {
<ContextRuleFunction("$ctx", "r"):ToStringTree():writeln()>
<ContextRuleFunction("$ctx", "r"):WalkListener()>
<ContextMember("$ctx", "r"):ToStringTree():writeln()>
<ContextMember("$ctx", "r"):WalkListener()>
}
: r=e ;
e : e op='*' e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ grammar T;

s
@after {
<ContextRuleFunction("$ctx", "r"):ToStringTree():writeln()>
<ContextRuleFunction("$ctx", "r"):WalkListener()>
<ContextMember("$ctx", "r"):ToStringTree():writeln()>
<ContextMember("$ctx", "r"):WalkListener()>
}
: r=e ;
e : e '(' eList ')' # Call
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ grammar T;

s
@after {
<ContextRuleFunction("$ctx", "r"):ToStringTree():writeln()>
<ContextRuleFunction("$ctx", "r"):WalkListener()>
<ContextMember("$ctx", "r"):ToStringTree():writeln()>
<ContextMember("$ctx", "r"):WalkListener()>
}
: r=a ;
a : b b // forces list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ grammar T;

s
@after {
<ContextRuleFunction("$ctx", "r"):ToStringTree():writeln()>
<ContextRuleFunction("$ctx", "r"):WalkListener()>
<ContextMember("$ctx", "r"):ToStringTree():writeln()>
<ContextMember("$ctx", "r"):WalkListener()>
}
: r=a ;
a : b b // forces list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ grammar T;

s
@after {
<ContextRuleFunction("$ctx", "r"):ToStringTree():writeln()>
<ContextRuleFunction("$ctx", "r"):WalkListener()>
<ContextMember("$ctx", "r"):ToStringTree():writeln()>
<ContextMember("$ctx", "r"):WalkListener()>
}
: r=a ;
a : INT INT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ grammar T;

s
@after {
<ContextRuleFunction("$ctx", "r"):ToStringTree():writeln()>
<ContextRuleFunction("$ctx", "r"):WalkListener()>
<ContextMember("$ctx", "r"):ToStringTree():writeln()>
<ContextMember("$ctx", "r"):WalkListener()>
}
: r=a ;
a : INT INT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Parser

[grammar]
grammar T;
<ImportRuleInvocationStack()>

s
@init {
<BuildParseTrees()>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Parser
grammar T;
ifStatement
@after {
<AssertIsList({<ContextRuleFunction("$ctx", "elseIfStatement()")>})>
<AssertIsList({<ContextListFunction("$ctx","elseIfStatement")>})>
}
: 'if' expression
( ( 'then'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ expression

[input]
a and b

[skip]
PHP
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ root
: {0==0}? continue+ {<write("$text")>}
;

continue returns [int return]
continue returns [<IntArg("return")>]
: for for? {1==1}? #else
| break=BREAK BREAK+ (for | IF) #else
| if+=IF if+=IF* #int
| continue CONTINUE_ {<AssignLocal("$return","0")>} #class
;

args[int else] locals [int return]
args[int else] locals [<IntArg("return")>]
: for
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ ImportListener(X) ::= ""

GetExpectedTokenNames() ::= "this.GetExpectedTokens().ToString(this.Vocabulary)"

ImportRuleInvocationStack() ::= ""

RuleInvocationStack() ::= "GetRuleInvocationStackAsString()"

LL_EXACT_AMBIG_DETECTION() ::= <<Interpreter.PredictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION;>>
Expand Down Expand Up @@ -323,5 +325,8 @@ Declare_pred() ::= <<bool pred(bool v) {
Invoke_pred(v) ::= <<this.pred(<v>)>>
ParserTokenType(t) ::= "Parser.<t>"
ContextRuleFunction(ctx, rule) ::= "<ctx>.<rule>"
ContextListFunction(ctx, rule) ::= "<ctx>.<rule>()"
StringType() ::= "String"
ContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member>"
ContextMember(ctx, member) ::= "<ctx>.<member>"
SubContextLocal(ctx, subctx, local) ::= "<ctx>.<subctx>.<local>"
SubContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member>"
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ ImportListener(X) ::= ""

GetExpectedTokenNames() ::= "getExpectedTokens().toString(getVocabulary())"

ImportRuleInvocationStack() ::= ""

RuleInvocationStack() ::= "Arrays::listToString(getRuleInvocationStack(), \", \")"

LL_EXACT_AMBIG_DETECTION() ::= <<getInterpreter\<atn::ParserATNSimulator>()->setPredictionMode(atn::PredictionMode::LL_EXACT_AMBIG_DETECTION);>>
Expand Down Expand Up @@ -274,5 +276,8 @@ bool pred(bool v) {
Invoke_pred(v) ::= <<pred(<v>)>>

ContextRuleFunction(ctx, rule) ::= "<ctx>-><rule>"
ContextListFunction(ctx, rule) ::= "<ctx>-><rule>()"
StringType() ::= "std::string"
ContextMember(ctx, subctx, member) ::= "<ctx>-><subctx>-><member>"
ContextMember(ctx, member) ::= "<ctx>-><member>"
SubContextLocal(ctx, subctx, local) ::= "<ctx>-><subctx>-><local>"
SubContextMember(ctx, subctx, member) ::= "<ctx>-><subctx>-><member>"
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ ImportListener(X) ::= ""

GetExpectedTokenNames() ::= "this.expectedTokens.toString(vocabulary: this.vocabulary)"

ImportRuleInvocationStack() ::= ""

RuleInvocationStack() ::= "ruleInvocationStack"

LL_EXACT_AMBIG_DETECTION() ::= <<interpreter!.predictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION;>>
Expand Down Expand Up @@ -314,5 +316,8 @@ Invoke_pred(v) ::= <<this.pred(<v>)>>

ParserTokenType(t) ::= "Parser.<t>"
ContextRuleFunction(ctx, rule) ::= "<ctx>.<rule>"
ContextListFunction(ctx, rule) ::= "<ctx>.<rule>()"
StringType() ::= "String"
ContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>!.<member>!"
ContextMember(ctx, member) ::= "<ctx>.<member>!"
SubContextLocal(ctx, subctx, local) ::= "<ctx>.<subctx>!.<local>!"
SubContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>!.<member>!"
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ ImportListener(X) ::= ""

GetExpectedTokenNames() ::= "p.GetExpectedTokens().StringVerbose(p.GetTokenNames(), nil, false)"

ImportRuleInvocationStack() ::= ""

RuleInvocationStack() ::= "antlr.PrintArrayJavaStyle(p.GetRuleInvocationStack(nil))"

LL_EXACT_AMBIG_DETECTION() ::= <<p.Interpreter.SetPredictionMode(antlr.PredictionModeLLExactAmbigDetection);>>
Expand Down Expand Up @@ -340,5 +342,8 @@ func pred(v bool) bool {

Invoke_pred(v) ::= <<pred(<v>)>>
ContextRuleFunction(ctx, rule) ::= "<ctx>.<rule>"
ContextListFunction(ctx, rule) ::= "<ctx>.<rule>()"
StringType() ::= "string"
ContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member; format={cap}>"
ContextMember(ctx, member) ::= "<ctx>.<member>"
SubContextLocal(ctx, subctx, local) ::= "<ctx>.<subctx>.<local; format={cap}>"
SubContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member; format={cap}>"
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ ImportListener(X) ::= ""

GetExpectedTokenNames() ::= "this.getExpectedTokens().toString(this.tokenNames)"

ImportRuleInvocationStack() ::= ""

RuleInvocationStack() ::= "getRuleInvocationStack()"

LL_EXACT_AMBIG_DETECTION() ::= <<_interp.setPredictionMode(PredictionMode.LL_EXACT_AMBIG_DETECTION);>>
Expand Down Expand Up @@ -292,5 +294,8 @@ Invoke_pred(v) ::= <<this.pred(<v>)>>

ParserTokenType(t) ::= "Parser.<t>"
ContextRuleFunction(ctx, rule) ::= "<ctx>.<rule>"
ContextListFunction(ctx, rule) ::= "<ctx>.<rule>()"
StringType() ::= "String"
ContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member>"
ContextMember(ctx, member) ::= "<ctx>.<member>"
SubContextLocal(ctx, subctx, local) ::= "<ctx>.<subctx>.<local>"
SubContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member>"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
writeln(s) ::= <<console.log(<s>);>>
write(s) ::= <<process.stdout.write(<s>);>>
writeln(s) ::= <<console.log(<s> || '');>>
write(s) ::= <<process.stdout.write(<s> || '');>>
writeList(s) ::= <<console.log(<s; separator="+">);>>

False() ::= "false"
Expand Down Expand Up @@ -78,6 +78,8 @@ ImportListener(X) ::= ""

GetExpectedTokenNames() ::= "this.getExpectedTokens().toString(this.literalNames)"

ImportRuleInvocationStack() ::= ""

RuleInvocationStack() ::= "antlr4.Utils.arrayToString(this.getRuleInvocationStack())"

LL_EXACT_AMBIG_DETECTION() ::= <<this._interp.predictionMode = antlr4.atn.PredictionMode.LL_EXACT_AMBIG_DETECTION;>>
Expand Down Expand Up @@ -298,5 +300,8 @@ Declare_pred() ::= <<this.pred = function(v) {
Invoke_pred(v) ::= <<this.pred(<v>)>>
ParserTokenType(t) ::= "Parser.<t>"
ContextRuleFunction(ctx, rule) ::= "<ctx>.<rule>"
ContextListFunction(ctx, rule) ::= "<ctx>.<rule>_list()"
StringType() ::= "String"
ContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member>"
ContextMember(ctx, member) ::= "<ctx>.<member>"
SubContextLocal(ctx, subctx, local) ::= "<ctx>.<subctx>.<local>"
SubContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member>"
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ ImportListener(X) ::= ""

GetExpectedTokenNames() ::= "\$this->getExpectedTokens()->toStringVocabulary(\$this->getVocabulary())"

ImportRuleInvocationStack() ::= ""

RuleInvocationStack() ::= "'[' . \implode(', ', \$this->getRuleInvocationStack()) . ']'"

LL_EXACT_AMBIG_DETECTION() ::= <<\$this->interp->setPredictionMode(Antlr\\Antlr4\\Runtime\\Atn\\PredictionMode::LL_EXACT_AMBIG_DETECTION);>>
Expand Down Expand Up @@ -268,5 +270,8 @@ Invoke_pred(v) ::= "\$this->pred(<v>)"

ParserTokenType(t) ::= "Parser::<t>"
ContextRuleFunction(ctx, rule) ::= "<ctx>-><rule>"
ContextListFunction(ctx, rule) ::= "<ctx>-><rule>()"
StringType() ::= ""
ContextMember(ctx, subctx, member) ::= "<ctx>-><subctx>-><member>"
ContextMember(ctx, member) ::= "<ctx>-><member>"
SubContextLocal(ctx, subctx, local) ::= "<ctx>-><subctx>-><local>"
SubContextMember(ctx, subctx, member) ::= "<ctx>-><subctx>-><member>"
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ ImportListener(X) ::= ""

GetExpectedTokenNames() ::= "self.getExpectedTokens().toString(self.literalNames, self.symbolicNames)"

ImportRuleInvocationStack() ::= ""

RuleInvocationStack() ::= "str_list(self.getRuleInvocationStack())"

LL_EXACT_AMBIG_DETECTION() ::= <<self._interp.predictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION>>
Expand Down Expand Up @@ -277,5 +279,8 @@ Declare_pred() ::= <<def pred(self, v):
Invoke_pred(v) ::= <<self.pred(<v>)>>
ParserTokenType(t) ::= "Parser.<t>"
ContextRuleFunction(ctx, rule) ::= "<ctx>.<rule>"
ContextListFunction(ctx, rule) ::= "<ctx>.<rule>_list()"
StringType() ::= "String"
ContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member>"
ContextMember(ctx, member) ::= "<ctx>.<member>"
SubContextLocal(ctx, subctx, local) ::= "<ctx>.<subctx>.<local>"
SubContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member>"
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class MockListener:

GetExpectedTokenNames() ::= "self.getExpectedTokens().toString(self.literalNames, self.symbolicNames)"

ImportRuleInvocationStack() ::= ""

RuleInvocationStack() ::= "str_list(self.getRuleInvocationStack())"

LL_EXACT_AMBIG_DETECTION() ::= <<self._interp.predictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION>>
Expand Down Expand Up @@ -262,5 +264,8 @@ Declare_pred() ::= <<def pred(self, v):
Invoke_pred(v) ::= <<self.pred(<v>)>>
ParserTokenType(t) ::= "Parser.<t>"
ContextRuleFunction(ctx, rule) ::= "<ctx>.<rule>"
ContextListFunction(ctx, rule) ::= "<ctx>.<rule>_list()"
StringType() ::= "String"
ContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member>"
ContextMember(ctx, member) ::= "<ctx>.<member>"
SubContextLocal(ctx, subctx, local) ::= "<ctx>.<subctx>.<local>"
SubContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>.<member>"
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ ImportListener(X) ::= ""

GetExpectedTokenNames() ::= "try self.getExpectedTokens().toString(self.getVocabulary())"

ImportRuleInvocationStack() ::= ""

RuleInvocationStack() ::= "getRuleInvocationStack().description.replacingOccurrences(of: \"\\\"\", with: \"\")"

LL_EXACT_AMBIG_DETECTION() ::= <<_interp.setPredictionMode(PredictionMode.LL_EXACT_AMBIG_DETECTION);>>
Expand Down Expand Up @@ -299,9 +301,9 @@ func pred(_ v: Bool) -> Bool {
>>

StringType() ::= "String"

Invoke_pred(v) ::= <<self.pred(<v>)>>

ContextRuleFunction(ctx, rule) ::= "<ctx>.<rule>"

ContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>!.<member>"
ContextListFunction(ctx, rule) ::= "<ctx>.<rule>()"
ContextMember(ctx, member) ::= "<ctx>!.<member>"
SubContextLocal(ctx, subctx, local) ::= "<ctx>.<subctx>!.<local>"
SubContextMember(ctx, subctx, member) ::= "<ctx>.<subctx>!.<member>"

1 comment on commit 8a8141f

@ericvergnaud
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parrt looks fine, blessed

Please sign in to comment.