summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-12-16 22:46:18 -0500
committerAdrian Thurston <thurston@complang.org>2012-12-16 22:46:18 -0500
commitfdbe023431ad745bc4d96a61cc47b969980049e6 (patch)
tree06938c9deee0637d1090e4d2a6dfcf9c4c56cd56
parent7f51e7044b84504d50d3313fb11e546a0ee547cd (diff)
downloadcolm-fdbe023431ad745bc4d96a61cc47b969980049e6.tar.gz
removed lexical region name from test cases
-rw-r--r--test/accum1.lm2
-rw-r--r--test/accum2.lm2
-rw-r--r--test/accum3.lm4
-rw-r--r--test/accumbt1.lm2
-rw-r--r--test/accumbt2.lm4
-rw-r--r--test/accumbt3.lm6
-rw-r--r--test/ambig1.lm13
-rw-r--r--test/argv2.lm4
-rw-r--r--test/backtrack1.lm2
-rw-r--r--test/backtrack2.lm2
-rw-r--r--test/backtrack3.lm2
-rw-r--r--test/btscan1.lm4
-rw-r--r--test/btscan2.lm4
-rw-r--r--test/commitbt.lm2
-rw-r--r--test/concat1.lm6
-rw-r--r--test/concat2.lm6
-rw-r--r--test/construct1.lm2
-rw-r--r--test/construct2.lm2
-rw-r--r--test/construct3.lm2
-rw-r--r--test/constructex.lm2
-rw-r--r--test/context1.lm2
-rw-r--r--test/context2.lm6
-rw-r--r--test/context3.lm2
-rw-r--r--test/counting1.lm2
-rw-r--r--test/counting2.lm2
-rw-r--r--test/counting3.lm2
-rw-r--r--test/counting4.lm2
-rw-r--r--test/export1.lm2
-rw-r--r--test/func.lm2
-rw-r--r--test/generate1.lm2
-rw-r--r--test/generate2.lm4
-rw-r--r--test/heredoc.lm2
-rw-r--r--test/ignore1.lm2
-rw-r--r--test/ignore2.lm2
-rw-r--r--test/ignore3.lm4
-rw-r--r--test/island.lm4
-rw-r--r--test/lhs1.lm2
-rw-r--r--test/liftattrs.lm2
-rw-r--r--test/lookup1.lm4
-rw-r--r--test/mailbox.lm2
-rw-r--r--test/matchex.lm2
-rw-r--r--test/maxlen.lm2
-rw-r--r--test/multiregion1.lm2
-rw-r--r--test/multiregion2.lm2
-rw-r--r--test/nestedcomm.lm4
-rw-r--r--test/order1.lm4
-rw-r--r--test/order2.lm4
-rw-r--r--test/ragelambig1.lm2
-rw-r--r--test/ragelambig2.lm2
-rw-r--r--test/ragelambig3.lm2
-rw-r--r--test/ragelambig4.lm2
-rw-r--r--test/rediv.lm6
-rw-r--r--test/reparse.lm2
-rw-r--r--test/repeat1.lm2
-rw-r--r--test/repeat2.lm14
-rw-r--r--test/rhsref1.lm2
-rw-r--r--test/rubyhere.lm6
-rw-r--r--test/string.lm4
-rw-r--r--test/superid.lm2
-rw-r--r--test/tags1.lm2
-rw-r--r--test/tags2.lm8
-rw-r--r--test/tags3.lm14
-rw-r--r--test/tags4.lm14
-rw-r--r--test/til.lm2
-rw-r--r--test/translate1.lm2
-rw-r--r--test/translate2.lm4
-rw-r--r--test/travs1.lm2
-rw-r--r--test/treecmp1.lm2
-rw-r--r--test/undofrag1.lm4
-rw-r--r--test/undofrag2.lm2
-rw-r--r--test/undofrag3.lm2
71 files changed, 125 insertions, 124 deletions
diff --git a/test/accum1.lm b/test/accum1.lm
index 98d56786..4b3edb88 100644
--- a/test/accum1.lm
+++ b/test/accum1.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
ignore /space+/
literal '*', '(', ')'
diff --git a/test/accum2.lm b/test/accum2.lm
index a94434e3..ae387b27 100644
--- a/test/accum2.lm
+++ b/test/accum2.lm
@@ -4,7 +4,7 @@ context ctx
j: int
k: int
- lex start
+ lex
{
ignore /space+/
literal '*', '(', ')'
diff --git a/test/accum3.lm b/test/accum3.lm
index 84fa1500..9d19e218 100644
--- a/test/accum3.lm
+++ b/test/accum3.lm
@@ -1,4 +1,4 @@
-lex args
+lex
{
literal '-'
token file /^('-'|0)(^0)*/
@@ -7,7 +7,7 @@ lex args
token word /(^0)+/
token zero /0/
-lex opts
+lex
{
token single /[qvh]/
token with_opt /[oi]/
diff --git a/test/accumbt1.lm b/test/accumbt1.lm
index 21ca594d..fb2e9c6d 100644
--- a/test/accumbt1.lm
+++ b/test/accumbt1.lm
@@ -1,6 +1,6 @@
# Token names.
-lex start
+lex
{
token number /[0-9]+/
token id /[a-z]+/
diff --git a/test/accumbt2.lm b/test/accumbt2.lm
index 5f5f4d37..57407d65 100644
--- a/test/accumbt2.lm
+++ b/test/accumbt2.lm
@@ -1,6 +1,6 @@
context accum_bt
{
- lex one
+ lex
{
ignore /[ \t\n]+/
token id1 /[a-zA-Z_][a-zA-Z_0-9]*/
@@ -10,7 +10,7 @@ context accum_bt
OneParser: accum<one>
- lex two
+ lex
{
ignore /[ \t]+/
token id2 /[a-zA-Z_][a-zA-Z_0-9]*/
diff --git a/test/accumbt3.lm b/test/accumbt3.lm
index 82a0fe3d..38b6d3d2 100644
--- a/test/accumbt3.lm
+++ b/test/accumbt3.lm
@@ -4,7 +4,7 @@
# Any single character can be a literal
-lex start
+lex
{
# Ignore whitespace.
ignore /[ \t\n\r\v]+/
@@ -23,7 +23,7 @@ lex start
# Token translation
#
-lex nc_scan
+lex
{
literal '(', ')'
token nc_data /[^()]+/
@@ -42,7 +42,7 @@ context accum_bt
{
NestedParser: accum<nested>
- lex two
+ lex
{
ignore /[ \t]+/
token word /[a-zA-Z0-9/*+_\-]+/
diff --git a/test/ambig1.lm b/test/ambig1.lm
index 562b155f..5d7ba962 100644
--- a/test/ambig1.lm
+++ b/test/ambig1.lm
@@ -3,7 +3,7 @@
#
# The items in this scanner may have newline in front of them.
-lex start
+lex
{
# Reserved Words.
literal '__LINE__', '__FILE__', '__ENCODING__', 'BEGIN', 'END', 'alias',
@@ -51,7 +51,7 @@ lex start
}
# These items cannot appear at the beginning of a line (except maybe the first).
-lex expr_cont_ops
+lex
{
ignore /[\t ]+/
@@ -69,7 +69,8 @@ lex expr_cont_ops
literal '!=', '==', '==='
literal '..', '...'
}
-lex terms
+
+lex
{
ignore /[\t ]+/
ignore /'#' [^\n]*/
@@ -78,19 +79,19 @@ lex terms
}
-lex dstring_contents
+lex
{
token dstring_contents /[^"]+/
token tDSTRING_END /'"'/
}
-lex sstring_contents
+lex
{
token sstring_contents /[^']+/
token tSSTRING_END /'\''/
}
-lex xstring_contents
+lex
{
token xstring_contents /[^`]+/
token tXSTRING_END /'`'/
diff --git a/test/argv2.lm b/test/argv2.lm
index 7214b778..f1c045f7 100644
--- a/test/argv2.lm
+++ b/test/argv2.lm
@@ -1,10 +1,10 @@
-lex args
+lex
{
literal '-'
token file /^('-'|0)(^0)*/
}
-lex opts
+lex
{
token single /[qvh]/
token with_opt /[oi]/
diff --git a/test/backtrack1.lm b/test/backtrack1.lm
index 7fccebd8..0db2f607 100644
--- a/test/backtrack1.lm
+++ b/test/backtrack1.lm
@@ -1,6 +1,6 @@
# Token names.
-lex start
+lex
{
literal '+', '*'
token number /[0-9]+/
diff --git a/test/backtrack2.lm b/test/backtrack2.lm
index cd23fff0..821483ba 100644
--- a/test/backtrack2.lm
+++ b/test/backtrack2.lm
@@ -1,6 +1,6 @@
# Token names.
-lex start
+lex
{
token id /[a-z]+/
ignore ws /[ \t\n]+/
diff --git a/test/backtrack3.lm b/test/backtrack3.lm
index ebf55df2..773edbe9 100644
--- a/test/backtrack3.lm
+++ b/test/backtrack3.lm
@@ -1,6 +1,6 @@
# Token names.
-lex start
+lex
{
token number /[0-9]+/
token id /[a-z]+/
diff --git a/test/btscan1.lm b/test/btscan1.lm
index 8c825fd7..c9ebd6f4 100644
--- a/test/btscan1.lm
+++ b/test/btscan1.lm
@@ -1,6 +1,6 @@
namespace r1
{
- lex r1
+ lex
{
literal '!', 'a', 'b'
ignore /[ \n\t]+/
@@ -11,7 +11,7 @@ namespace r1
namespace r2
{
- lex r2
+ lex
{
literal '!'
token id /[a-zA-Z_]+/
diff --git a/test/btscan2.lm b/test/btscan2.lm
index b1d7c990..93fb5522 100644
--- a/test/btscan2.lm
+++ b/test/btscan2.lm
@@ -1,6 +1,6 @@
namespace r1
{
- lex r1
+ lex
{
literal '!', 'a', 'b'
ignore /[ \n\t]+/
@@ -11,7 +11,7 @@ namespace r1
namespace r2
{
- lex r2
+ lex
{
literal '!'
token id /[a-zA-Z_]+/
diff --git a/test/commitbt.lm b/test/commitbt.lm
index cf56d63a..c819f36c 100644
--- a/test/commitbt.lm
+++ b/test/commitbt.lm
@@ -17,7 +17,7 @@
# This test shows that a global commit with revertOn correctly does not clear
# 'parsed' items because it must entertain the possibility of backtracking.
-lex start
+lex
{
ignore /[\t\n ]+/
literal '^', '|', '-', ',', ':', '!', '?', '.'
diff --git a/test/concat1.lm b/test/concat1.lm
index 7d04f7d6..49281663 100644
--- a/test/concat1.lm
+++ b/test/concat1.lm
@@ -1,5 +1,5 @@
-lex start
+lex
{
literal 'type', 'include'
@@ -8,7 +8,7 @@ lex start
ignore /[ \t\r\n]+/
}
-lex include_file_name
+lex
{
token ifn_part /[a-zA-Z0-9_.\-]+/
token ifn_slash /'/'/
@@ -25,7 +25,7 @@ def ifn_path
literal '%%'
-lex embedded
+lex
{
token em_ws /( any - 33..126 )+/
}
diff --git a/test/concat2.lm b/test/concat2.lm
index 7d04f7d6..49281663 100644
--- a/test/concat2.lm
+++ b/test/concat2.lm
@@ -1,5 +1,5 @@
-lex start
+lex
{
literal 'type', 'include'
@@ -8,7 +8,7 @@ lex start
ignore /[ \t\r\n]+/
}
-lex include_file_name
+lex
{
token ifn_part /[a-zA-Z0-9_.\-]+/
token ifn_slash /'/'/
@@ -25,7 +25,7 @@ def ifn_path
literal '%%'
-lex embedded
+lex
{
token em_ws /( any - 33..126 )+/
}
diff --git a/test/construct1.lm b/test/construct1.lm
index f0ed72fd..6bbe5a98 100644
--- a/test/construct1.lm
+++ b/test/construct1.lm
@@ -1,7 +1,7 @@
rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/
rl number_pattern /[0-9]+/
-lex start
+lex
{
ignore /[ \t\n]+/
token id /ident_pattern/
diff --git a/test/construct2.lm b/test/construct2.lm
index 79bfe48f..c3b50367 100644
--- a/test/construct2.lm
+++ b/test/construct2.lm
@@ -1,5 +1,5 @@
-lex start
+lex
{
ignore /[ \t\n]+/
token id /[a-z]+/
diff --git a/test/construct3.lm b/test/construct3.lm
index 35c62221..b2c73b37 100644
--- a/test/construct3.lm
+++ b/test/construct3.lm
@@ -1,5 +1,5 @@
-lex start
+lex
{
ignore /[ \t\n]+/
token id /[a-z0-9]+/
diff --git a/test/constructex.lm b/test/constructex.lm
index e0ade583..8a5d284e 100644
--- a/test/constructex.lm
+++ b/test/constructex.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
token id /[a-zA-Z_][a-zA-Z0-9_]*/
literal '=', '<', '>', '/'
diff --git a/test/context1.lm b/test/context1.lm
index 3f77f38d..706e288e 100644
--- a/test/context1.lm
+++ b/test/context1.lm
@@ -4,7 +4,7 @@ context ctx
j: int
k: int
- lex start
+ lex
{
ignore /space+/
literal '*', '(', ')'
diff --git a/test/context2.lm b/test/context2.lm
index 1f83007f..c5ffc963 100644
--- a/test/context2.lm
+++ b/test/context2.lm
@@ -3,7 +3,7 @@ context ruby_here
rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/
rl number_pattern /[0-9]+/
- lex start
+ lex
{
ignore /[ \t\n]+/
token id /ident_pattern/
@@ -15,7 +15,7 @@ context ruby_here
token rest_of_line /[^\n]*'\n'/
- lex here_start
+ lex
{
ignore /[ \t\n]+/
token here_id
@@ -39,7 +39,7 @@ context ruby_here
}
}
- lex here_data
+ lex
{
token here_close_id
/ ident_pattern '\n' /
diff --git a/test/context3.lm b/test/context3.lm
index 09baeb5b..18ec41f2 100644
--- a/test/context3.lm
+++ b/test/context3.lm
@@ -4,7 +4,7 @@ context ctx
j: int
k: int
- lex start
+ lex
{
ignore /space+/
literal '*', '(', ')'
diff --git a/test/counting1.lm b/test/counting1.lm
index d4da5a67..8b961422 100644
--- a/test/counting1.lm
+++ b/test/counting1.lm
@@ -12,7 +12,7 @@ context counting
# Tokens
#
- lex start
+ lex
{
# Ignore whitespace.
ignore /rl_ws/
diff --git a/test/counting2.lm b/test/counting2.lm
index c3152721..ca43493c 100644
--- a/test/counting2.lm
+++ b/test/counting2.lm
@@ -11,7 +11,7 @@ rl rl_num /[0-9]+/
# Tokens
#
-lex start
+lex
{
# Ignore whitespace.
ignore /rl_ws/
diff --git a/test/counting3.lm b/test/counting3.lm
index 85aca30b..0914ceed 100644
--- a/test/counting3.lm
+++ b/test/counting3.lm
@@ -11,7 +11,7 @@ context counting
# Tokens
#
- lex start
+ lex
{
# Ignore whitespace.
ignore /rl_ws/
diff --git a/test/counting4.lm b/test/counting4.lm
index 817b2c56..3cd77dac 100644
--- a/test/counting4.lm
+++ b/test/counting4.lm
@@ -12,7 +12,7 @@ context counting
# Tokens
#
- lex start
+ lex
{
# Ignore whitespace.
ignore /rl_ws/
diff --git a/test/export1.lm b/test/export1.lm
index e7e8b400..f6544f87 100644
--- a/test/export1.lm
+++ b/test/export1.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
token id /[a-z]+/
ignore /[ \t]+/
diff --git a/test/func.lm b/test/func.lm
index 9ae8485c..f45970a2 100644
--- a/test/func.lm
+++ b/test/func.lm
@@ -1,5 +1,5 @@
-lex start
+lex
{
literal '{', '}'
literal 'struct', 'type'
diff --git a/test/generate1.lm b/test/generate1.lm
index 6ae842e4..0eb4279b 100644
--- a/test/generate1.lm
+++ b/test/generate1.lm
@@ -10,7 +10,7 @@ context generate
newline_sent: int
# Tokens.
- lex start
+ lex
{
# Python keywords.
literal 'and', 'del', 'from', 'not', 'while', 'as', 'elif', 'global', 'or',
diff --git a/test/generate2.lm b/test/generate2.lm
index a8b3a12e..2a8e5ca9 100644
--- a/test/generate2.lm
+++ b/test/generate2.lm
@@ -7,7 +7,7 @@ context generate
OpenStack: list<open_item>
- lex start
+ lex
{
token stray_close //
@@ -129,7 +129,7 @@ context generate
#
- lex el_prefix
+ lex
{
literal 'http:'
literal 'ftp:'
diff --git a/test/heredoc.lm b/test/heredoc.lm
index 99e75581..6355b2b0 100644
--- a/test/heredoc.lm
+++ b/test/heredoc.lm
@@ -2,7 +2,7 @@ context heredoc
{
rl ident_char /[a-zA-Z_]/
- lex start
+ lex
{
# Tokens
token other /(^(ident_char|0|'\n'))+/
diff --git a/test/ignore1.lm b/test/ignore1.lm
index 4c029354..b31ff46b 100644
--- a/test/ignore1.lm
+++ b/test/ignore1.lm
@@ -9,7 +9,7 @@ rl rl_id /[a-zA-Z_][a-zA-Z0-9_]*/
# Tokens
#
-lex start
+lex
{
literal '=', '<', '>', '/'
diff --git a/test/ignore2.lm b/test/ignore2.lm
index 5a2239d1..25053045 100644
--- a/test/ignore2.lm
+++ b/test/ignore2.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
ignore /space+/
literal '*', '(', ')'
diff --git a/test/ignore3.lm b/test/ignore3.lm
index e38eedbc..4b3ce01a 100644
--- a/test/ignore3.lm
+++ b/test/ignore3.lm
@@ -1,11 +1,11 @@
-lex start
+lex
{
ignore /space+/
literal '*', '(' ni, ni ')', '!', ';'
token id /[a-zA-Z_0-9]+/
}
-lex inner
+lex
{
ignore /space+/
token inner_t /[a-zA-Z_0-9]+/
diff --git a/test/island.lm b/test/island.lm
index 5f1bd227..74e7f1af 100644
--- a/test/island.lm
+++ b/test/island.lm
@@ -1,5 +1,5 @@
-lex function_body
+lex
{
token func_chr /[^{}]+/
token func_open /'{'/
@@ -16,7 +16,7 @@ def func_body
def func
[ident '(' ')' '{' func_body func_close ]
-lex start
+lex
{
token ident /[a-zA-Z_]+/
token number /[0-9]+/
diff --git a/test/lhs1.lm b/test/lhs1.lm
index efae68d9..fea02be0 100644
--- a/test/lhs1.lm
+++ b/test/lhs1.lm
@@ -1,5 +1,5 @@
-lex start
+lex
{
ignore /space+/
literal '*', '(', ')', '!', ';\n'
diff --git a/test/liftattrs.lm b/test/liftattrs.lm
index b4340575..6a3884f6 100644
--- a/test/liftattrs.lm
+++ b/test/liftattrs.lm
@@ -9,7 +9,7 @@ rl rl_id /[a-zA-Z_][a-zA-Z0-9_]*/
# Tokens
#
-lex start
+lex
{
literal '=', '<', '>', '/'
diff --git a/test/lookup1.lm b/test/lookup1.lm
index f1f2ead2..97aa3b46 100644
--- a/test/lookup1.lm
+++ b/test/lookup1.lm
@@ -138,7 +138,7 @@ context lookup
}
# The C++ scanner.
- lex start
+ lex
{
rl fract_const / digit* '.' digit+ | digit+ '.' /
rl exponent / [eE] [+\-]? digit+ /
@@ -1634,7 +1634,7 @@ context lookup
def class_function_definition
[function_def_declaration ctor_initializer_opt class_function_body function_def_end]
- lex cfb_conts
+ lex
{
token cfb_open /'{'/
token cfb_close /'}'/
diff --git a/test/mailbox.lm b/test/mailbox.lm
index 50da0f60..e0a891a9 100644
--- a/test/mailbox.lm
+++ b/test/mailbox.lm
@@ -1,6 +1,6 @@
# lines, and fromlines
-lex lines
+lex
{
rl day /[A-Z][a-z][a-z]/
rl month /[A-Z][a-z][a-z]/
diff --git a/test/matchex.lm b/test/matchex.lm
index ce0797f2..e6be64e0 100644
--- a/test/matchex.lm
+++ b/test/matchex.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
token id /[a-zA-Z_][a-zA-Z0-9_]*/
literal '=', '<', '>', '/'
diff --git a/test/maxlen.lm b/test/maxlen.lm
index 553fc62d..68a7c902 100644
--- a/test/maxlen.lm
+++ b/test/maxlen.lm
@@ -12,7 +12,7 @@ context maxlen
# Tokens
#
- lex start
+ lex
{
ignore /rl_ws/
token id /rl_id/
diff --git a/test/multiregion1.lm b/test/multiregion1.lm
index dd5feb63..95181c91 100644
--- a/test/multiregion1.lm
+++ b/test/multiregion1.lm
@@ -10,7 +10,7 @@ def index_stmt [index consume_line newline]
token separator_line / '='+ '\n' /
# Whitespace separated word list
-lex word_list
+lex
{
token word /[^\t \n]+/
ignore /[\t ]+/
diff --git a/test/multiregion2.lm b/test/multiregion2.lm
index c2a4312b..1b61235e 100644
--- a/test/multiregion2.lm
+++ b/test/multiregion2.lm
@@ -45,7 +45,7 @@ def request_line
token field_name /token_char+/
-lex field_value
+lex
{
token fv_plain /(^(CR|LF))*/
token fv_ext /CR LF (SP|HT)/
diff --git a/test/nestedcomm.lm b/test/nestedcomm.lm
index 02368f32..153fb1ab 100644
--- a/test/nestedcomm.lm
+++ b/test/nestedcomm.lm
@@ -3,7 +3,7 @@
#
# Any single character can be a literal
-lex start
+lex
{
# Ignore whitespace.
ignore /[ \t\n\r\v]+/
@@ -23,7 +23,7 @@ lex start
# Token translation
#
-lex nc_scan
+lex
{
literal '(', ')'
token nc_data /[^()]+/
diff --git a/test/order1.lm b/test/order1.lm
index df38888e..e965bdf2 100644
--- a/test/order1.lm
+++ b/test/order1.lm
@@ -1,5 +1,5 @@
-lex c_token_list
+lex
{
token c_single_lit /( 'L'? "'" ( [^'\\\n] | '\\' any )* "'" )/
token c_double_lit /( 'L'? '"' ( [^"\\\n] | '\\' any )* '"' )/
@@ -36,7 +36,7 @@ def c
literal '%%'
-lex start
+lex
{
literal '{', '}'
literal 'protocol', 'client', 'server', 'port', 'by', 'tcp', 'udp'
diff --git a/test/order2.lm b/test/order2.lm
index 2babef1f..e7142abb 100644
--- a/test/order2.lm
+++ b/test/order2.lm
@@ -1,5 +1,5 @@
-lex c_token_list
+lex
{
token c_single_lit /( 'L'? "'" ( [^'\\\n] | '\\' any )* "'" )/
token c_double_lit /( 'L'? '"' ( [^"\\\n] | '\\' any )* '"' )/
@@ -37,7 +37,7 @@ def c_token_list
def c
[c_token_list]
-lex start
+lex
{
literal '%%'
literal '{', '}'
diff --git a/test/ragelambig1.lm b/test/ragelambig1.lm
index 17418958..da0a6a28 100644
--- a/test/ragelambig1.lm
+++ b/test/ragelambig1.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
ignore /[\t\n ]+/
literal '^', '|', '-', ',', ':', '!', '?', '.'
diff --git a/test/ragelambig2.lm b/test/ragelambig2.lm
index adbbba0a..709271e1 100644
--- a/test/ragelambig2.lm
+++ b/test/ragelambig2.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
ignore /[\t\n ]+/
literal '^', '|', '-', ',', ':', '!', '?', '.'
diff --git a/test/ragelambig3.lm b/test/ragelambig3.lm
index 3749e428..364ffb1e 100644
--- a/test/ragelambig3.lm
+++ b/test/ragelambig3.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
ignore /[\t\n ]+/
literal '^', '|', '-', ',', ':', '!', '?', '.'
diff --git a/test/ragelambig4.lm b/test/ragelambig4.lm
index 6778eddc..75e2298e 100644
--- a/test/ragelambig4.lm
+++ b/test/ragelambig4.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
ignore /[\t\n ]+/
literal '^', '|', '-', ',', ':', '!', '?', '.'
diff --git a/test/rediv.lm b/test/rediv.lm
index 7c8b40ac..f270f6a4 100644
--- a/test/rediv.lm
+++ b/test/rediv.lm
@@ -1,5 +1,5 @@
# Or-literal scanner
-lex orlit
+lex
{
token orlit_dash /'-' /
token orlit_close /']'/
@@ -16,7 +16,7 @@ def orlit
[orlit_item*]
# Regex scanner
-lex regex
+lex
{
token orlit_open /'['/
token orlit_neg_open /'[^'/
@@ -48,7 +48,7 @@ rl s_string /"'" ([^'\\\n] | '\\' any )* "'"/
rl d_string /'"' ([^"\\\n] | '\\' any )* '"'/
# Root scanner
-lex start
+lex
{
token ident /[a-zA-Z_]+/
token number /[0-9]+/
diff --git a/test/reparse.lm b/test/reparse.lm
index 23a3dd5e..f972a497 100644
--- a/test/reparse.lm
+++ b/test/reparse.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
ignore /space+/
literal '*', '(', ')'
diff --git a/test/repeat1.lm b/test/repeat1.lm
index 704497d2..eed176f2 100644
--- a/test/repeat1.lm
+++ b/test/repeat1.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
ignore /space+/
literal '*', '(', ')'
diff --git a/test/repeat2.lm b/test/repeat2.lm
index 60c7a0d1..0a3a92da 100644
--- a/test/repeat2.lm
+++ b/test/repeat2.lm
@@ -19,7 +19,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-lex top
+lex
{
token word /( [^. \t\n]+ | '.' )/
token lws /[ \t]+/
@@ -72,19 +72,19 @@ lex top
token cmd_license /'.license' lws? '\n'/
}
-lex cmd_bar
+lex
{
token bar_data /[^|]*/
token end_bar /'|'/
}
-lex cmd_slash
+lex
{
token slash_data /[^/]*/
token end_slash /'/'/
}
-lex cmd_curly
+lex
{
token curly_data /[^}]*/
token end_curly /'}'/
@@ -103,7 +103,7 @@ def text
| [lws]
| [cmd_il]
-lex verbatim
+lex
{
token end_verbatim /lws? '.' lws? 'end' lws 'verbatim' lws? '\n'/
token verbatim_line /[^\n]* '\n'/
@@ -112,7 +112,7 @@ lex verbatim
def verbatim
[cmd_verbatim verbatim_line* end_verbatim]
-lex code
+lex
{
token end_code /lws? '.' lws? 'end' lws 'code' lws? '\n'/
token code_line /[^\n]* '\n'/
@@ -121,7 +121,7 @@ lex code
def code
[cmd_code code_line* end_code]
-lex comment
+lex
{
token end_comment /lws? '.' lws? 'end' lws 'comment' lws? '\n'/
token comment_line /[^\n]* '\n'/
diff --git a/test/rhsref1.lm b/test/rhsref1.lm
index f771bce8..bc5cbf40 100644
--- a/test/rhsref1.lm
+++ b/test/rhsref1.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
literal 'var', 'if', 'then', 'else', 'while', 'do', 'for', 'read', 'write',
'end', 'to', 'goto'
diff --git a/test/rubyhere.lm b/test/rubyhere.lm
index a36cef20..91fcc628 100644
--- a/test/rubyhere.lm
+++ b/test/rubyhere.lm
@@ -3,7 +3,7 @@ context rubyhere
rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/
rl number_pattern /[0-9]+/
- lex start
+ lex
{
ignore /[ \t\n]+/
token id /ident_pattern/
@@ -15,7 +15,7 @@ context rubyhere
token rest_of_line /[^\n]*'\n'/
- lex here_start
+ lex
{
ignore /[ \t\n]+/
token here_id
@@ -39,7 +39,7 @@ context rubyhere
}
}
- lex here_data
+ lex
{
token here_close_id
/ ident_pattern '\n' /
diff --git a/test/string.lm b/test/string.lm
index d8a33486..1d24525e 100644
--- a/test/string.lm
+++ b/test/string.lm
@@ -1,4 +1,4 @@
-lex string
+lex
{
token str_escape /'\\' any/
token str_chr /[^\\"]+/
@@ -11,7 +11,7 @@ def str_item
def string
['"' str_item* '"']
-lex start
+lex
{
token ident /[a-zA-Z_]+/
token number /[0-9]+/
diff --git a/test/superid.lm b/test/superid.lm
index f73bd839..9d8c3ffb 100644
--- a/test/superid.lm
+++ b/test/superid.lm
@@ -1,6 +1,6 @@
context si
{
- lex start
+ lex
{
literal '!', 'a', ';\n'
diff --git a/test/tags1.lm b/test/tags1.lm
index 385ba515..0730664e 100644
--- a/test/tags1.lm
+++ b/test/tags1.lm
@@ -15,7 +15,7 @@ context tags
#
# Any single character can be a literal
- lex start
+ lex
{
literal '!\n', ';\n'
diff --git a/test/tags2.lm b/test/tags2.lm
index a4e55abc..58dcc789 100644
--- a/test/tags2.lm
+++ b/test/tags2.lm
@@ -26,7 +26,7 @@ rl char_ref_pat / '&#' [0-9]+ ';' | '&0x' [0-9a-fA-F]+ ';' /
#
# Single quotes.
#
-lex sq
+lex
{
token sq_close /'\''/
@@ -49,7 +49,7 @@ lex sq
#
# Double quotes.
#
-lex dq
+lex
{
token dq_close /'"'/
@@ -72,7 +72,7 @@ lex dq
#
# Tag elements.
#
-lex tag
+lex
{
literal '\'', '\"', '=', '\/'
@@ -90,7 +90,7 @@ literal '>'
#
# Top Level
#
-lex start
+lex
{
#
# Comments
diff --git a/test/tags3.lm b/test/tags3.lm
index 1cf09fa8..7cd7f03f 100644
--- a/test/tags3.lm
+++ b/test/tags3.lm
@@ -10,7 +10,7 @@ context tags
#
# Scanner for tag names.
#
- lex TAG_NAME
+ lex
{
ignore /space+/
token tag_id /def_name/
@@ -19,7 +19,7 @@ context tags
#
# Scanner for attributes names
#
- lex ATTR_NAME
+ lex
{
ignore /space+/
token attr_name /def_name_char+/
@@ -27,7 +27,7 @@ context tags
}
# Scanner for attribute values.
- lex ATTR_VAL
+ lex
{
ignore /space+/
token dquote_val /'"' ([^"] | '\\' any)* '"'/
@@ -41,7 +41,7 @@ context tags
# Tokens
#
- lex START
+ lex
{
ignore /space+/
literal '<', '</', '<!DOCTYPE'
@@ -55,7 +55,7 @@ context tags
# This scanner is just for the id in close tags. The id needs to be looked up
# in the tag stack so we can determine if it is a stray.
- lex close_id
+ lex
{
# Ignore whitespace.
ignore /space+/
@@ -94,7 +94,7 @@ context tags
# Document Type
#
# This scanner handles inside DOCTYPE tags (except keywords).
- lex DOCTYPE
+ lex
{
ignore /space+/
token dt_name /def_name/
@@ -106,7 +106,7 @@ context tags
# Using a separate scanner for the keywords in DOCTYPE prevents them from
# covering dt_name
- lex DOCTYPE_KW
+ lex
{
ignore /space+/
literal 'SYSTEM', 'PUBLIC'
diff --git a/test/tags4.lm b/test/tags4.lm
index 6d192ce4..0e01ee8d 100644
--- a/test/tags4.lm
+++ b/test/tags4.lm
@@ -18,7 +18,7 @@ context tags
#
# Scanner for tag names.
#
- lex TAG_NAME
+ lex
{
ignore /space+/
token tag_id /def_name/
@@ -27,7 +27,7 @@ context tags
#
# Scanner for attributes names
#
- lex ATTR_NAME
+ lex
{
ignore /space+/
token attr_name /def_name_char+/
@@ -37,7 +37,7 @@ context tags
literal '>', '/>'
# Scanner for attribute values.
- lex ATTR_VAL
+ lex
{
ignore /space+/
token dquote_val /'"' ([^"] | '\\' any)* '"'/
@@ -49,7 +49,7 @@ context tags
# Tokens
#
- lex START
+ lex
{
ignore /space+/
@@ -77,7 +77,7 @@ context tags
# This scanner is just for the id in close tags. The id needs to be looked up
# in the tag stack so we can determine if it is a stray.
- lex close_id
+ lex
{
# Ignore whitespace.
ignore /space+/
@@ -130,7 +130,7 @@ context tags
# Document Type
#
# This scanner handles inside DOCTYPE tags (except keywords).
- lex DOCTYPE
+ lex
{
ignore /space+/
token dt_name /def_name/
@@ -141,7 +141,7 @@ context tags
# Using a separate scanner for the keywords in DOCTYPE prevents them from
# covering dt_name
- lex DOCTYPE_KW
+ lex
{
ignore /space+/
literal 'SYSTEM', 'PUBLIC'
diff --git a/test/til.lm b/test/til.lm
index d5bc7d28..04563ae7 100644
--- a/test/til.lm
+++ b/test/til.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
literal 'var', 'if', 'then', 'else', 'while', 'do', 'for', 'read', 'write',
'end', 'to', 'goto'
diff --git a/test/translate1.lm b/test/translate1.lm
index 96be33a1..6de3af85 100644
--- a/test/translate1.lm
+++ b/test/translate1.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
ignore /space+/
literal '*', '(', ')'
diff --git a/test/translate2.lm b/test/translate2.lm
index 61630757..bb0d88e8 100644
--- a/test/translate2.lm
+++ b/test/translate2.lm
@@ -1,4 +1,4 @@
-lex start2
+lex
{
ignore /space+/
literal '#', '{', '}'
@@ -15,7 +15,7 @@ def start2
context ctx
{
- lex start
+ lex
{
ignore /space+/
literal '*', '(', ')', '!', ';\n'
diff --git a/test/travs1.lm b/test/travs1.lm
index 88986629..20145ac9 100644
--- a/test/travs1.lm
+++ b/test/travs1.lm
@@ -1,4 +1,4 @@
-lex start
+lex
{
ignore /[\t\n ]+/
literal '^', '|', '-', ',', ':', '!', '?', '.'
diff --git a/test/treecmp1.lm b/test/treecmp1.lm
index 2fd40cb5..c7fcc028 100644
--- a/test/treecmp1.lm
+++ b/test/treecmp1.lm
@@ -1,7 +1,7 @@
rl ident_pattern /[a-zA-Z_][a-zA-Z_0-9]*/
rl number_pattern /[0-9]+/
-lex start
+lex
{
ignore /[ \t\n]+/
token id /ident_pattern/
diff --git a/test/undofrag1.lm b/test/undofrag1.lm
index 082d4d71..117b635f 100644
--- a/test/undofrag1.lm
+++ b/test/undofrag1.lm
@@ -1,4 +1,4 @@
-lex start2
+lex
{
ignore /space+/
literal '#', '{', '}'
@@ -17,7 +17,7 @@ context ctx
{
SP: parser<start2>
- lex start1
+ lex
{
ignore /space+/
literal '*', '(', ')', '!', ';\n'
diff --git a/test/undofrag2.lm b/test/undofrag2.lm
index e20fd431..b65b17ce 100644
--- a/test/undofrag2.lm
+++ b/test/undofrag2.lm
@@ -1,6 +1,6 @@
context undo
{
- lex start
+ lex
{
ignore /[ \t]+/
literal '*', '(', ')', '^', ';', '\n'
diff --git a/test/undofrag3.lm b/test/undofrag3.lm
index 974a4c7a..c7066fa7 100644
--- a/test/undofrag3.lm
+++ b/test/undofrag3.lm
@@ -1,6 +1,6 @@
context undo
{
- lex start
+ lex
{
ignore /[ \t]+/
literal '*', '(', ')', '^', ';', '\n', '.'