You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2017/05/08 00:27:03 UTC

[03/17] groovy git commit: rename antlr4 parser to remove groovy- prefix since that is by convention for modules

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_01.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_01.groovy b/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_01.groovy
new file mode 100644
index 0000000..ed0f67d
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_01.groovy
@@ -0,0 +1,62 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+enum AAAA {}
+public enum AAAA2 {}
+public enum AAAA3 implements A {}
+@Test2
+public enum AAAA4 implements A,B {}
+enum BBBB {A}
+enum CCCC {A, B}
+enum DDDD {A, B,}
+enum EEEE {
+    A,
+    B}
+enum FFFF {
+    A,
+    B,}
+enum GGGG
+{A,
+B,}
+
+enum E1 {
+    A(111,'aa'), B(222,'bb')
+}
+
+@Test2
+enum E2 {
+    A2,
+    B2,C2,
+    D2
+    private void a() {}
+    def c;
+}
+
+enum E3 {
+    A(1), B(2)
+
+    public static final String SOME_CONSTANT = '123';
+    private String name;
+    private int age = 2;
+    String title = "title"
+    public E9(int x) {}
+}
+
+
+
+enum e {}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_02.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_02.groovy b/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_02.groovy
new file mode 100644
index 0000000..a5768db
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_02.groovy
@@ -0,0 +1,70 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+enum E {
+    A() {}, B(1) {{}},
+    C(1, 2) {
+        public void prt() {
+            println "$x, $y"
+        }
+
+        void prt2() {
+            println "$x, $y"
+        }
+
+        @Test2 prt3() {
+            println "$x, $y"
+        }
+
+        private void prt4() {
+            println "$x, $y"
+        }
+
+        private prt5() {
+            println "$x, $y"
+        }
+    },
+    D {
+        void hello() {}
+    }
+
+    protected int x;
+    protected int y;
+
+    E() {}
+    E(int x) {
+        this.x = x;
+    }
+    E(int x, y) {
+        this(x)
+        this.y = y;
+    }
+
+    void prt() {
+        println "123"
+    }
+}
+
+enum F {
+    @Test2
+    A
+}
+
+enum G implements I<T> {
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_03.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_03.groovy b/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_03.groovy
new file mode 100644
index 0000000..27d3621
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_03.groovy
@@ -0,0 +1,24 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+enum H {
+    SOME_ENUM_CONSTANT0(a: "0"),
+    SOME_ENUM_CONSTANT1(a: "0") {},
+    SOME_ENUM_CONSTANT2(a: "1", b: "2"),
+    SOME_ENUM_CONSTANT3(c: "3", d: "4") {}
+}

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_04.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_04.groovy b/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_04.groovy
new file mode 100644
index 0000000..b923828
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_04.groovy
@@ -0,0 +1,22 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+enum ListEnum1 {
+    ONE([111, 222])
+    ListEnum1(Object listArg){}
+}

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_05.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_05.groovy b/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_05.groovy
new file mode 100644
index 0000000..bdeb296
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/EnumDeclaration_05.groovy
@@ -0,0 +1,22 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+enum ListEnum1 {
+    ONE([111, 222]) {}
+    ListEnum1(Object listArg){}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_01.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_01.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_01.groovy
new file mode 100644
index 0000000..575439a
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_01.groovy
@@ -0,0 +1,248 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+-1
+-12
+-123
+
+-1.2
+-1.2f
+-1.2F
+-1.2d
+-1.2D
+-1.2g
+-1.2G
+
+-0x1234567890abcdef
+-0X1234567890ABCDEF
+-0x1234567890abcdefi
+-0x1234567890abcdefl
+-0x1234567890abcdefg
+-0x1234567890abcdefI
+-0x1234567890abcdefL
+-0x1234567890abcdefG
+-0xabcdef
+-0xABCDEF
+-0xABCDEF
+-0xabcdef
+-0xABCDEF
+
+-01234567
+-01234567
+-01234567
+-01234567i
+-01234567l
+-01234567g
+-01234567I
+-01234567L
+-01234567G
+
+-1__2
+-2_12_3
+-2__12__3
+-2__12__3.1__2
+-2__12__3.1__2
+-12e10
+-12e-10
+-12e10
+-12e-10
+-12.12e10
+-12.12e-10
+-12.12e10
+-12.12e-10
+-12.12e-10f
+-12.12e-10d
+-12.12e-10g
+-12e-10F
+-120e-10D
+-11F
+-12D
+-1.1F
+-1.2D
+-12e-10G
+-12.1__2e-10f
+-12.1_2e-10d
+-1__12_2.12e-10g
+-0xab__cdef
+-0xAB__CD_EF
+-012__34567L
+
+-0b010101
+-0B10101011
+
++1
++12
++123
+
++1.2
++1.2f
++1.2F
++1.2d
++1.2D
++1.2g
++1.2G
+
++0x1234567890abcdef
++0X1234567890ABCDEF
++0x1234567890abcdefi
++0x1234567890abcdefl
++0x1234567890abcdefg
++0x1234567890abcdefI
++0x1234567890abcdefL
++0x1234567890abcdefG
++0xabcdef
++0xABCDEF
++0xABCDEF
++0xabcdef
++0xABCDEF
+
++01234567
++01234567
++01234567
++01234567i
++01234567l
++01234567g
++01234567I
++01234567L
++01234567G
+
++1__2
++2_12_3
++2__12__3
++2__12__3.1__2
++2__12__3.1__2
++12e10
++12e-10
++12e10
++12e-10
++12.12e10
++12.12e-10
++12.12e10
++12.12e-10
++12.12e-10f
++12.12e-10d
++12.12e-10g
++12e-10F
++120e-10D
++11F
++12D
++1.1F
++1.2D
++12e-10G
++12.1__2e-10f
++12.1_2e-10d
++1__12_2.12e-10g
++0xab__cdef
++0xAB__CD_EF
++012__34567L
+
++0b010101
++0B10101011
+
+~1
+~12
+~123
+
+~1.2
+~1.2f
+~1.2F
+~1.2d
+~1.2D
+~1.2g
+~1.2G
+
+~0x1234567890abcdef
+~0X1234567890ABCDEF
+~0x1234567890abcdefi
+~0x1234567890abcdefl
+~0x1234567890abcdefg
+~0x1234567890abcdefI
+~0x1234567890abcdefL
+~0x1234567890abcdefG
+~0xabcdef
+~0xABCDEF
+~0xABCDEF
+~0xabcdef
+~0xABCDEF
+
+~01234567
+~01234567
+~01234567
+~01234567i
+~01234567l
+~01234567g
+~01234567I
+~01234567L
+~01234567G
+
+~1__2
+~2_12_3
+~2__12__3
+~2__12__3.1__2
+~2__12__3.1__2
+~12e10
+~12e-10
+~12e10
+~12e-10
+~12.12e10
+~12.12e-10
+~12.12e10
+~12.12e-10
+~12.12e-10f
+~12.12e-10d
+~12.12e-10g
+~12e-10F
+~120e-10D
+~11F
+~12D
+~1.1F
+~1.2D
+~12e-10G
+~12.1__2e-10f
+~12.1_2e-10d
+~1__12_2.12e-10g
+~0xab__cdef
+~0xAB__CD_EF
+~012__34567L
+
+~0b010101
+~0B10101011
+
+!true
+!false
+
++a
+-a
+
+++a
+--a
+
+int[]
+String[]
+String[][]
+
+
+1
+2147483647
+2147483648
+9223372036854775807
+9223372036854775808
+-1
+-2147483648
+-2147483649
+-9223372036854775808

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_02.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_02.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_02.groovy
new file mode 100644
index 0000000..5a65f87
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_02.groovy
@@ -0,0 +1,24 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+assert (1)
+assert (
+        1)
+assert (
+        1
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_03.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_03.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_03.groovy
new file mode 100644
index 0000000..f5c3819
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_03.groovy
@@ -0,0 +1,49 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+1 + 2 + 3
+'a' + 'b' + 'c'
+10 - 2 + 3 - 5 + 6 + 7
+++a + 1 - --b - 6 + ++c + 'a' + 2 - 3
+++a +
+        1 -
+        --b -
+        6 +
+        ++c +
+        'a' +
+        2 *
+        3 +
+        a++ -
+        a--
+
+1 * 2 / 3 % 4
+1 *
+        2 /
+        3 %
+        4
+
+
+1 ** 2 ** 3
+1 **
+        2 **
+        3
+
+1 + 2 * 3 - 4 / 5 + 6 % 7 - 8 ** 9
+
+
+

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_04.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_04.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_04.groovy
new file mode 100644
index 0000000..e8c72e0
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_04.groovy
@@ -0,0 +1,80 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+a = 1
+a = b = 1
+left >>>= 16
+left >>= 8
+left <<= 2
+sum += sup
+cantlive -= you
+times *= me
+times **= me
+slash /= nstore
+your |= me
+here %= sometimes
+water ^= oil
+a &= that
+
+a = e f g h
+a = b *= c += d %= e f g h
+
+obj.name = '123'
+m().result = 123
+map[a] = 1
+map['a'] = 1
+map["$a"] = 1
+map[a.b] = 1
+map[a()] = 1
+map[obj.a()] = 1
+map[a().result] = 1
+map[a + b] = 1
+obj.prop[0][1] = 'a'
+this = someValue;
+super = someValue;
+
+list[0] = 1
+list[1, 2] = [11, 22]
+
+(a)         = [1]
+(a)         = x++
+(a)         = (SomeType)x++
+(a)         = obj.m()
+(a)         = [1]
+(a)         = [1] + [2]
+(a, b)      = [1, 2]
+(a, b, c)   = [1, 2, 3]
+
+(obj) =
+        a =
+              b =
+                left >>>=
+                        left >>=
+                                left <<=
+                                        sum +=
+                                                cantlive -=
+                                                        times *=
+                                                                times **=
+                                                                        slash /=
+                                                                                your |=
+                                                                                        here %=
+                                                                                                water ^=
+                                                                                                        a &=
+                                                                                                                that =
+                                                                                                                        x y z
+

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_05.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_05.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_05.groovy
new file mode 100644
index 0000000..d195b10
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_05.groovy
@@ -0,0 +1,58 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+true ?: 'a'
+
+true
+?: 'a'
+
+true
+?:
+'a'
+
+true ? 'a' : 'b'
+
+true ?
+        'a'
+        :
+        'b'
+
+true ?
+        'a'
+        :
+        true ?: 'b'
+
+true ?
+        'a'
+        :
+        true ? 'b' : 'c'
+
+true ?: true ?: 'a'
+
+1 == 2 ?: 3
+1 == 2 ? 3 : 4
+
+1 == 2 || 1 != 3 && !(1 == 6)
+    ? 2 > 3 && 3 >= 1
+        ? 4 < 5 && 2 <= 9 ?: 6 ^ 8 | 9 & 10
+        : 8 * 2 / (3 % 4 + 6) - 2
+    : 9
+
+
+bar = 0 ? "moo"         \
+              : "cow"

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_06.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_06.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_06.groovy
new file mode 100644
index 0000000..debea2c
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_06.groovy
@@ -0,0 +1,24 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+true && false || true && false || true
+true &&
+        false ||
+        true &&
+        false ||
+        true

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_07.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_07.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_07.groovy
new file mode 100644
index 0000000..9474f18
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_07.groovy
@@ -0,0 +1,27 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+1 | 2 ^ 3 & 4 | 5 ^ 6 & 7 | 8
+1 |
+        2 ^
+        3 &
+        4 |
+        5 ^
+        6 &
+        7 |
+        8
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_08.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_08.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_08.groovy
new file mode 100644
index 0000000..108e1b0
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_08.groovy
@@ -0,0 +1,24 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+a =~ /abc/
+a =~
+        /abc/
+b ==~ /abc/
+b ==~
+        /abc/

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_09.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_09.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_09.groovy
new file mode 100644
index 0000000..98b7e95
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_09.groovy
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+1 == 1 != 2 == 3 != 4 <=> 5 == 6 != 7
+1 ==
+        1 !=
+        2 ==
+        3 !=
+        4 <=>
+        5 ==
+        6 !=
+        7
+2 == 3 != 4 <=> 5
+
+
+        2 ==
+        3 !=
+        4 <=>
+        5

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_10.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_10.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_10.groovy
new file mode 100644
index 0000000..bdd8c7a
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_10.groovy
@@ -0,0 +1,43 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+1 < 2
+1 <
+        2
+2 <= 2
+2 <=
+        2
+2 >= 2
+2 >=
+        2
+2 > 1
+2 >
+        1
+1 in [1, 2, 3]
+1 in
+        [1, 2, 3]
+
+'abc' instanceof String
+'abc' instanceof
+        String
+'abc' as String
+'abc' as
+        String
+
+
+1 < 2 && 2 <= 2 | 2 >= 2 && (2 > 1 || 1 == 1) & (1 != 2 || 1 ^ 2 && 1 <=> 2) && 1 in [1, 2, 3] && 'abc' as String || 'abc' instanceof String
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_11.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_11.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_11.groovy
new file mode 100644
index 0000000..2030a4a
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_11.groovy
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+1 << 2
+1 <<
+        2
+1 >> 2
+1 >>
+        2
+1 >>> 3
+1 >>>
+        3
+
+1..2
+1..
+        2
+1..<2
+1..<
+        2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_12.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_12.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_12.groovy
new file mode 100644
index 0000000..d7c4042
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_12.groovy
@@ -0,0 +1,35 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+!true
+!
+        true
+~1
+~
+        1
+(String)'abc'
+(int) obj.someMethod()
+(int) (obj.someMethod())
+(int) 1 / 2
+1 / (int) 2
+(int) a++
+(int) a--
+(int) ++a
+(int) --a
+(int) ~123
+(boolean) !false
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_13.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_13.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_13.groovy
new file mode 100644
index 0000000..b092c64
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_13.groovy
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+!5
+~5
+-5
++5
+-a
++a
+
+5+5
++(+5)
+-(-5)
++(-5)
+-(+5)
+
+5 + 10
+5 - 10
+5 * 10
+5 / 10
+5 % 10
+5 ** 10
+
+5--
+5++
+--5
+++5
+
+5 >> 10
+5 >>> 10
+5 << 10
+5 > 10
+5 < 10
+
+5 ^ 10
+
+5 | 10
+5 & 10
+
+5 || 10
+5 && 10
+5 ==  10
+5 !=  10
+5 <=>  10
+
+5..10
+5..10
+5..<10 > 1..3

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_14.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_14.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_14.groovy
new file mode 100644
index 0000000..f7f1ef0
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_14.groovy
@@ -0,0 +1,40 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+a = java.lang.Integer
+a = java.lang.Integer.class
+a = Integer
+a = Integer.class
+a = void
+a = void.class
+a = boolean
+a = boolean.class
+a = byte
+a = byte.class
+a = char
+a = char.class
+a = short
+a = short.class
+a = int
+a = int.class
+a = float
+a = float.class
+a = long
+a = long.class
+a = double
+a = double.class
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_15.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_15.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_15.groovy
new file mode 100644
index 0000000..bab67fa
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_15.groovy
@@ -0,0 +1,145 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+person.@name
+person.child.@name
+person.@name.count
+person.&sayHello
+person.child.&sayHello
+person?.child
+person?.@child
+person*.child
+person*.@child
+person.'name'
+person.@'name'
+person?.'name'
+person?.@'name'
+person*.'child'
+person*.@'child'
+person.&'sayHello'
+person.new
+person.@new
+person?.new
+person?.@new
+person*.new
+person*.@new
+person.&new
+person."$name"
+person.@"$name"
+person?."$name"
+person?.@"$name"
+person*."$name"
+person*.@"$name"
+person.&"$methodName"
+person.("$firstname" + "$lastname")
+person.@("$firstname" + "$lastname")
+person?.("$firstname" + "$lastname")
+person?.@("$firstname" + "$lastname")
+person*.("$firstname" + "$lastname")
+person*.@("$firstname" + "$lastname")
+person.&("$method" + "$name")
+
+a.b?.c[1, 2, 3]*.d
+a[1, *[2, 3]]*.b
+a[*[2, 3]]*.b
+
+person
+*.
+child
+*.
+@child
+?.
+child
+?.
+@child
+.
+child
+        .
+@name
+.&
+length
+
+a.b()
+a.'b'()
+a."$b"()
+a?.b()
+a*.b()
+a()
+'a'()
+"$a"()
+
+obj.a
+    .b()
+    ?.c()
+    *.d()
+
+obj.a(1, 2)
+a(1, 2)
+
+obj.a(x: 1, y: 2)
+a(x: 1, y: 2)
+
+a.@b()
+a.@b(1, 2, 3)
+a?.@b()
+a?.@b(1, 2, 3)
+a*.@b()
+a*.@b(1, 2, 3)
+
+a.<Integer>b(1, 2)
+
+a
+        .
+<Integer>b(1, 2)
+
+a.<Integer, String>b(1, '2')
+a?.<Integer, String>b(1, '2')
+a*.<Integer, String>b(1, '2')
+obj?.a*.<
+        Integer,
+        String
+        >b(1, '2')
+
+String[] codes = [
+        className + '.' + propertyName + '.typeMismatch.error',
+        className + '.' + propertyName + '.typeMismatch',
+        classAsPropertyName + '.' + propertyName + '.typeMismatch.error',
+        classAsPropertyName + '.' + propertyName + '.typeMismatch',
+        bindingResult.resolveMessageCodes('typeMismatch', propertyName)
+].flatten() as String[]
+
+
+person*.child[1, 2 + 6, *[3, 4]]*.@child*.@child()?.@child().@child()?.child?.@child.child.getChild().getChild(1, 2).getChild(name: 'a', age: 2).'child'."$child".('chi' + 'ld').@name.class.&equals
+
+
+(obj.x)()
+(obj.@x)()
+
+
+static.unused = { -> }
+
+ResolveOptions resolveOptions = new ResolveOptions()\
+            .setConfs(['default'] as String[])\
+            .setOutputReport(false)\
+            .setValidate(args.containsKey('validate') ? args.validate : false)
+
+new A("b") C.d()
+
+m()()
+
+a = {a,b-> }()

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_16.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_16.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_16.groovy
new file mode 100644
index 0000000..58e7b0a
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_16.groovy
@@ -0,0 +1,40 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+this
+super
+this.name
+super.name
+
+
+def x = {->}()
+x = {a, b -> a + b }(1, 2)
+
+void()
+void(1, 2)
+void(1, 2) {
+
+}
+void(x: 1, y: 2)
+void(x: 1, y: 2) {
+
+}
+
+use(String) {
+}
+

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_17.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_17.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_17.groovy
new file mode 100644
index 0000000..89309fb
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_17.groovy
@@ -0,0 +1,159 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+a.m(x: 1, y: 2) {
+    println('named arguments');
+}
+
+a.m(x: 1, y: 2, z: 3) {
+    println('named arguments');
+} {
+    println('named arguments');
+}
+
+
+a.m(x: 1, y: 2, z: 3)
+
+{
+    println('named arguments');
+}
+
+{
+    println('named arguments');
+}
+
+
+
+a.m(1, 2) {
+    println('normal arguments');
+}
+
+a.m(1, 2, 3) {
+    println('normal arguments');
+} {
+    println('normal arguments');
+}
+
+a.m(1, 2, 3)
+
+{
+    println('normal arguments');
+}
+
+
+{
+    println('normal arguments');
+}
+
+
+
+
+m {
+    println('closure arguments');
+}
+
+m {
+    println('closure arguments');
+} {
+    println('closure arguments');
+}
+
+m {
+    println('closure arguments');
+} {
+    println('closure arguments');
+} {
+    println('closure arguments');
+}
+
+
+m
+
+{
+    println('closure arguments');
+}
+
+{
+    println('closure arguments');
+}
+
+{
+    println('closure arguments');
+}
+
+'m' {
+    println('closure arguments');
+}
+
+
+1 {
+
+}
+1.1 {
+
+}
+
+-1 {
+
+}
+
+-1.1 {
+
+}
+
+1()
+1.1()
+1(1, 2, 3)
+1.1(1, 2, 3)
+-1()
+-1.1()
+-1(1, 2, 3)
+-1.1(1, 2, 3)
+
+1(1, 2) {
+
+}
+
+1.1(1, 2) {
+
+}
+
+-1(1, 2) {
+
+}
+
+-1.1(1, 2) {
+
+}
+
+hello(x: 1, y: 2, z: 3)
+hello('a', 'b')
+hello(x: 1, 'a', y: 2, 'b', z: 3)
+hello('c', x: 1, 'a', y: 2, 'b', z: 3)
+
+
+A[x: 1, y: 2]
+A[*: someMap]
+A[*: someMap, z: 3]
+A[w: 0, *: someMap]
+A[*: [x: 1, y: 2]]
+A[*: [x: 1, y: 2], z: 3]
+A[w: 0, *: [x: 1, y: 2]]
+
+SomeMethod(a, b)
+

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_18.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_18.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_18.groovy
new file mode 100644
index 0000000..5a8cc37
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_18.groovy
@@ -0,0 +1,44 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+1 > 2 ? 'y' : 'n'
+1 >= 2 ? 'y' : 'n'
+1 < 2 ? 'y' : 'n'
+1 <= 2 ? 'y' : 'n'
+1 == 2 ? 'y' : 'n'
+1 != 2 ? 'y' : 'n'
+
+p29 = 1 > 2 ? /ab/ : /cd/
+p30=++a == b[2].next()
+p31=a <=> b == a.compareTo(b)
+p32 = 1 in [1, 2, 3] == 1 instanceof Integer
+p33 = 1-2+3
+p34 = 1+2-3
+p35 = 1*2/3
+p36 = 1/2*3
+p37 = 1*2%3
+p38 = 1%2*3
+p39 = 1/2%3
+p40 = 1%2/3
+p41 = 1+2+3
+p42 = 1-2-3
+p43 = 1*2*3
+p44 = 1/2/3
+p45 = 1%2%3
+p46 = 1-2*3+4/5-6%7-8-9+10/11*12-13+14+15-16%17%18/19/20*21*22
+

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_19.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_19.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_19.groovy
new file mode 100644
index 0000000..3f893a6
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_19.groovy
@@ -0,0 +1,50 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+List list = new ArrayList();
+List list2 = new java.util.ArrayList();
+List<String> list3 = new ArrayList<String>();
+List<String> list4 = new java.util.ArrayList<String>();
+List<String> list5 = new ArrayList<>();
+//List<String> list6 = new java.util.ArrayList<>(); // the old parser can not parse "new java.util.ArrayList<>()"
+def x = new A<EE, TT>();
+int[] a = new int[10];
+int[][] b = new int[length()][2 * 8];
+ArrayList[] c = new ArrayList[10];
+ArrayList[][] cc = new ArrayList[10][size()];
+java.util.ArrayList[] d = new java.util.ArrayList[10];
+ArrayList[] e = new ArrayList<String>[10];
+java.util.ArrayList[] f = new java.util.ArrayList<String>[10];
+java.util.ArrayList[] g = new java.util.ArrayList<String>[size()];
+
+int[][] h = new int[10][];
+int[][][] i = new int[10][][];
+ArrayList[][] j = new ArrayList[10][];
+ArrayList[][] k = new ArrayList<String>[10][];
+
+def bb = new A.B();
+def bb2 = new A.B[0];
+
+new
+    A
+        ('x', 'y');
+
+
+new a();
+new $a();
+new as.def.in.trait.a();

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_20.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_20.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_20.groovy
new file mode 100644
index 0000000..7249e85
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_20.groovy
@@ -0,0 +1,20 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+@Test2(pre={ super(xx);})
+class XX {}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_21x.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_21x.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_21x.groovy
new file mode 100644
index 0000000..c983dc9
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_21x.groovy
@@ -0,0 +1,24 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+new int[5]
+new int[5][]
+new int[5][6][]
+new int[5][6][7][]
+new int[5][6][7][][]
+new int[5][6][7][][][]

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_22x.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_22x.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_22x.groovy
new file mode 100644
index 0000000..e744a27
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_22x.groovy
@@ -0,0 +1,29 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+int j = 0
+++j++
+assert j == 1
+
+int i = 0
+((i++)++)++
+assert i == 1
+++(++(++i))
+assert i == 2
+++(++(++i++)++)++
+assert i == 3

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Expression_23x.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Expression_23x.groovy b/subprojects/parser-antlr4/src/test/resources/core/Expression_23x.groovy
new file mode 100644
index 0000000..2f3007d
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Expression_23x.groovy
@@ -0,0 +1,115 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+def a
+    =
+        1 + 2
+assert 3 == a
+
+a
+    +=
+        2
+assert 5 == a
+
+int b
+    =
+        1,
+    c
+        =
+            2
+assert 1 == b
+assert 2 == c
+
+def (int x, int y)
+    =
+        [1, 2]
+assert 1 == x
+assert 2 == y
+(x)
+    =
+        [3]
+assert 3 == x
+
+@SuppressWarnings(value
+        =
+        "all")
+def m(p1
+        =
+            1,
+      p2
+        =
+            2,
+      int... p3
+                =
+                    [3]) {
+    return p1 + p2 + p3[0]
+}
+assert 6 == m()
+
+def w
+    =
+        1
+            <<
+                2
+assert 4 == w
+assert 'a'
+            instanceof
+                        String
+assert 1
+            <
+                2
+
+assert 1
+            ==
+                1
+
+assert 'a'
+            ==~
+                /a/
+assert true
+            &
+                true
+assert true
+            ^
+                false
+assert true
+            |
+                true
+
+assert true
+            &&
+                true
+
+assert true
+            ||
+                true
+
+
+def z =
+        9
+            /
+                3
+                    *
+                        2
+assert 6 == z
+
+def r =
+         3
+            %
+                2
+assert 1 == r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/For_01.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/For_01.groovy b/subprojects/parser-antlr4/src/test/resources/core/For_01.groovy
new file mode 100644
index 0000000..b1cbefb
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/For_01.groovy
@@ -0,0 +1,73 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+for (i in someList) {}
+
+
+for (i in someList) {
+    break;
+}
+
+for (i in someList)
+{
+    break;
+}
+
+for (int i in someList) {
+    break;
+}
+
+for (String i in someList) {
+    break;
+}
+
+for (final String i in someList) {
+    break;
+}
+
+for (@Test2 String i in someList) {
+    break;
+}
+
+
+for (int i : someList) {}
+
+for (int i : someList) {
+    break;
+}
+
+for (int i : someList)
+{
+    break;
+}
+
+for (int i : someList) {
+    break;
+}
+
+for (String i : someList) {
+    break;
+}
+
+for (final String i : someList) {
+    break;
+}
+
+for (@Test2 String i : someList) {
+    break;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/For_02.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/For_02.groovy b/subprojects/parser-antlr4/src/test/resources/core/For_02.groovy
new file mode 100644
index 0000000..5a2b795
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/For_02.groovy
@@ -0,0 +1,54 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+for (int i = 0; true; false) {}
+for (int i = 0; true; false) {
+
+}
+for (int i = 0; true; false)
+{
+}
+for (int i = 0;
+     true;
+     false)
+{
+}
+for(;;) {
+
+}
+for(int i = 0;;) {
+
+}
+for(;true;) {
+
+}
+for(;;false) {
+
+}
+
+for (int i = 0; i < 10; i++) {
+
+}
+
+for (i = 0; i < 10; i++) {
+
+}
+
+for(;;) {
+    continue;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/For_03.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/For_03.groovy b/subprojects/parser-antlr4/src/test/resources/core/For_03.groovy
new file mode 100644
index 0000000..d37aef3
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/For_03.groovy
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+outer:
+for (def i in [1, 2]) {
+    for (def j in [1, 2, 3, 4, 5]) {
+        if (j == 1) {
+            break outer;
+        } else if (j == 2) {
+            continue outer;
+        }
+
+        if (j == 3) {
+            continue;
+        }
+
+        if (j == 4) {
+            break;
+        }
+    }
+}
+
+
+for (;;)
+    int number = 1
+
+
+int i
+for (i = 0; i < 5; i++);
+
+
+
+
+for (Object child in children()) {
+    if (child instanceof String) {
+        break
+    } else {
+        continue
+    }
+}

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/For_04x.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/For_04x.groovy b/subprojects/parser-antlr4/src/test/resources/core/For_04x.groovy
new file mode 100644
index 0000000..dcd7b57
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/For_04x.groovy
@@ -0,0 +1,54 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+import groovy.transform.CompileStatic
+
+@CompileStatic
+def testCS() {
+    int result = 0
+    for (def (int i, int j) = [0, 0]; i < 5 && j < 5; i = i + 2, j++) {
+        result += i;
+        result += j;
+    }
+    assert 9 == result
+
+    result = 0
+    for (int i = 0, j = 0; i < 5 && j < 5; i = i + 2, j++) {
+        result += i;
+        result += j;
+    }
+    assert 9 == result
+}
+testCS()
+
+def test() {
+    int result = 0
+    for ((i, j) = [0, 0]; i < 5 && j < 5; i = i + 2, j++) {
+        result += i;
+        result += j;
+    }
+    assert 9 == result
+
+    result = 0
+    for (int i = 0, j = 0; i < 5 && j < 5; i = i + 2, j++) {
+        result += i;
+        result += j;
+    }
+    assert 9 == result
+}
+test()

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/For_05x.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/For_05x.groovy b/subprojects/parser-antlr4/src/test/resources/core/For_05x.groovy
new file mode 100644
index 0000000..dd63224
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/For_05x.groovy
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+import groovy.transform.CompileStatic
+
+@CompileStatic
+def testCS() {
+    int result = 0
+    for (int i = 0, n = 5; i < n; i++) {
+        result += i
+    }
+    assert 10 == result
+
+    result = 0;
+    int i;
+    int j;
+    for (i = 1, j = 5; i < j; i++, j--) {
+        result += i;
+        result += j;
+    }
+    assert 12 == result
+}
+testCS();
+
+def test() {
+    int result = 0
+    for (int i = 0, n = 5; i < n; i++) {
+        result += i
+    }
+    assert 10 == result
+
+    result = 0;
+    int i;
+    int j;
+    for (i = 1, j = 5; i < j; i++, j--) {
+        result += i;
+        result += j;
+    }
+    assert 12 == result
+}
+test();

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/GString_01.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/GString_01.groovy b/subprojects/parser-antlr4/src/test/resources/core/GString_01.groovy
new file mode 100644
index 0000000..d233bab
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/GString_01.groovy
@@ -0,0 +1,48 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+"abc${'123'}def"
+"${'123'}def"
+"${'123'}"
+"a:$a"
+"a:$a.b.c"
+"$a.b.c"
+"$a.b.c,d"
+"${12}a${}c${34}"
+"${->12}"
+"${12}${->12}${'12'}"
+"""abc${'123'}def"""
+"""${'123'}def"""
+"""${'123'}"""
+"""a:$a"""
+"""a:$a.b.c"""
+"""$a.b.c"""
+"""$a.b.c,d"""
+"""${12}a${}c${34}"""
+"""${->12}"""
+"""${12}${->12}${'12'}"""
+"""${12}${->12}${'12'}${a=1;return a;}"""
+
+
+"${}"
+"${;}"
+"${;;}"
+"${;;;}"
+
+"${a b}"
+"${obj.a b}"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/GString_02.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/GString_02.groovy b/subprojects/parser-antlr4/src/test/resources/core/GString_02.groovy
new file mode 100644
index 0000000..2e69232
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/GString_02.groovy
@@ -0,0 +1,77 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+/abc${'123'}def $a.b.c,d${->12}/
+$/${-12}abc${'123'}def $a.b.c,d${->12}/$
+
+def p1=/ab/
+def p2=/a${c}b/
+p3=/a${c}b/
+p4=/a${c}b/*2
+p5=!/a${c}b/
+p6= ~/a${c}b/
+p7=~/a${c}b/
+p8==~/a${c}b/
+p9=/a${c}b/ + /a${c}b/
+p10=/ab/
+p11=/ab/*2
+p12=!/ab/
+p13= ~/ab/
+p14=~/ab/
+p15==~/ab/
+p16=/ab/ + /ab/
+p17=/ab/ == /cd/
+p18=/a${c}b/ == /c${f}d/
+p19=/ab/ != /cd/
+p20=/a${c}b/ != /c${f}d/
+p27=1?:/cd/
+p28=1?:/a${c}b/
+p29=1>2?/ab/:/cd/
+p30=1>2?/c${f}d/:/c${f}d/
+p29=true?
+        /ab/:
+        /cd/
+p30=true?
+        /c${f}d/:
+        /c${f}d/
+p31=/A/ && /B/
+p32=/a${b}/ && /c${d}/
+p33=/A/ || /B/
+p34=/a${b}/ || /c${d}/
+p39=/$a/
+p40=/^a+$/
+p41=/$0+/
+p42=/$2a+/
+p43=/$$2a+/
+p44=/^$|$|^$$2a+$/
+p45=/
+    hello, world!
+/
+p46=/hello\
+world/
+p47=/hello\
+    \/
+world/
+p48=/^hello\
+    \/$|^
+world$/
+p49=/ $x $ /
+p50=/$x\
+    $
+/
+p51=/$$/

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/GString_03.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/GString_03.groovy b/subprojects/parser-antlr4/src/test/resources/core/GString_03.groovy
new file mode 100644
index 0000000..731986b
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/GString_03.groovy
@@ -0,0 +1,67 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+def a = """hello${a}
+world
+"""
+
+a = """
+hello
+${a}
+world
+"""
+
+a =~ $/(${123}hello) \/
+            ${a}world\1
+ \u9fa5 \r
+/$
+a =~ $/\
+    x  $
+    $$
+    $/
+/$
+a =~ $/\
+    $x  $
+    $$
+    $/
+/$
+a = $/
+            Hello name,
+            today we're date.
+
+            $ dollar sign
+            $$ escaped dollar sign
+            \ backslash
+            / forward slash
+            $/ escaped forward slash
+            $/$ escaped dollar slashy string delimiter
+        /$
+
+a = $/
+            Hello $name,
+            today we're ${date}.
+
+            $ dollar sign
+            $$ escaped dollar sign
+            \ backslash
+            / forward slash
+            $/ escaped forward slash
+            $/$ escaped dollar slashy string delimiter
+        /$
+a = $/$$VAR/$
+a = $/$$ $VAR/$

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/GString_04.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/GString_04.groovy b/subprojects/parser-antlr4/src/test/resources/core/GString_04.groovy
new file mode 100644
index 0000000..1d7b1c2
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/GString_04.groovy
@@ -0,0 +1,19 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+"At $date"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/GString_05.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/GString_05.groovy b/subprojects/parser-antlr4/src/test/resources/core/GString_05.groovy
new file mode 100644
index 0000000..e49c060
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/GString_05.groovy
@@ -0,0 +1,19 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+"""At $date"""
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/GString_06.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/GString_06.groovy b/subprojects/parser-antlr4/src/test/resources/core/GString_06.groovy
new file mode 100644
index 0000000..18d5770
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/GString_06.groovy
@@ -0,0 +1,19 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+/At $date/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/Groovydoc_01x.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/Groovydoc_01x.groovy b/subprojects/parser-antlr4/src/test/resources/core/Groovydoc_01x.groovy
new file mode 100644
index 0000000..9bbf9f5
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/Groovydoc_01x.groovy
@@ -0,0 +1,70 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+/**
+ * @Groovydoc
+ * class AA
+ */
+class AA {
+    /**
+     * @Groovydoc
+     * field SOME_FIELD
+     */
+    public static final int SOME_FIELD = 1;
+
+    /**
+     * @Groovydoc
+     * constructor AA
+     */
+    public AA() {
+
+    }
+
+    /**
+     * @Groovydoc
+     * method m
+     */
+    public void m() {
+
+    }
+
+    /**
+     * @Groovydoc
+     * class InnerClass
+     */
+    class InnerClass {
+
+    }
+
+
+}
+
+/**
+ * @Groovydoc
+ * annotation BB
+ */
+@interface BB {
+
+}
+
+assert AA.class.getAnnotation(groovy.lang.Groovydoc).value().contains('class AA')
+assert AA.class.getMethod('m', new Class[0]).getAnnotation(groovy.lang.Groovydoc).value().contains('method m')
+assert AA.class.getConstructor().getAnnotation(groovy.lang.Groovydoc).value().contains('constructor AA')
+assert AA.class.getField('SOME_FIELD').getAnnotation(groovy.lang.Groovydoc).value().contains('field SOME_FIELD')
+assert AA.class.getDeclaredClasses().find {it.simpleName.contains('InnerClass')}.getAnnotation(groovy.lang.Groovydoc).value().contains('class InnerClass')
+assert BB.class.getAnnotation(groovy.lang.Groovydoc).value().contains('annotation BB')
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/IdenticalOp_01x.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/IdenticalOp_01x.groovy b/subprojects/parser-antlr4/src/test/resources/core/IdenticalOp_01x.groovy
new file mode 100644
index 0000000..9110bb4
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/IdenticalOp_01x.groovy
@@ -0,0 +1,28 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+def x = []
+def y = []
+assert y !== x
+
+assert 'a' === 'a'
+assert 'a' !== new String('a')
+assert null === null
+assert true === true
+assert false === false
+assert 0 == 0 && 'a' === 'a' && 1 != 2 && 'a' !== new String('a') && 1 == 1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/IfElse_01.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/IfElse_01.groovy b/subprojects/parser-antlr4/src/test/resources/core/IfElse_01.groovy
new file mode 100644
index 0000000..94687b8
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/IfElse_01.groovy
@@ -0,0 +1,62 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+if (true)
+    assert true, ':('
+
+if (true) assert true, ':('
+
+if (true)
+    assert true, ':('
+else
+    assert false, ':('
+
+if (true) assert true, ':('
+else
+    assert false, ':('
+
+if (true) assert true, ':('
+else assert false, ':('
+
+if (true) assert true, ':(' else assert false, ':('
+
+
+if (false)
+    int number = 1
+
+
+if(true) 1; else 0
+
+if(true) 1 else 0
+
+if(true) 1; else 0;
+
+if(true)
+    1;
+else
+    0
+
+if(true)
+    1
+else
+    0
+
+if(true)
+    1;
+else
+    0;

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_01.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_01.groovy b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_01.groovy
new file mode 100644
index 0000000..f0ed391
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_01.groovy
@@ -0,0 +1,19 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+import java.util.Map
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_02.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_02.groovy b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_02.groovy
new file mode 100644
index 0000000..f32f0c8
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_02.groovy
@@ -0,0 +1,19 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+import java.util.Map;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_03.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_03.groovy b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_03.groovy
new file mode 100644
index 0000000..c308f92
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_03.groovy
@@ -0,0 +1,22 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+import java.util.Map
+import java.util.HashMap;
+import java.io.InputStream
+import java.io.BufferedInputStream;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_04.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_04.groovy b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_04.groovy
new file mode 100644
index 0000000..d54207f
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_04.groovy
@@ -0,0 +1,23 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package core;
+import java.util.Map
+import java.util.HashMap;
+import java.io.InputStream
+import java.io.BufferedInputStream;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_05.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_05.groovy b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_05.groovy
new file mode 100644
index 0000000..238549a
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_05.groovy
@@ -0,0 +1,19 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+import java.util.*
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/73acbcfe/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_06.groovy
----------------------------------------------------------------------
diff --git a/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_06.groovy b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_06.groovy
new file mode 100644
index 0000000..176714c
--- /dev/null
+++ b/subprojects/parser-antlr4/src/test/resources/core/ImportDeclaration_06.groovy
@@ -0,0 +1,21 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+import java.util.*
+import java.math.BigDecimal
+import java.io.*
\ No newline at end of file