summaryrefslogtreecommitdiff
path: root/test/java2.rl
diff options
context:
space:
mode:
Diffstat (limited to 'test/java2.rl')
-rw-r--r--test/java2.rl51
1 files changed, 51 insertions, 0 deletions
diff --git a/test/java2.rl b/test/java2.rl
new file mode 100644
index 0000000..61d9ac9
--- /dev/null
+++ b/test/java2.rl
@@ -0,0 +1,51 @@
+/*
+ * @LANG: java
+ * @ALLOW_GENFLAGS: -T0
+ */
+
+class java2
+{
+ %%{
+ machine java1;
+ alphtype int;
+
+ main := 1 2 3 4 (
+ 5 6 7 8 |
+ 9 10 11 12
+ ) 1073741824;
+
+ }%%
+
+ %% write data;
+
+ static void test( int data[] )
+ {
+ int cs, p = 0, pe = data.length;
+ int top;
+
+ %% write init;
+ %% write exec;
+
+ if ( cs >= java1_first_final )
+ System.out.println( "ACCEPT" );
+ else
+ System.out.println( "FAIL" );
+ }
+
+ static final int t1[] = { 1, 2, 3, 4, 5, 6, 7, 8, 1073741824 };
+ static final int t2[] = { 1, 2, 3, 4, 9, 10, 11, 12, 1073741824 };
+ static final int t3[] = { 1, 2, 3, 4, 1073741824 };
+
+ public static void main( String args[] )
+ {
+ test( t1 );
+ test( t2 );
+ test( t3 );
+ }
+}
+
+/* _____OUTPUT_____
+ACCEPT
+ACCEPT
+FAIL
+*/