summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2019-11-28 14:05:59 -0800
committerAdrian Thurston <thurston@colm.net>2019-11-28 14:05:59 -0800
commit60606ca9d6c97900b8df0c2d10796e6f081d1973 (patch)
tree2409dd3c8081ec2e2c91c3852b5859466f4c3973
parent76bef9c90354a87bbf276f648f486d826d1dad39 (diff)
downloadcolm-60606ca9d6c97900b8df0c2d10796e6f081d1973.tar.gz
revert "exclude ? from position 2+ of literal token"
This reverts commit bd8de42f05975c262a6ecd156d8a6fbc50aa0de5.
-rw-r--r--colm.vim3
-rw-r--r--colm/colm.lm7
-rw-r--r--ragel/ragel.lm8
-rw-r--r--test/rlparse.d/ragel.lm8
-rw-r--r--test/trans.d/ragel.lm8
5 files changed, 9 insertions, 25 deletions
diff --git a/colm.vim b/colm.vim
index 29eb37b4..94ec8842 100644
--- a/colm.vim
+++ b/colm.vim
@@ -40,9 +40,8 @@ syntax match char "\\." contained
syntax match otLit "\~.*$"
syntax match otLit "'\(\\.\|[^'\\]\)*\('[i]*\)\?"
-syntax match otLit "`[^ \t\r\]?]\+"
+syntax match otLit "`[^ \t\r\]]\+"
syntax match otLit "`\]"
-syntax match otLit "`?"
"
" Other stuff
diff --git a/colm/colm.lm b/colm/colm.lm
index 51826941..446aee06 100644
--- a/colm/colm.lm
+++ b/colm/colm.lm
@@ -82,11 +82,8 @@ lex
token number
/ ( '0' .. '9' ) + /
- token backtick_lit /
- '`' . ^( ' ' | '\n' | '\t' | ']' | '?' )+ |
- '`]' |
- '`?'
- /
+ token backtick_lit
+ / '`' . ^( ' ' | '\n' | '\t' | ']' )+ | '`]' /
token DQ / '\"' / - ni
token SQ / '\'' / - ni
diff --git a/ragel/ragel.lm b/ragel/ragel.lm
index a98012ce..1325bbb3 100644
--- a/ragel/ragel.lm
+++ b/ragel/ragel.lm
@@ -284,11 +284,7 @@ namespace ragel
literal `@ `> `< `% `$
literal `from `to `eof `lerr `err
- literal `when `inwhen `outwhen
-
- token in_when /'>?'/
- token all_when /'$?'/
- token leave_when /'%?'/
+ literal `when `inwhen `outwhen `>? `$? `%?
literal `:= `|= `= `; `.. `../i `::
@@ -567,7 +563,7 @@ namespace ragel
[`@] :Finish | [`>] :Enter | [`%] :Leave | [`$] :All
def aug_cond
- [in_when] :Start1 | [all_when] :All1 | [leave_when] :Leave1
+ [`>?] :Start1 | [`$?] :All1 | [`%?] :Leave1
| [`> `when] :Start2 | [`$ `when] :All2 | [`% `when] :Leave2
| [`inwhen] :Start3 | [`when] :All3 | [`outwhen] :Leave3
diff --git a/test/rlparse.d/ragel.lm b/test/rlparse.d/ragel.lm
index eda96275..64d5bb6a 100644
--- a/test/rlparse.d/ragel.lm
+++ b/test/rlparse.d/ragel.lm
@@ -107,11 +107,7 @@ namespace ragel
literal `@ `> `< `% `$
literal `from `to `eof `lerr `err
- literal `when `inwhen `outwhen
-
- token in_when /'>?'/
- token all_when /'$?'/
- token leave_when /'%?'/
+ literal `when `inwhen `outwhen `>? `$? `%?
literal `:= `|= `= `; `.. `../i `::
@@ -281,7 +277,7 @@ namespace ragel
[`@] :Finish | [`>] :Enter | [`%] :Leave | [`$] :All
def aug_cond
- [in_when] :Start1 | [all_when] :All1 | [leave_when] :Leave1
+ [`>?] :Start1 | [`$?] :All1 | [`%?] :Leave1
| [`> `when] :Start2 | [`$ `when] :All2 | [`% `when] :Leave2
| [`inwhen] :Start3 | [`when] :All3 | [`outwhen] :Leave3
diff --git a/test/trans.d/ragel.lm b/test/trans.d/ragel.lm
index eda96275..64d5bb6a 100644
--- a/test/trans.d/ragel.lm
+++ b/test/trans.d/ragel.lm
@@ -107,11 +107,7 @@ namespace ragel
literal `@ `> `< `% `$
literal `from `to `eof `lerr `err
- literal `when `inwhen `outwhen
-
- token in_when /'>?'/
- token all_when /'$?'/
- token leave_when /'%?'/
+ literal `when `inwhen `outwhen `>? `$? `%?
literal `:= `|= `= `; `.. `../i `::
@@ -281,7 +277,7 @@ namespace ragel
[`@] :Finish | [`>] :Enter | [`%] :Leave | [`$] :All
def aug_cond
- [in_when] :Start1 | [all_when] :All1 | [leave_when] :Leave1
+ [`>?] :Start1 | [`$?] :All1 | [`%?] :Leave1
| [`> `when] :Start2 | [`$ `when] :All2 | [`% `when] :Leave2
| [`inwhen] :Start3 | [`when] :All3 | [`outwhen] :Leave3