diff options
Diffstat (limited to 'antlr-3.4/runtime/Python/tests/t038lexerRuleLabel.g')
-rw-r--r-- | antlr-3.4/runtime/Python/tests/t038lexerRuleLabel.g | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/antlr-3.4/runtime/Python/tests/t038lexerRuleLabel.g b/antlr-3.4/runtime/Python/tests/t038lexerRuleLabel.g new file mode 100644 index 0000000..fcc1a61 --- /dev/null +++ b/antlr-3.4/runtime/Python/tests/t038lexerRuleLabel.g @@ -0,0 +1,28 @@ +lexer grammar t038lexerRuleLabel; +options { + language = Python; +} + +A: 'a'..'z' WS '0'..'9' + { + print $WS + print $WS.type + print $WS.line + print $WS.pos + print $WS.channel + print $WS.index + print $WS.text + } + ; + +fragment WS : + ( ' ' + | '\t' + | ( '\n' + | '\r\n' + | '\r' + ) + )+ + { $channel = HIDDEN } + ; + |