Skip to content

Commit f34562f

Browse files
committed
uncollide nqp's starter/stopper from rakudo's
Turns out rakudo's starter/stopper use dynvars, while rakudo's use mixins, so accidentally calling rakudo's starter/stopper greatly confuse nqp. Here we rename nqp's starter/stopper to dynstarter/dynstopper to reflect their use of dynamic vars, since there are likely to be fewer grammars derived from nqp grammars than from rakudo grammars.
1 parent fd1fefa commit f34562f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/HLL/Actions.nqp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class HLL::Actions {
173173
}
174174

175175
method quote_escape:sym<backslash>($/) { make "\\"; }
176-
method quote_escape:sym<stopper>($/) { make ~$<stopper> }
176+
method quote_escape:sym<stopper>($/) { make ~$<dynstopper> }
177177

178178
method quote_escape:sym<bs>($/) { make "\b"; }
179179
method quote_escape:sym<nl>($/) { make "\n"; }

src/HLL/Grammar.nqp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ grammar HLL::Grammar {
8282
method nulltermish() { !self.terminator && self.termish || self.nullterm_alt }
8383

8484
token quote_delimited {
85-
<starter> <quote_atom>* <stopper>
85+
<dynstarter> <quote_atom>* <dynstopper>
8686
}
8787

8888
token quote_atom {
89-
<!stopper>
89+
<!dynstopper>
9090
[
9191
| <quote_escape>
92-
| [ <-quote_escape - stopper - starter> ]+
93-
| <starter> <quote_atom>* <stopper>
92+
| [ <-quote_escape - dynstopper - dynstarter> ]+
93+
| <dynstarter> <quote_atom>* <dynstopper>
9494
]
9595
}
9696

@@ -127,7 +127,7 @@ grammar HLL::Grammar {
127127

128128
proto token quote_escape { <...> }
129129
token quote_escape:sym<backslash> { \\ \\ <?quotemod_check('q')> }
130-
token quote_escape:sym<stopper> { \\ <?quotemod_check('q')> <stopper> }
130+
token quote_escape:sym<stopper> { \\ <?quotemod_check('q')> <dynstopper> }
131131

132132
token quote_escape:sym<bs> { \\ b <?quotemod_check('b')> }
133133
token quote_escape:sym<nl> { \\ n <?quotemod_check('b')> }
@@ -324,14 +324,14 @@ position C<pos>.
324324
<?{ %*QUOTEMOD{$mod} }>
325325
}
326326

327-
method starter() {
327+
method dynstarter() {
328328
my $start := $*QUOTE_START;
329329
nqp::isconcrete($start)
330330
?? self.'!LITERAL'($start)
331331
!! self.'!cursor_start_fail'()
332332
}
333333

334-
method stopper() {
334+
method dynstopper() {
335335
my $stop := $*QUOTE_STOP;
336336
nqp::isconcrete($stop)
337337
?? self.'!LITERAL'($stop)

0 commit comments

Comments
 (0)