Added tests for grouping t#09
This commit is contained in:
@ -15,7 +15,7 @@ ID [A-Za-z_][0-9A-Za-z_]*
|
||||
DIGIT [0-9]
|
||||
CHAR \\n|\\t|\\'|[^'\n\t\\]
|
||||
/* char can be a newline, tab, an escaped quote, or anything but a single quote, an actual line break, an actual tab, or a backslash by itself (to prevent confusion from escaped quote */
|
||||
SCHAR \\n|\\t|\\\"|[^\"\n\\]
|
||||
SCHAR \\n|\\t|\\\"|[^\"\n\\]
|
||||
/* similar to above, a string Char (SCHAR) is the same as a CHAR except we cannot have double quotes instead of single quotes. Double quotes need to be escaped in Flex unlike single quotes based on documentation */
|
||||
|
||||
%%
|
||||
@ -79,4 +79,4 @@ int main( int argc, char **argv )
|
||||
else
|
||||
yyin = stdin;
|
||||
yylex();
|
||||
}
|
||||
}
|
||||
|
35
tests/test_punctuation_grouping.alpha
Normal file
35
tests/test_punctuation_grouping.alpha
Normal file
@ -0,0 +1,35 @@
|
||||
)
|
||||
a)
|
||||
)a
|
||||
)*
|
||||
*)
|
||||
(
|
||||
a(
|
||||
(a
|
||||
(*
|
||||
*(
|
||||
|
||||
|
||||
{
|
||||
a{
|
||||
{a
|
||||
{*
|
||||
*{
|
||||
}
|
||||
a}
|
||||
}a
|
||||
}*
|
||||
*}
|
||||
|
||||
|
||||
|
||||
[
|
||||
a[
|
||||
[a
|
||||
[*
|
||||
*[
|
||||
]
|
||||
a]
|
||||
]a
|
||||
]*
|
||||
*]
|
Reference in New Issue
Block a user