diff options
Diffstat (limited to 'runtime/JavaScript/tests/functional/t030specialStates.g')
-rwxr-xr-x | runtime/JavaScript/tests/functional/t030specialStates.g | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/runtime/JavaScript/tests/functional/t030specialStates.g b/runtime/JavaScript/tests/functional/t030specialStates.g new file mode 100755 index 0000000..f4390d7 --- /dev/null +++ b/runtime/JavaScript/tests/functional/t030specialStates.g @@ -0,0 +1,22 @@ +grammar t030specialStates; +options { + language = JavaScript; +} + +@members { +this.recover = function(input, re) { + throw re; +}; +} + +r + : ( {this.cond}? NAME + | {!this.cond}? NAME WS+ NAME + ) + ( WS+ NAME )? + EOF + ; + +NAME: ('a'..'z') ('a'..'z' | '0'..'9')+; +NUMBER: ('0'..'9')+; +WS: ' '+; |