diff --git a/Runtime.Standard/Runtime.Standard.csproj b/Runtime.Standard/Runtime.Standard.csproj
index 6805722..837e2ac 100644
--- a/Runtime.Standard/Runtime.Standard.csproj
+++ b/Runtime.Standard/Runtime.Standard.csproj
@@ -28,7 +28,7 @@
runtime
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Runtime/Runtime.csproj b/Runtime/Runtime.csproj
index b75d72b..99caf60 100644
--- a/Runtime/Runtime.csproj
+++ b/Runtime/Runtime.csproj
@@ -30,7 +30,7 @@
runtime
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -50,6 +50,9 @@
+
+ ..\..\rubberduck-vba\Rubberduck\Rubberduck.Parsing\bin\Debug\net46\Rubberduck.Parsing.dll
+
diff --git a/Shared/Models/VisualizerData.cs b/Shared/Models/VisualizerData.cs
index 409a415..87ba085 100644
--- a/Shared/Models/VisualizerData.cs
+++ b/Shared/Models/VisualizerData.cs
@@ -33,8 +33,8 @@ public VisualizerData(object o, Config config) {
Config = config;
Type[] types;
- T createInstance(string typename, object[]? args = null) =>
- (T)Activator.CreateInstance(types.Single(x => x.FullName == typename), args);
+ T createInstance(string typename, object[]? args = null) =>
+ types.Single(x => x.FullName == typename).CreateInstance(args);
{
var baseTypes = new[] { typeof(Parser), typeof(Lexer) };
diff --git a/Shared/Util/Extensions/IEnumerableTuple.cs b/Shared/Util/Extensions/IEnumerableTuple.cs
index 38ac753..fe93574 100644
--- a/Shared/Util/Extensions/IEnumerableTuple.cs
+++ b/Shared/Util/Extensions/IEnumerableTuple.cs
@@ -12,5 +12,12 @@ public static string Joined(this IEnumerable<(T1, T2)> src, string delim
public static Dictionary ToDictionary(this IEnumerable<(TKey, TValue)> src) => src.ToDictionary(t => t.Item1, t => t.Item2);
public static void Add(this List<(T1, T2)> lst, T1 item1, T2 item2) => lst.Add((item1, item2));
+
+ public static IEnumerable SelectT(this IEnumerable<(T1, T2)> src, Func selector) =>
+ src.Select(x => selector(x.Item1, x.Item2));
+ public static IEnumerable SelectT(this IEnumerable<(T1, T2, T3)> src, Func selector) =>
+ src.Select(x => selector(x.Item1, x.Item2));
+ public static IEnumerable SelectT(this IEnumerable<(T1, T2, T3, T4)> src, Func selector) =>
+ src.Select(x => selector(x.Item1, x.Item2, x.Item3, x.Item4));
}
}
diff --git a/Shared/Util/Extensions/Type.cs b/Shared/Util/Extensions/Type.cs
index 8631716..3f4faf9 100644
--- a/Shared/Util/Extensions/Type.cs
+++ b/Shared/Util/Extensions/Type.cs
@@ -66,7 +66,7 @@ public static bool IsAnonymous(this Type type) =>
};
public static string FriendlyName(this Type type) {
- if (type.IsClosureClass()) { return "" ; }
+ if (type.IsClosureClass()) { return ""; }
if (type.IsAnonymous()) {
return "{ " + type.GetProperties().Joined(", ", p => {
@@ -131,5 +131,6 @@ public static bool IsTupleType(this Type type) {
public static bool InheritsFromOrImplementsAny(this Type type, IEnumerable types) => types.Any(t => t.IsAssignableFrom(type));
public static bool InheritsFromOrImplementsAny(this Type type, params Type[] types) => types.Any(t => t.IsAssignableFrom(type));
+ public static T CreateInstance(this Type type, object[]? args = null) => (T)Activator.CreateInstance(type, args);
}
}
diff --git a/Tests.Framework/TestClass.cs b/Tests.Framework/TestClass.cs
deleted file mode 100644
index 37d9ff9..0000000
--- a/Tests.Framework/TestClass.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Xunit;
-
-namespace Tests.Framework {
- public class TestClass {
- [Fact]
- public void TestMethod() => Assert.True(true);
- }
-}
diff --git a/Tests.Framework/Tests.Framework.csproj b/Tests.Framework/Tests.Framework.csproj
deleted file mode 100644
index 53b11f9..0000000
--- a/Tests.Framework/Tests.Framework.csproj
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- net472
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
diff --git a/Tests.Runtime.Standard/FormatterTest.java b/Tests.Runtime.Standard/FormatterTest.java
new file mode 100644
index 0000000..464d4d3
--- /dev/null
+++ b/Tests.Runtime.Standard/FormatterTest.java
@@ -0,0 +1,4262 @@
+/* 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 tests.api.java.util;
+
+import java.io.BufferedOutputStream;
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FilePermission;
+import java.io.Flushable;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PipedOutputStream;
+import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.nio.charset.Charset;
+import java.security.Permission;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.DuplicateFormatFlagsException;
+import java.util.FormatFlagsConversionMismatchException;
+import java.util.Formattable;
+import java.util.FormattableFlags;
+import java.util.Formatter;
+import java.util.FormatterClosedException;
+import java.util.IllegalFormatCodePointException;
+import java.util.IllegalFormatConversionException;
+import java.util.IllegalFormatException;
+import java.util.IllegalFormatFlagsException;
+import java.util.IllegalFormatPrecisionException;
+import java.util.IllegalFormatWidthException;
+import java.util.Locale;
+import java.util.MissingFormatArgumentException;
+import java.util.MissingFormatWidthException;
+import java.util.TimeZone;
+import java.util.UnknownFormatConversionException;
+
+import junit.framework.TestCase;
+
+public class FormatterTest extends TestCase {
+
+ class MockAppendable implements Appendable {
+ public Appendable append(CharSequence arg0) throws IOException {
+ return null;
+ }
+
+ public Appendable append(char arg0) throws IOException {
+ return null;
+ }
+
+ public Appendable append(CharSequence arg0, int arg1, int arg2)
+ throws IOException {
+ return null;
+ }
+ }
+
+ class MockSecurityManager extends SecurityManager {
+ public void checkPermission(Permission p) {
+ if (p.getActions().equals("write") && p instanceof FilePermission) {
+ throw new SecurityException("Always throw security exception");
+ }
+ }
+
+ public void checkPermission(Permission p, Object ctx) {
+ checkPermission(p);
+ }
+ }
+
+ class MockFormattable implements Formattable {
+ public void formatTo(Formatter formatter, int flags, int width,
+ int precision) throws IllegalFormatException {
+ if ((flags & FormattableFlags.UPPERCASE) != 0) {
+ formatter.format("CUSTOMIZED FORMAT FUNCTION" + " WIDTH: "
+ + width + " PRECISION: " + precision);
+ } else {
+ formatter.format("customized format function" + " width: "
+ + width + " precision: " + precision);
+ }
+ }
+
+ public String toString() {
+ return "formattable object";
+ }
+
+ public int hashCode() {
+ return 0xf;
+ }
+ }
+
+ class MockDestination implements Appendable, Flushable {
+
+ private StringBuilder data = new StringBuilder();
+
+ private boolean enabled = false;
+
+ public Appendable append(char c) throws IOException {
+ if (enabled) {
+ data.append(c);
+ enabled = true; // enable it after the first append
+ } else {
+ throw new IOException();
+ }
+ return this;
+ }
+
+ public Appendable append(CharSequence csq) throws IOException {
+ if (enabled) {
+ data.append(csq);
+ enabled = true; // enable it after the first append
+ } else {
+ throw new IOException();
+ }
+ return this;
+ }
+
+ public Appendable append(CharSequence csq, int start, int end)
+ throws IOException {
+ if (enabled) {
+ data.append(csq, start, end);
+ enabled = true; // enable it after the first append
+ } else {
+ throw new IOException();
+ }
+ return this;
+ }
+
+ public void flush() throws IOException {
+ throw new IOException("Always throw IOException");
+ }
+
+ public String toString() {
+ return data.toString();
+ }
+ }
+
+ private File notExist;
+
+ private File fileWithContent;
+
+ private File readOnly;
+
+ private File secret;
+
+ private TimeZone defaultTimeZone;
+
+ /**
+ * @tests java.util.Formatter#Formatter()
+ */
+ public void test_Constructor() {
+ Formatter f = new Formatter();
+ assertNotNull(f);
+ assertTrue(f.out() instanceof StringBuilder);
+ assertEquals(f.locale(), Locale.getDefault());
+ assertNotNull(f.toString());
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(Appendable)
+ */
+ public void test_ConstructorLjava_lang_Appendable() {
+ MockAppendable ma = new MockAppendable();
+ Formatter f1 = new Formatter(ma);
+ assertEquals(ma, f1.out());
+ assertEquals(f1.locale(), Locale.getDefault());
+ assertNotNull(f1.toString());
+
+ Formatter f2 = new Formatter((Appendable) null);
+ /*
+ * If a(the input param) is null then a StringBuilder will be created
+ * and the output can be attained by invoking the out() method. But RI
+ * raises an error of FormatterClosedException when invoking out() or
+ * toString().
+ */
+ Appendable sb = f2.out();
+ assertTrue(sb instanceof StringBuilder);
+ assertNotNull(f2.toString());
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(Locale)
+ */
+ public void test_ConstructorLjava_util_Locale() {
+ Formatter f1 = new Formatter(Locale.FRANCE);
+ assertTrue(f1.out() instanceof StringBuilder);
+ assertEquals(f1.locale(), Locale.FRANCE);
+ assertNotNull(f1.toString());
+
+ Formatter f2 = new Formatter((Locale) null);
+ assertNull(f2.locale());
+ assertTrue(f2.out() instanceof StringBuilder);
+ assertNotNull(f2.toString());
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(Appendable, Locale)
+ */
+ public void test_ConstructorLjava_lang_AppendableLjava_util_Locale() {
+ MockAppendable ma = new MockAppendable();
+ Formatter f1 = new Formatter(ma, Locale.CANADA);
+ assertEquals(ma, f1.out());
+ assertEquals(f1.locale(), Locale.CANADA);
+
+ Formatter f2 = new Formatter(ma, null);
+ assertNull(f2.locale());
+ assertEquals(ma, f1.out());
+
+ Formatter f3 = new Formatter(null, Locale.GERMAN);
+ assertEquals(f3.locale(), Locale.GERMAN);
+ assertTrue(f3.out() instanceof StringBuilder);
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(String)
+ */
+ public void test_ConstructorLjava_lang_String() throws IOException {
+ Formatter f = null;
+ try {
+ f = new Formatter((String) null);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e1) {
+ // expected
+ }
+
+ f = new Formatter(notExist.getPath());
+ assertEquals(f.locale(), Locale.getDefault());
+ f.close();
+
+ f = new Formatter(fileWithContent.getPath());
+ assertEquals(0, fileWithContent.length());
+ f.close();
+
+ // FIXME This exception will not be thrown out on linux.
+ try {
+ f = new Formatter(readOnly.getPath());
+ fail("should throw FileNotFoundException");
+ } catch (FileNotFoundException e) {
+ // expected
+ }
+
+ SecurityManager oldsm = System.getSecurityManager();
+ System.setSecurityManager(new MockSecurityManager());
+ try {
+ f = new Formatter(secret.getPath());
+ fail("should throw SecurityException");
+ } catch (SecurityException se) {
+ // expected
+ } finally {
+ System.setSecurityManager(oldsm);
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(String, String)
+ */
+ public void test_ConstructorLjava_lang_StringLjava_lang_String()
+ throws IOException {
+ Formatter f = null;
+ try {
+ f = new Formatter((String) null, Charset.defaultCharset().name());
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e1) {
+ // expected
+ }
+
+ try {
+ f = new Formatter(notExist.getPath(), null);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e2) {
+ // expected
+ }
+
+ f = new Formatter(notExist.getPath(), Charset.defaultCharset().name());
+ assertEquals(f.locale(), Locale.getDefault());
+ f.close();
+
+ try {
+ f = new Formatter(notExist.getPath(), "ISO 1111-1");
+ fail("should throw UnsupportedEncodingException");
+ } catch (UnsupportedEncodingException e1) {
+ // expected
+ }
+
+ f = new Formatter(fileWithContent.getPath(), "UTF-16BE");
+ assertEquals(0, fileWithContent.length());
+ f.close();
+
+ // FIXME This exception will not be thrown out on linux.
+ try {
+ f = new Formatter(readOnly.getPath(), "UTF-16BE");
+ fail("should throw FileNotFoundException");
+ } catch (FileNotFoundException e) {
+ // expected
+ }
+
+ SecurityManager oldsm = System.getSecurityManager();
+ System.setSecurityManager(new MockSecurityManager());
+ try {
+ f = new Formatter(secret.getPath(), "UTF-16BE");
+ fail("should throw SecurityException");
+ } catch (SecurityException se) {
+ // expected
+ } finally {
+ System.setSecurityManager(oldsm);
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(String, String, Locale)
+ */
+ public void test_ConstructorLjava_lang_StringLjava_lang_StringLjava_util_Locale()
+ throws IOException {
+ Formatter f = null;
+ try {
+ f = new Formatter((String) null, Charset.defaultCharset().name(),
+ Locale.KOREA);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e1) {
+ // expected
+ }
+
+ try {
+ f = new Formatter(notExist.getPath(), null, Locale.KOREA);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e2) {
+ // expected
+ }
+
+ f = new Formatter(notExist.getPath(), Charset.defaultCharset().name(),
+ null);
+ assertNotNull(f);
+ f.close();
+
+ f = new Formatter(notExist.getPath(), Charset.defaultCharset().name(),
+ Locale.KOREA);
+ assertEquals(f.locale(), Locale.KOREA);
+ f.close();
+
+ try {
+ f = new Formatter(notExist.getPath(), "ISO 1111-1", Locale.CHINA);
+ fail("should throw UnsupportedEncodingException");
+ } catch (UnsupportedEncodingException e1) {
+ // expected
+ }
+
+ f = new Formatter(fileWithContent.getPath(), "UTF-16BE",
+ Locale.CANADA_FRENCH);
+ assertEquals(0, fileWithContent.length());
+ f.close();
+
+ try {
+ f = new Formatter(readOnly.getPath(), Charset.defaultCharset()
+ .name(), Locale.ITALY);
+ fail("should throw FileNotFoundException");
+ } catch (FileNotFoundException e) {
+ // expected
+ }
+
+ SecurityManager oldsm = System.getSecurityManager();
+ System.setSecurityManager(new MockSecurityManager());
+ try {
+ f = new Formatter(secret.getPath(),
+ Charset.defaultCharset().name(), Locale.SIMPLIFIED_CHINESE);
+ fail("should throw SecurityException");
+ } catch (SecurityException se) {
+ // expected
+ } finally {
+ System.setSecurityManager(oldsm);
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(File)
+ */
+ public void test_ConstructorLjava_io_File() throws IOException {
+ Formatter f = null;
+ try {
+ f = new Formatter((File) null);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e1) {
+ // expected
+ }
+
+ f = new Formatter(notExist);
+ assertEquals(f.locale(), Locale.getDefault());
+ f.close();
+
+ f = new Formatter(fileWithContent);
+ assertEquals(0, fileWithContent.length());
+ f.close();
+
+ // FIXME This exception will not be thrown out on linux.
+ try {
+ f = new Formatter(readOnly);
+ fail("should throw FileNotFoundException");
+ } catch (FileNotFoundException e) {
+ // expected
+ }
+
+ SecurityManager oldsm = System.getSecurityManager();
+ System.setSecurityManager(new MockSecurityManager());
+ try {
+ f = new Formatter(secret);
+ fail("should throw SecurityException");
+ } catch (SecurityException se) {
+ // expected
+ } finally {
+ System.setSecurityManager(oldsm);
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(File, String)
+ */
+ public void test_ConstructorLjava_io_FileLjava_lang_String()
+ throws IOException {
+ Formatter f = null;
+ try {
+ f = new Formatter((File) null, Charset.defaultCharset().name());
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e1) {
+ // expected
+ }
+
+ f = new Formatter(notExist, Charset.defaultCharset().name());
+ assertEquals(f.locale(), Locale.getDefault());
+ f.close();
+
+ f = new Formatter(fileWithContent, "UTF-16BE");
+ assertEquals(0, fileWithContent.length());
+ f.close();
+
+ // FIXME This exception will not be thrown out on linux.
+ try {
+ f = new Formatter(readOnly, Charset.defaultCharset().name());
+ fail("should throw FileNotFoundException");
+ } catch (FileNotFoundException e) {
+ // expected
+ }
+
+ SecurityManager oldsm = System.getSecurityManager();
+ System.setSecurityManager(new MockSecurityManager());
+ try {
+ f = new Formatter(secret, Charset.defaultCharset().name());
+ fail("should throw SecurityException");
+ } catch (SecurityException se) {
+ // expected
+ } finally {
+ System.setSecurityManager(oldsm);
+ }
+
+ try {
+ f = new Formatter(notExist, null);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e2) {
+ // expected
+ } finally {
+ if (notExist.exists()) {
+ // Fail on RI on Windows, because output stream is created and
+ // not closed when exception thrown
+ assertTrue(notExist.delete());
+ }
+ }
+
+ try {
+ f = new Formatter(notExist, "ISO 1111-1");
+ fail("should throw UnsupportedEncodingException");
+ } catch (UnsupportedEncodingException e1) {
+ // expected
+ } finally {
+ if (notExist.exists()) {
+ // Fail on RI on Windows, because output stream is created and
+ // not closed when exception thrown
+ assertTrue(notExist.delete());
+ }
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(File, String, Locale)
+ */
+ public void test_ConstructorLjava_io_FileLjava_lang_StringLjava_util_Locale()
+ throws IOException {
+ Formatter f = null;
+ try {
+ f = new Formatter((File) null, Charset.defaultCharset().name(),
+ Locale.KOREA);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e1) {
+ // expected
+ }
+
+ try {
+ f = new Formatter(notExist, null, Locale.KOREA);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e2) {
+ // expected
+ }
+
+ f = new Formatter(notExist, Charset.defaultCharset().name(), null);
+ assertNotNull(f);
+ f.close();
+
+ f = new Formatter(notExist, Charset.defaultCharset().name(),
+ Locale.KOREA);
+ assertEquals(f.locale(), Locale.KOREA);
+ f.close();
+
+ try {
+ f = new Formatter(notExist, "ISO 1111-1", Locale.CHINA);
+ fail("should throw UnsupportedEncodingException");
+ } catch (UnsupportedEncodingException e1) {
+ // expected
+ }
+ f = new Formatter(fileWithContent.getPath(), "UTF-16BE",
+ Locale.CANADA_FRENCH);
+ assertEquals(0, fileWithContent.length());
+ f.close();
+
+ // FIXME This exception will not be thrown out on linux.
+ try {
+ f = new Formatter(readOnly.getPath(), Charset.defaultCharset()
+ .name(), Locale.ITALY);
+ fail("should throw FileNotFoundException");
+ } catch (FileNotFoundException e) {
+ // expected
+ }
+
+ SecurityManager oldsm = System.getSecurityManager();
+ System.setSecurityManager(new MockSecurityManager());
+ try {
+ f = new Formatter(secret.getPath(),
+ Charset.defaultCharset().name(), Locale.SIMPLIFIED_CHINESE);
+ fail("should throw SecurityException");
+ } catch (SecurityException se) {
+ // expected
+ } finally {
+ System.setSecurityManager(oldsm);
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(PrintStream)
+ */
+ public void test_ConstructorLjava_io_PrintStream() throws IOException {
+ Formatter f = null;
+ try {
+ f = new Formatter((PrintStream) null);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e1) {
+ // expected
+ }
+
+ PrintStream ps = new PrintStream(notExist, "UTF-16BE");
+ f = new Formatter(ps);
+ assertEquals(Locale.getDefault(), f.locale());
+ f.close();
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(OutputStream)
+ */
+ public void test_ConstructorLjava_io_OutputStream() throws IOException {
+ Formatter f = null;
+ try {
+ f = new Formatter((OutputStream) null);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e1) {
+ // expected
+ }
+
+ OutputStream os = new FileOutputStream(notExist);
+ f = new Formatter(os);
+ assertEquals(Locale.getDefault(), f.locale());
+ f.close();
+ }
+
+ /**
+ * @tests java.util.Formatter#Formatter(OutputStream, String)
+ */
+ public void test_ConstructorLjava_io_OutputStreamLjava_lang_String()
+ throws IOException {
+ Formatter f = null;
+ try {
+ f = new Formatter((OutputStream) null, Charset.defaultCharset()
+ .name());
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e1) {
+ // expected
+ }
+
+ OutputStream os = null;
+ try {
+ os = new FileOutputStream(notExist);
+ f = new Formatter(os, null);
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e2) {
+ // expected
+ } finally {
+ os.close();
+ }
+
+ try {
+ os = new PipedOutputStream();
+ f = new Formatter(os, "TMP-1111");
+ fail("should throw UnsupportedEncodingException");
+ } catch (UnsupportedEncodingException e1) {
+ // expected
+ } finally {
+ os.close();
+ }
+
+ os = new FileOutputStream(fileWithContent);
+ f = new Formatter(os, "UTF-16BE");
+ assertEquals(Locale.getDefault(), f.locale());
+ f.close();
+ }
+
+ /**
+ * Test method for 'java.util.Formatter.Formatter(OutputStream, String,
+ * Locale)
+ */
+ public void test_ConstructorLjava_io_OutputStreamLjava_lang_StringLjava_util_Locale()
+ throws IOException {
+ Formatter f = null;
+ try {
+ f = new Formatter((OutputStream) null, Charset.defaultCharset()
+ .name(), Locale.getDefault());
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e1) {
+ // expected
+ }
+
+ OutputStream os = null;
+ try {
+ os = new FileOutputStream(notExist);
+ f = new Formatter(os, null, Locale.getDefault());
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e2) {
+ // expected
+ } finally {
+ os.close();
+ }
+
+ os = new FileOutputStream(notExist);
+ f = new Formatter(os, Charset.defaultCharset().name(), null);
+ f.close();
+
+ try {
+ os = new PipedOutputStream();
+ f = new Formatter(os, "TMP-1111", Locale.getDefault());
+ fail("should throw UnsupportedEncodingException");
+ } catch (UnsupportedEncodingException e1) {
+ // expected
+ }
+
+ os = new FileOutputStream(fileWithContent);
+ f = new Formatter(os, "UTF-16BE", Locale.ENGLISH);
+ assertEquals(Locale.ENGLISH, f.locale());
+ f.close();
+ }
+
+ /**
+ * @tests java.util.Formatter#locale()
+ */
+ public void test_locale() {
+ Formatter f = null;
+ f = new Formatter((Locale) null);
+ assertNull(f.locale());
+
+ f.close();
+ try {
+ f.locale();
+ fail("should throw FormatterClosedException");
+ } catch (FormatterClosedException e) {
+ // expected
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#out()
+ */
+ public void test_out() {
+ Formatter f = null;
+ f = new Formatter();
+ assertNotNull(f.out());
+ assertTrue(f.out() instanceof StringBuilder);
+ f.close();
+ try {
+ f.out();
+ fail("should throw FormatterClosedException");
+ } catch (FormatterClosedException e) {
+ // expected
+ }
+
+ }
+
+ /**
+ * @tests java.util.Formatter#flush()
+ */
+ public void test_flush() throws IOException {
+ Formatter f = null;
+ f = new Formatter(notExist);
+ assertTrue(f instanceof Flushable);
+ f.close();
+ try {
+ f.flush();
+ fail("should throw FormatterClosedException");
+ } catch (FormatterClosedException e) {
+ // expected
+ }
+
+ f = new Formatter();
+ // For destination that does not implement Flushable
+ // No exception should be thrown
+ f.flush();
+ }
+
+ /**
+ * @tests java.util.Formatter#close()
+ */
+ public void test_close() throws IOException {
+ Formatter f = new Formatter(notExist);
+ assertTrue(f instanceof Closeable);
+ f.close();
+ // close next time will not throw exception
+ f.close();
+ assertNull(f.ioException());
+ }
+
+ /**
+ * @tests java.util.Formatter#toString()
+ */
+ public void test_toString() {
+ Formatter f = new Formatter();
+ assertNotNull(f.toString());
+ assertEquals(f.out().toString(), f.toString());
+ f.close();
+ try {
+ f.toString();
+ fail("should throw FormatterClosedException");
+ } catch (FormatterClosedException e) {
+ // expected
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#ioException()
+ */
+ public void test_ioException() throws IOException {
+ Formatter f = null;
+ f = new Formatter(new MockDestination());
+ assertNull(f.ioException());
+ f.flush();
+ assertNotNull(f.ioException());
+ f.close();
+
+ MockDestination md = new MockDestination();
+ f = new Formatter(md);
+ f.format("%s%s", "1", "2");
+ // format stop working after IOException
+ assertNotNull(f.ioException());
+ assertEquals("", f.toString());
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for null parameter
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_null() {
+ Formatter f = new Formatter();
+ try {
+ f.format((String) null, "parameter");
+ fail("should throw NullPointerException");
+ } catch (NullPointerException e) {
+ // expected
+ }
+
+ f = new Formatter();
+ f.format("hello", (Object[]) null);
+ assertEquals("hello", f.toString());
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for argument index
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_ArgIndex() {
+ Formatter formatter = new Formatter(Locale.US);
+ formatter.format("%1$s%2$s%3$s%4$s%5$s%6$s%7$s%8$s%9$s%11$s%10$s", "1",
+ "2", "3", "4", "5", "6", "7", "8", "9", "10", "11");
+ assertEquals("1234567891110", formatter.toString());
+
+ formatter = new Formatter(Locale.JAPAN);
+ formatter.format("%0$s", "hello");
+ assertEquals("hello", formatter.toString());
+
+ try {
+ formatter = new Formatter(Locale.US);
+ formatter.format("%-1$s", "1", "2");
+ fail("should throw UnknownFormatConversionException");
+ } catch (UnknownFormatConversionException e) {
+ // expected
+ }
+
+ try {
+ formatter = new Formatter(Locale.US);
+ formatter.format("%$s", "hello", "2");
+ fail("should throw UnknownFormatConversionException");
+ } catch (UnknownFormatConversionException e) {
+ // expected
+ }
+
+ try {
+ Formatter f = new Formatter(Locale.US);
+ f.format("%", "string");
+ fail("should throw UnknownFormatConversionException");
+ } catch (UnknownFormatConversionException e) {
+ // expected
+ }
+
+ formatter = new Formatter(Locale.FRANCE);
+ formatter.format("%1$s%2$s%3$s%4$s%5$s%6$s%7$s%8$s%= 0 || Character.isDigit(i)
+ || Character.isLetter(i)) {
+ // Do not test 0-9, a-z, A-Z and characters in the chars array.
+ // They are characters used as flags, width or conversions
+ continue;
+ }
+ try {
+ f.format("%" + i + "s", 1);
+ fail("should throw UnknownFormatConversionException");
+ } catch (UnknownFormatConversionException e) {
+ // expected
+ }
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for general
+ * conversion b/B
+ */
+ public void test_format_LString$LObject_GeneralConversionB() {
+ final Object[][] triple = {
+ { Boolean.FALSE, "%3.2b", " fa", },
+ { Boolean.FALSE, "%-4.6b", "false", },
+ { Boolean.FALSE, "%.2b", "fa", },
+ { Boolean.TRUE, "%3.2b", " tr", },
+ { Boolean.TRUE, "%-4.6b", "true", },
+ { Boolean.TRUE, "%.2b", "tr", },
+ { new Character('c'), "%3.2b", " tr", },
+ { new Character('c'), "%-4.6b", "true", },
+ { new Character('c'), "%.2b", "tr", },
+ { new Byte((byte) 0x01), "%3.2b", " tr", },
+ { new Byte((byte) 0x01), "%-4.6b", "true", },
+ { new Byte((byte) 0x01), "%.2b", "tr", },
+ { new Short((short) 0x0001), "%3.2b", " tr", },
+ { new Short((short) 0x0001), "%-4.6b", "true", },
+ { new Short((short) 0x0001), "%.2b", "tr", },
+ { new Integer(1), "%3.2b", " tr", },
+ { new Integer(1), "%-4.6b", "true", },
+ { new Integer(1), "%.2b", "tr", },
+ { new Float(1.1f), "%3.2b", " tr", },
+ { new Float(1.1f), "%-4.6b", "true", },
+ { new Float(1.1f), "%.2b", "tr", },
+ { new Double(1.1d), "%3.2b", " tr", },
+ { new Double(1.1d), "%-4.6b", "true", },
+ { new Double(1.1d), "%.2b", "tr", },
+ { "", "%3.2b", " tr", },
+ { "", "%-4.6b", "true", },
+ { "", "%.2b", "tr", },
+ { "string content", "%3.2b", " tr", },
+ { "string content", "%-4.6b", "true", },
+ { "string content", "%.2b", "tr", },
+ { new MockFormattable(), "%3.2b", " tr", },
+ { new MockFormattable(), "%-4.6b", "true", },
+ { new MockFormattable(), "%.2b", "tr", },
+ { (Object) null, "%3.2b", " fa", },
+ { (Object) null, "%-4.6b", "false", },
+ { (Object) null, "%.2b", "fa", },
+ };
+
+
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ Formatter f = null;
+ for (int i = 0; i < triple.length; i++) {
+ f = new Formatter(Locale.FRANCE);
+ f.format((String)triple[i][pattern], triple[i][input]);
+ assertEquals("triple[" + i + "]:" + triple[i][input]
+ + ",pattern[" + i + "]:" + triple[i][pattern], triple[i][output], f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format(((String)triple[i][pattern]).toUpperCase(Locale.US), triple[i][input]);
+ assertEquals("triple[" + i + "]:" + triple[i][input]
+ + ",pattern[" + i + "]:" + triple[i][pattern], ((String)triple[i][output])
+ .toUpperCase(Locale.US), f.toString());
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for general
+ * conversion type 's' and 'S'
+ */
+ public void test_format_LString$LObject_GeneralConversionS() {
+
+ final Object[][] triple = {
+ { Boolean.FALSE, "%2.3s", "fal", },
+ { Boolean.FALSE, "%-6.4s", "fals ", },
+ { Boolean.FALSE, "%.5s", "false", },
+ { Boolean.TRUE, "%2.3s", "tru", },
+ { Boolean.TRUE, "%-6.4s", "true ", },
+ { Boolean.TRUE, "%.5s", "true", },
+ { new Character('c'), "%2.3s", " c", },
+ { new Character('c'), "%-6.4s", "c ", },
+ { new Character('c'), "%.5s", "c", },
+ { new Byte((byte) 0x01), "%2.3s", " 1", },
+ { new Byte((byte) 0x01), "%-6.4s", "1 ", },
+ { new Byte((byte) 0x01), "%.5s", "1", },
+ { new Short((short) 0x0001), "%2.3s", " 1", },
+ { new Short((short) 0x0001), "%-6.4s", "1 ", },
+ { new Short((short) 0x0001), "%.5s", "1", },
+ { new Integer(1), "%2.3s", " 1", },
+ { new Integer(1), "%-6.4s", "1 ", },
+ { new Integer(1), "%.5s", "1", },
+ { new Float(1.1f), "%2.3s", "1.1", },
+ { new Float(1.1f), "%-6.4s", "1.1 ", },
+ { new Float(1.1f), "%.5s", "1.1", },
+ { new Double(1.1d), "%2.3s", "1.1", },
+ { new Double(1.1d), "%-6.4s", "1.1 ", },
+ { new Double(1.1d), "%.5s", "1.1", },
+ { "", "%2.3s", " ", },
+ { "", "%-6.4s", " ", },
+ { "", "%.5s", "", },
+ { "string content", "%2.3s", "str", },
+ { "string content", "%-6.4s", "stri ", },
+ { "string content", "%.5s", "strin", },
+ { new MockFormattable(), "%2.3s", "customized format function width: 2 precision: 3", },
+ { new MockFormattable(), "%-6.4s", "customized format function width: 6 precision: 4", },
+ { new MockFormattable(), "%.5s", "customized format function width: -1 precision: 5", },
+ { (Object) null, "%2.3s", "nul", },
+ { (Object) null, "%-6.4s", "null ", },
+ { (Object) null, "%.5s", "null", },
+ };
+
+
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ Formatter f = null;
+ for (int i = 0; i < triple.length; i++) {
+ f = new Formatter(Locale.FRANCE);
+ f.format((String)triple[i][pattern], triple[i][input]);
+ assertEquals("triple[" + i + "]:" + triple[i][input]
+ + ",pattern[" + i + "]:" + triple[i][pattern], triple[i][output], f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format(((String)triple[i][pattern]).toUpperCase(Locale.US), triple[i][input]);
+ assertEquals("triple[" + i + "]:" + triple[i][input]
+ + ",pattern[" + i + "]:" + triple[i][pattern], ((String)triple[i][output])
+ .toUpperCase(Locale.US), f.toString());
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for general
+ * conversion type 'h' and 'H'
+ */
+ public void test_format_LString$LObject_GeneralConversionH() {
+
+ final Object[] input = {
+ Boolean.FALSE,
+ Boolean.TRUE,
+ new Character('c'),
+ new Byte((byte) 0x01),
+ new Short((short) 0x0001),
+ new Integer(1),
+ new Float(1.1f),
+ new Double(1.1d),
+ "",
+ "string content",
+ new MockFormattable(),
+ (Object) null,
+ };
+
+ Formatter f = null;
+ for (int i = 0; i < input.length - 1; i++) {
+ f = new Formatter(Locale.FRANCE);
+ f.format("%h", input[i]);
+ assertEquals("triple[" + i + "]:" + input[i],
+ Integer.toHexString(input[i].hashCode()), f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format("%H", input[i]);
+ assertEquals("triple[" + i + "]:" + input[i],
+ Integer.toHexString(input[i].hashCode()).toUpperCase(Locale.US), f.toString());
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for general
+ * conversion other cases
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_GeneralConversionOther() {
+ /*
+ * In Turkish locale, the upper case of '\u0069' is '\u0130'. The
+ * following test indicate that '\u0069' is coverted to upper case
+ * without using the turkish locale.
+ */
+ Formatter f = new Formatter(new Locale("tr"));
+ f.format("%S", "\u0069");
+ assertEquals("\u0049", f.toString());
+
+ final Object[] input = {
+ Boolean.FALSE,
+ Boolean.TRUE,
+ new Character('c'),
+ new Byte((byte) 0x01),
+ new Short((short) 0x0001),
+ new Integer(1),
+ new Float(1.1f),
+ new Double(1.1d),
+ "",
+ "string content",
+ new MockFormattable(),
+ (Object) null,
+ };
+ f = new Formatter(Locale.GERMAN);
+ for (int i = 0; i < input.length; i++) {
+ if (!(input[i] instanceof Formattable)) {
+ try {
+ f.format("%#s", input[i]);
+ /*
+ * fail on RI, spec says if the '#' flag is present and the
+ * argument is not a Formattable , then a
+ * FormatFlagsConversionMismatchException will be thrown.
+ */
+ fail("should throw FormatFlagsConversionMismatchException");
+ } catch (FormatFlagsConversionMismatchException e) {
+ // expected
+ }
+ } else {
+ f.format("%#s%<-#8s", input[i]);
+ assertEquals(
+ "customized format function width: -1 precision: -1customized format function width: 8 precision: -1",
+ f.toString());
+ }
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for general
+ * conversion exception
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_GeneralConversionException() {
+ final String[] flagMismatch = { "%#b", "%+b", "% b", "%0b", "%,b",
+ "%(b", "%#B", "%+B", "% B", "%0B", "%,B", "%(B", "%#h", "%+h",
+ "% h", "%0h", "%,h", "%(h", "%#H", "%+H", "% H", "%0H", "%,H",
+ "%(H", "%+s", "% s", "%0s", "%,s", "%(s", "%+S", "% S", "%0S",
+ "%,S", "%(S" };
+
+ Formatter f = new Formatter(Locale.US);
+
+ for (int i = 0; i < flagMismatch.length; i++) {
+ try {
+ f.format(flagMismatch[i], "something");
+ fail("should throw FormatFlagsConversionMismatchException");
+ } catch (FormatFlagsConversionMismatchException e) {
+ // expected
+ }
+ }
+
+ final String[] missingWidth = { "%-b", "%-B", "%-h", "%-H", "%-s",
+ "%-S", };
+ for (int i = 0; i < missingWidth.length; i++) {
+ try {
+ f.format(missingWidth[i], "something");
+ fail("should throw MissingFormatWidthException");
+ } catch (MissingFormatWidthException e) {
+ // expected
+ }
+ }
+
+ // Regression test
+ f = new Formatter();
+ try {
+ f.format("%c", (byte)-0x0001);
+ fail("Should throw IllegalFormatCodePointException");
+ } catch (IllegalFormatCodePointException e) {
+ // expected
+ }
+
+ f = new Formatter();
+ try {
+ f.format("%c", (short)-0x0001);
+ fail("Should throw IllegalFormatCodePointException");
+ } catch (IllegalFormatCodePointException e) {
+ // expected
+ }
+
+ f = new Formatter();
+ try {
+ f.format("%c", -0x0001);
+ fail("Should throw IllegalFormatCodePointException");
+ } catch (IllegalFormatCodePointException e) {
+ // expected
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for Character
+ * conversion
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_CharacterConversion() {
+ Formatter f = new Formatter(Locale.US);
+ final Object[] illArgs = { Boolean.TRUE, new Float(1.1f),
+ new Double(1.1d), "string content", new Float(1.1f), new Date() };
+ for (int i = 0; i < illArgs.length; i++) {
+ try {
+ f.format("%c", illArgs[i]);
+ fail("should throw IllegalFormatConversionException");
+ } catch (IllegalFormatConversionException e) {
+ // expected
+ }
+ }
+
+ try {
+ f.format("%c", Integer.MAX_VALUE);
+ fail("should throw IllegalFormatCodePointException");
+ } catch (IllegalFormatCodePointException e) {
+ // expected
+ }
+
+ try {
+ f.format("%#c", 'c');
+ fail("should throw FormatFlagsConversionMismatchException");
+ } catch (FormatFlagsConversionMismatchException e) {
+ // expected
+ }
+
+ final Object[][] triple = {
+ {'c', "%c", "c"},
+ {'c', "%-2c", "c "},
+ {'\u0123', "%c", "\u0123"},
+ {'\u0123', "%-2c", "\u0123 "},
+ {(byte) 0x11, "%c", "\u0011"},
+ {(byte) 0x11, "%-2c", "\u0011 "},
+ {(short) 0x1111, "%c", "\u1111"},
+ {(short) 0x1111, "%-2c", "\u1111 "},
+ {0x11, "%c", "\u0011"},
+ {0x11, "%-2c", "\u0011 "},
+ };
+
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ for (int i = 0; i < triple.length; i++) {
+ f = new Formatter(Locale.US);
+ f.format((String)triple[i][pattern], triple[i][input]);
+ assertEquals(triple[i][output], f.toString());
+ }
+
+ f = new Formatter(Locale.US);
+ f.format("%c", 0x10000);
+ assertEquals(0x10000, f.toString().codePointAt(0));
+
+ try {
+ f.format("%2.2c", 'c');
+ fail("should throw IllegalFormatPrecisionException");
+ } catch (IllegalFormatPrecisionException e) {
+ // expected
+ }
+
+ f = new Formatter(Locale.US);
+ f.format("%C", 'w');
+ // error on RI, throw UnknownFormatConversionException
+ // RI do not support converter 'C'
+ assertEquals("W", f.toString());
+
+ f = new Formatter(Locale.JAPAN);
+ f.format("%Ced", 0x1111);
+ // error on RI, throw UnknownFormatConversionException
+ // RI do not support converter 'C'
+ assertEquals("\u1111ed", f.toString());
+ }
+
+
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for legal
+ * Byte/Short/Integer/Long conversion type 'd'
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_ByteShortIntegerLongConversionD() {
+ final Object[][] triple = {
+ { 0, "%d", "0" },
+ { 0, "%10d", " 0" },
+ { 0, "%-1d", "0" },
+ { 0, "%+d", "+0" },
+ { 0, "% d", " 0" },
+ { 0, "%,d", "0" },
+ { 0, "%(d", "0" },
+ { 0, "%08d", "00000000" },
+ { 0, "%-+,(11d", "+0 " },
+ { 0, "%0 ,(11d", " 0000000000" },
+
+ { (byte) 0xff, "%d", "-1" },
+ { (byte) 0xff, "%10d", " -1" },
+ { (byte) 0xff, "%-1d", "-1" },
+ { (byte) 0xff, "%+d", "-1" },
+ { (byte) 0xff, "% d", "-1" },
+ { (byte) 0xff, "%,d", "-1" },
+ { (byte) 0xff, "%(d", "(1)" },
+ { (byte) 0xff, "%08d", "-0000001" },
+ { (byte) 0xff, "%-+,(11d", "(1) " },
+ { (byte) 0xff, "%0 ,(11d", "(000000001)" },
+
+ { (short) 0xf123, "%d", "-3805" },
+ { (short) 0xf123, "%10d", " -3805" },
+ { (short) 0xf123, "%-1d", "-3805" },
+ { (short) 0xf123, "%+d", "-3805" },
+ { (short) 0xf123, "% d", "-3805" },
+ { (short) 0xf123, "%,d", "-3.805" },
+ { (short) 0xf123, "%(d", "(3805)" },
+ { (short) 0xf123, "%08d", "-0003805" },
+ { (short) 0xf123, "%-+,(11d", "(3.805) " },
+ { (short) 0xf123, "%0 ,(11d", "(00003.805)" },
+
+ { 0x123456, "%d", "1193046" },
+ { 0x123456, "%10d", " 1193046" },
+ { 0x123456, "%-1d", "1193046" },
+ { 0x123456, "%+d", "+1193046" },
+ { 0x123456, "% d", " 1193046" },
+ { 0x123456, "%,d", "1.193.046" },
+ { 0x123456, "%(d", "1193046" },
+ { 0x123456, "%08d", "01193046" },
+ { 0x123456, "%-+,(11d", "+1.193.046 " },
+ { 0x123456, "%0 ,(11d", " 01.193.046" },
+
+ { -3, "%d", "-3" },
+ { -3, "%10d", " -3" },
+ { -3, "%-1d", "-3" },
+ { -3, "%+d", "-3" },
+ { -3, "% d", "-3" },
+ { -3, "%,d", "-3" },
+ { -3, "%(d", "(3)" },
+ { -3, "%08d", "-0000003" },
+ { -3, "%-+,(11d", "(3) " },
+ { -3, "%0 ,(11d", "(000000003)" },
+
+ { 0x7654321L, "%d", "124076833" },
+ { 0x7654321L, "%10d", " 124076833" },
+ { 0x7654321L, "%-1d", "124076833" },
+ { 0x7654321L, "%+d", "+124076833" },
+ { 0x7654321L, "% d", " 124076833" },
+ { 0x7654321L, "%,d", "124.076.833" },
+ { 0x7654321L, "%(d", "124076833" },
+ { 0x7654321L, "%08d", "124076833" },
+ { 0x7654321L, "%-+,(11d", "+124.076.833" },
+ { 0x7654321L, "%0 ,(11d", " 124.076.833" },
+
+ { -1L, "%d", "-1" },
+ { -1L, "%10d", " -1" },
+ { -1L, "%-1d", "-1" },
+ { -1L, "%+d", "-1" },
+ { -1L, "% d", "-1" },
+ { -1L, "%,d", "-1" },
+ { -1L, "%(d", "(1)" },
+ { -1L, "%08d", "-0000001" },
+ { -1L, "%-+,(11d", "(1) " },
+ { -1L, "%0 ,(11d", "(000000001)" },
+ };
+
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ Formatter f;
+ for (int i = 0; i < triple.length; i++) {
+ f = new Formatter(Locale.GERMAN);
+ f.format((String) triple[i][pattern],
+ triple[i][input]);
+ assertEquals("triple[" + i + "]:" + triple[i][input] + ",pattern["
+ + i + "]:" + triple[i][pattern], triple[i][output], f
+ .toString());
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for legal
+ * Byte/Short/Integer/Long conversion type 'o'
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_ByteShortIntegerLongConversionO() {
+ final Object[][] triple = {
+ { 0, "%o", "0" },
+ { 0, "%-6o", "0 " },
+ { 0, "%08o", "00000000" },
+ { 0, "%#o", "00" },
+ { 0, "%0#11o", "00000000000" },
+ { 0, "%-#9o", "00 " },
+
+ { (byte) 0xff, "%o", "377" },
+ { (byte) 0xff, "%-6o", "377 " },
+ { (byte) 0xff, "%08o", "00000377" },
+ { (byte) 0xff, "%#o", "0377" },
+ { (byte) 0xff, "%0#11o", "00000000377" },
+ { (byte) 0xff, "%-#9o", "0377 " },
+
+ { (short) 0xf123, "%o", "170443" },
+ { (short) 0xf123, "%-6o", "170443" },
+ { (short) 0xf123, "%08o", "00170443" },
+ { (short) 0xf123, "%#o", "0170443" },
+ { (short) 0xf123, "%0#11o", "00000170443" },
+ { (short) 0xf123, "%-#9o", "0170443 " },
+
+ { 0x123456, "%o", "4432126" },
+ { 0x123456, "%-6o", "4432126" },
+ { 0x123456, "%08o", "04432126" },
+ { 0x123456, "%#o", "04432126" },
+ { 0x123456, "%0#11o", "00004432126" },
+ { 0x123456, "%-#9o", "04432126 " },
+
+ { -3, "%o", "37777777775" },
+ { -3, "%-6o", "37777777775" },
+ { -3, "%08o", "37777777775" },
+ { -3, "%#o", "037777777775" },
+ { -3, "%0#11o", "037777777775" },
+ { -3, "%-#9o", "037777777775" },
+
+ { 0x7654321L, "%o", "731241441" },
+ { 0x7654321L, "%-6o", "731241441" },
+ { 0x7654321L, "%08o", "731241441" },
+ { 0x7654321L, "%#o", "0731241441" },
+ { 0x7654321L, "%0#11o", "00731241441" },
+ { 0x7654321L, "%-#9o", "0731241441" },
+
+ { -1L, "%o", "1777777777777777777777" },
+ { -1L, "%-6o", "1777777777777777777777" },
+ { -1L, "%08o", "1777777777777777777777" },
+ { -1L, "%#o", "01777777777777777777777" },
+ { -1L, "%0#11o", "01777777777777777777777" },
+ { -1L, "%-#9o", "01777777777777777777777" },
+ };
+
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ Formatter f;
+ for (int i = 0; i < triple.length; i++) {
+ f = new Formatter(Locale.ITALY);
+ f.format((String) triple[i][pattern],
+ triple[i][input]);
+ assertEquals("triple[" + i + "]:" + triple[i][input] + ",pattern["
+ + i + "]:" + triple[i][pattern], triple[i][output], f
+ .toString());
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for legal
+ * Byte/Short/Integer/Long conversion type 'x' and 'X'
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_ByteShortIntegerLongConversionX() {
+ final Object[][] triple = {
+ { 0, "%x", "0" },
+ { 0, "%-8x", "0 " },
+ { 0, "%06x", "000000" },
+ { 0, "%#x", "0x0" },
+ { 0, "%0#12x", "0x0000000000" },
+ { 0, "%-#9x", "0x0 " },
+
+ { (byte) 0xff, "%x", "ff" },
+ { (byte) 0xff, "%-8x", "ff " },
+ { (byte) 0xff, "%06x", "0000ff" },
+ { (byte) 0xff, "%#x", "0xff" },
+ { (byte) 0xff, "%0#12x", "0x00000000ff" },
+ { (byte) 0xff, "%-#9x", "0xff " },
+
+ { (short) 0xf123, "%x", "f123" },
+ { (short) 0xf123, "%-8x", "f123 " },
+ { (short) 0xf123, "%06x", "00f123" },
+ { (short) 0xf123, "%#x", "0xf123" },
+ { (short) 0xf123, "%0#12x", "0x000000f123" },
+ { (short) 0xf123, "%-#9x", "0xf123 " },
+
+ { 0x123456, "%x", "123456" },
+ { 0x123456, "%-8x", "123456 " },
+ { 0x123456, "%06x", "123456" },
+ { 0x123456, "%#x", "0x123456" },
+ { 0x123456, "%0#12x", "0x0000123456" },
+ { 0x123456, "%-#9x", "0x123456 " },
+
+ { -3, "%x", "fffffffd" },
+ { -3, "%-8x", "fffffffd" },
+ { -3, "%06x", "fffffffd" },
+ { -3, "%#x", "0xfffffffd" },
+ { -3, "%0#12x", "0x00fffffffd" },
+ { -3, "%-#9x", "0xfffffffd" },
+
+ { 0x7654321L, "%x", "7654321" },
+ { 0x7654321L, "%-8x", "7654321 " },
+ { 0x7654321L, "%06x", "7654321" },
+ { 0x7654321L, "%#x", "0x7654321" },
+ { 0x7654321L, "%0#12x", "0x0007654321" },
+ { 0x7654321L, "%-#9x", "0x7654321" },
+
+ { -1L, "%x", "ffffffffffffffff" },
+ { -1L, "%-8x", "ffffffffffffffff" },
+ { -1L, "%06x", "ffffffffffffffff" },
+ { -1L, "%#x", "0xffffffffffffffff" },
+ { -1L, "%0#12x", "0xffffffffffffffff" },
+ { -1L, "%-#9x", "0xffffffffffffffff" },
+ };
+
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ Formatter f;
+ for (int i = 0; i < triple.length; i++) {
+ f = new Formatter(Locale.FRANCE);
+ f.format((String) triple[i][pattern],
+ triple[i][input]);
+ assertEquals("triple[" + i + "]:" + triple[i][input] + ",pattern["
+ + i + "]:" + triple[i][pattern], triple[i][output], f
+ .toString());
+
+ f = new Formatter(Locale.FRANCE);
+ f.format((String) triple[i][pattern],
+ triple[i][input]);
+ assertEquals("triple[" + i + "]:" + triple[i][input] + ",pattern["
+ + i + "]:" + triple[i][pattern], triple[i][output], f
+ .toString());
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for Date/Time
+ * conversion
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_DateTimeConversion() {
+ Formatter f = null;
+ Date now = new Date(1147327147578L);
+
+ Calendar paris = Calendar.getInstance(TimeZone
+ .getTimeZone("Europe/Paris"), Locale.FRANCE);
+ paris.set(2006, 4, 8, 12, 0, 0);
+ paris.set(Calendar.MILLISECOND, 453);
+ Calendar china = Calendar.getInstance(
+ TimeZone.getTimeZone("GMT-08:00"), Locale.CHINA);
+ china.set(2006, 4, 8, 12, 0, 0);
+ china.set(Calendar.MILLISECOND, 609);
+
+ final Object[][] lowerCaseGermanTriple = {
+ {0L, 'a', "Do"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'a', "So"}, //$NON-NLS-2$
+ {-1000L, 'a', "Do"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'a', "Do"}, //$NON-NLS-2$
+ {paris, 'a', "Mo"}, //$NON-NLS-2$
+ {china, 'a', "Mo"}, //$NON-NLS-2$
+ {0L, 'b', "Jan"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'b', "Aug"}, //$NON-NLS-2$
+ {-1000L, 'b', "Jan"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'b', "Mai"}, //$NON-NLS-2$
+ {paris, 'b', "Mai"}, //$NON-NLS-2$
+ {china, 'b', "Mai"}, //$NON-NLS-2$
+ {0L, 'c', "Do Jan 01 08:00:00 CST 1970"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'c', "So Aug 17 15:12:55 CST 292278994"}, //$NON-NLS-2$
+ {-1000L, 'c', "Do Jan 01 07:59:59 CST 1970"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'c', "Do Mai 11 13:59:07 CST 2006"}, //$NON-NLS-2$
+ {paris, 'c', "Mo Mai 08 12:00:00 CEST 2006"}, //$NON-NLS-2$
+ {china, 'c', "Mo Mai 08 12:00:00 GMT-08:00 2006"}, //$NON-NLS-2$
+ {0L, 'd', "01"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'd', "17"}, //$NON-NLS-2$
+ {-1000L, 'd', "01"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'd', "11"}, //$NON-NLS-2$
+ {paris, 'd', "08"}, //$NON-NLS-2$
+ {china, 'd', "08"}, //$NON-NLS-2$
+ {0L, 'e', "1"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'e', "17"}, //$NON-NLS-2$
+ {-1000L, 'e', "1"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'e', "11"}, //$NON-NLS-2$
+ {paris, 'e', "8"}, //$NON-NLS-2$
+ {china, 'e', "8"}, //$NON-NLS-2$
+ {0L, 'h', "Jan"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'h', "Aug"}, //$NON-NLS-2$
+ {-1000L, 'h', "Jan"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'h', "Mai"}, //$NON-NLS-2$
+ {paris, 'h', "Mai"}, //$NON-NLS-2$
+ {china, 'h', "Mai"}, //$NON-NLS-2$
+ {0L, 'j', "001"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'j', "229"}, //$NON-NLS-2$
+ {-1000L, 'j', "001"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'j', "131"}, //$NON-NLS-2$
+ {paris, 'j', "128"}, //$NON-NLS-2$
+ {china, 'j', "128"}, //$NON-NLS-2$
+ {0L, 'k', "8"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'k', "15"}, //$NON-NLS-2$
+ {-1000L, 'k', "7"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'k', "13"}, //$NON-NLS-2$
+ {paris, 'k', "12"}, //$NON-NLS-2$
+ {china, 'k', "12"}, //$NON-NLS-2$
+ {0L, 'l', "8"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'l', "3"}, //$NON-NLS-2$
+ {-1000L, 'l', "7"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'l', "1"}, //$NON-NLS-2$
+ {paris, 'l', "12"}, //$NON-NLS-2$
+ {china, 'l', "12"}, //$NON-NLS-2$
+ {0L, 'm', "01"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'm', "08"}, //$NON-NLS-2$
+ {-1000L, 'm', "01"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'm', "05"}, //$NON-NLS-2$
+ {paris, 'm', "05"}, //$NON-NLS-2$
+ {china, 'm', "05"}, //$NON-NLS-2$
+ {0L, 'p', "am"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'p', "pm"}, //$NON-NLS-2$
+ {-1000L, 'p', "am"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'p', "pm"}, //$NON-NLS-2$
+ {paris, 'p', "pm"}, //$NON-NLS-2$
+ {china, 'p', "pm"}, //$NON-NLS-2$
+ {0L, 'r', "08:00:00 AM"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'r', "03:12:55 PM"}, //$NON-NLS-2$
+ {-1000L, 'r', "07:59:59 AM"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'r', "01:59:07 PM"}, //$NON-NLS-2$
+ {paris, 'r', "12:00:00 PM"}, //$NON-NLS-2$
+ {china, 'r', "12:00:00 PM"}, //$NON-NLS-2$
+ {0L, 's', "0"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 's', "9223372036854775"}, //$NON-NLS-2$
+ {-1000L, 's', "-1"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 's', "1147327147"}, //$NON-NLS-2$
+ {paris, 's', "1147082400"}, //$NON-NLS-2$
+ {china, 's', "1147118400"}, //$NON-NLS-2$
+ {0L, 'y', "70"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'y', "94"}, //$NON-NLS-2$
+ {-1000L, 'y', "70"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'y', "06"}, //$NON-NLS-2$
+ {paris, 'y', "06"}, //$NON-NLS-2$
+ {china, 'y', "06"}, //$NON-NLS-2$
+ {0L, 'z', "+0800"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'z', "+0800"}, //$NON-NLS-2$
+ {-1000L, 'z', "+0800"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'z', "+0800"}, //$NON-NLS-2$
+ {paris, 'z', "+0100"}, //$NON-NLS-2$
+ {china, 'z', "-0800"}, //$NON-NLS-2$
+
+ };
+
+ final Object[][] lowerCaseFranceTriple = {
+ {0L, 'a', "jeu."}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'a', "dim."}, //$NON-NLS-2$
+ {-1000L, 'a', "jeu."}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'a', "jeu."}, //$NON-NLS-2$
+ {paris, 'a', "lun."}, //$NON-NLS-2$
+ {china, 'a', "lun."}, //$NON-NLS-2$
+ {0L, 'b', "janv."}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'b', "ao\u00fbt"}, //$NON-NLS-2$
+ {-1000L, 'b', "janv."}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'b', "mai"}, //$NON-NLS-2$
+ {paris, 'b', "mai"}, //$NON-NLS-2$
+ {china, 'b', "mai"}, //$NON-NLS-2$
+ {0L, 'c', "jeu. janv. 01 08:00:00 CST 1970"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'c', "dim. ao\u00fbt 17 15:12:55 CST 292278994"}, //$NON-NLS-2$
+ {-1000L, 'c', "jeu. janv. 01 07:59:59 CST 1970"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'c', "jeu. mai 11 13:59:07 CST 2006"}, //$NON-NLS-2$
+ {paris, 'c', "lun. mai 08 12:00:00 CEST 2006"}, //$NON-NLS-2$
+ {china, 'c', "lun. mai 08 12:00:00 GMT-08:00 2006"}, //$NON-NLS-2$
+ {0L, 'd', "01"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'd', "17"}, //$NON-NLS-2$
+ {-1000L, 'd', "01"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'd', "11"}, //$NON-NLS-2$
+ {paris, 'd', "08"}, //$NON-NLS-2$
+ {china, 'd', "08"}, //$NON-NLS-2$
+ {0L, 'e', "1"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'e', "17"}, //$NON-NLS-2$
+ {-1000L, 'e', "1"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'e', "11"}, //$NON-NLS-2$
+ {paris, 'e', "8"}, //$NON-NLS-2$
+ {china, 'e', "8"}, //$NON-NLS-2$
+ {0L, 'h', "janv."}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'h', "ao\u00fbt"}, //$NON-NLS-2$
+ {-1000L, 'h', "janv."}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'h', "mai"}, //$NON-NLS-2$
+ {paris, 'h', "mai"}, //$NON-NLS-2$
+ {china, 'h', "mai"}, //$NON-NLS-2$
+ {0L, 'j', "001"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'j', "229"}, //$NON-NLS-2$
+ {-1000L, 'j', "001"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'j', "131"}, //$NON-NLS-2$
+ {paris, 'j', "128"}, //$NON-NLS-2$
+ {china, 'j', "128"}, //$NON-NLS-2$
+ {0L, 'k', "8"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'k', "15"}, //$NON-NLS-2$
+ {-1000L, 'k', "7"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'k', "13"}, //$NON-NLS-2$
+ {paris, 'k', "12"}, //$NON-NLS-2$
+ {china, 'k', "12"}, //$NON-NLS-2$
+ {0L, 'l', "8"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'l', "3"}, //$NON-NLS-2$
+ {-1000L, 'l', "7"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'l', "1"}, //$NON-NLS-2$
+ {paris, 'l', "12"}, //$NON-NLS-2$
+ {china, 'l', "12"}, //$NON-NLS-2$
+ {0L, 'm', "01"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'm', "08"}, //$NON-NLS-2$
+ {-1000L, 'm', "01"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'm', "05"}, //$NON-NLS-2$
+ {paris, 'm', "05"}, //$NON-NLS-2$
+ {china, 'm', "05"}, //$NON-NLS-2$
+ {0L, 'p', "am"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'p', "pm"}, //$NON-NLS-2$
+ {-1000L, 'p', "am"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'p', "pm"}, //$NON-NLS-2$
+ {paris, 'p', "pm"}, //$NON-NLS-2$
+ {china, 'p', "pm"}, //$NON-NLS-2$
+ {0L, 'r', "08:00:00 AM"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'r', "03:12:55 PM"}, //$NON-NLS-2$
+ {-1000L, 'r', "07:59:59 AM"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'r', "01:59:07 PM"}, //$NON-NLS-2$
+ {paris, 'r', "12:00:00 PM"}, //$NON-NLS-2$
+ {china, 'r', "12:00:00 PM"}, //$NON-NLS-2$
+ {0L, 's', "0"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 's', "9223372036854775"}, //$NON-NLS-2$
+ {-1000L, 's', "-1"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 's', "1147327147"}, //$NON-NLS-2$
+ {paris, 's', "1147082400"}, //$NON-NLS-2$
+ {china, 's', "1147118400"}, //$NON-NLS-2$
+ {0L, 'y', "70"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'y', "94"}, //$NON-NLS-2$
+ {-1000L, 'y', "70"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'y', "06"}, //$NON-NLS-2$
+ {paris, 'y', "06"}, //$NON-NLS-2$
+ {china, 'y', "06"}, //$NON-NLS-2$
+ {0L, 'z', "+0800"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'z', "+0800"}, //$NON-NLS-2$
+ {-1000L, 'z', "+0800"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'z', "+0800"}, //$NON-NLS-2$
+ {paris, 'z', "+0100"}, //$NON-NLS-2$
+ {china, 'z', "-0800"}, //$NON-NLS-2$
+
+ };
+
+ final Object[][] lowerCaseJapanTriple = {
+ {0L, 'a', "\u6728"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'a', "\u65e5"}, //$NON-NLS-2$
+ {-1000L, 'a', "\u6728"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'a', "\u6728"}, //$NON-NLS-2$
+ {paris, 'a', "\u6708"}, //$NON-NLS-2$
+ {china, 'a', "\u6708"}, //$NON-NLS-2$
+ {0L, 'b', "1"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'b', "8"}, //$NON-NLS-2$
+ {-1000L, 'b', "1"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'b', "5"}, //$NON-NLS-2$
+ {paris, 'b', "5"}, //$NON-NLS-2$
+ {china, 'b', "5"}, //$NON-NLS-2$
+ {0L, 'c', "\u6728 1 01 08:00:00 CST 1970"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'c', "\u65e5 8 17 15:12:55 CST 292278994"}, //$NON-NLS-2$
+ {-1000L, 'c', "\u6728 1 01 07:59:59 CST 1970"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'c', "\u6728 5 11 13:59:07 CST 2006"}, //$NON-NLS-2$
+ {paris, 'c', "\u6708 5 08 12:00:00 CEST 2006"}, //$NON-NLS-2$
+ {china, 'c', "\u6708 5 08 12:00:00 GMT-08:00 2006"}, //$NON-NLS-2$
+ {0L, 'd', "01"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'd', "17"}, //$NON-NLS-2$
+ {-1000L, 'd', "01"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'd', "11"}, //$NON-NLS-2$
+ {paris, 'd', "08"}, //$NON-NLS-2$
+ {china, 'd', "08"}, //$NON-NLS-2$
+ {0L, 'e', "1"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'e', "17"}, //$NON-NLS-2$
+ {-1000L, 'e', "1"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'e', "11"}, //$NON-NLS-2$
+ {paris, 'e', "8"}, //$NON-NLS-2$
+ {china, 'e', "8"}, //$NON-NLS-2$
+ {0L, 'h', "1"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'h', "8"}, //$NON-NLS-2$
+ {-1000L, 'h', "1"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'h', "5"}, //$NON-NLS-2$
+ {paris, 'h', "5"}, //$NON-NLS-2$
+ {china, 'h', "5"}, //$NON-NLS-2$
+ {0L, 'j', "001"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'j', "229"}, //$NON-NLS-2$
+ {-1000L, 'j', "001"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'j', "131"}, //$NON-NLS-2$
+ {paris, 'j', "128"}, //$NON-NLS-2$
+ {china, 'j', "128"}, //$NON-NLS-2$
+ {0L, 'k', "8"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'k', "15"}, //$NON-NLS-2$
+ {-1000L, 'k', "7"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'k', "13"}, //$NON-NLS-2$
+ {paris, 'k', "12"}, //$NON-NLS-2$
+ {china, 'k', "12"}, //$NON-NLS-2$
+ {0L, 'l', "8"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'l', "3"}, //$NON-NLS-2$
+ {-1000L, 'l', "7"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'l', "1"}, //$NON-NLS-2$
+ {paris, 'l', "12"}, //$NON-NLS-2$
+ {china, 'l', "12"}, //$NON-NLS-2$
+ {0L, 'm', "01"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'm', "08"}, //$NON-NLS-2$
+ {-1000L, 'm', "01"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'm', "05"}, //$NON-NLS-2$
+ {paris, 'm', "05"}, //$NON-NLS-2$
+ {china, 'm', "05"}, //$NON-NLS-2$
+ {0L, 'p', "\u5348\u524d"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'p', "\u5348\u5f8c"}, //$NON-NLS-2$
+ {-1000L, 'p', "\u5348\u524d"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'p', "\u5348\u5f8c"}, //$NON-NLS-2$
+ {paris, 'p', "\u5348\u5f8c"}, //$NON-NLS-2$
+ {china, 'p', "\u5348\u5f8c"}, //$NON-NLS-2$
+ {0L, 'r', "08:00:00 \u5348\u524d"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'r', "03:12:55 \u5348\u5f8c"}, //$NON-NLS-2$
+ {-1000L, 'r', "07:59:59 \u5348\u524d"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'r', "01:59:07 \u5348\u5f8c"}, //$NON-NLS-2$
+ {paris, 'r', "12:00:00 \u5348\u5f8c"}, //$NON-NLS-2$
+ {china, 'r', "12:00:00 \u5348\u5f8c"}, //$NON-NLS-2$
+ {0L, 's', "0"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 's', "9223372036854775"}, //$NON-NLS-2$
+ {-1000L, 's', "-1"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 's', "1147327147"}, //$NON-NLS-2$
+ {paris, 's', "1147082400"}, //$NON-NLS-2$
+ {china, 's', "1147118400"}, //$NON-NLS-2$
+ {0L, 'y', "70"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'y', "94"}, //$NON-NLS-2$
+ {-1000L, 'y', "70"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'y', "06"}, //$NON-NLS-2$
+ {paris, 'y', "06"}, //$NON-NLS-2$
+ {china, 'y', "06"}, //$NON-NLS-2$
+ {0L, 'z', "+0800"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'z', "+0800"}, //$NON-NLS-2$
+ {-1000L, 'z', "+0800"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'z', "+0800"}, //$NON-NLS-2$
+ {paris, 'z', "+0100"}, //$NON-NLS-2$
+ {china, 'z', "-0800"}, //$NON-NLS-2$
+ };
+
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ for (int i = 0; i < 90; i++) {
+ // go through legal conversion
+ String formatSpecifier = "%t" + lowerCaseGermanTriple[i][pattern]; //$NON-NLS-2$
+ String formatSpecifierUpper = "%T" + lowerCaseGermanTriple[i][pattern]; //$NON-NLS-2$
+ // test '%t'
+ f = new Formatter(Locale.GERMAN);
+ f.format(formatSpecifier, lowerCaseGermanTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifier //$NON-NLS-2$
+ + " Argument: " + lowerCaseGermanTriple[i][pattern], //$NON-NLS-2$
+ lowerCaseGermanTriple[i][output], f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format(Locale.FRANCE, formatSpecifier, lowerCaseFranceTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifier //$NON-NLS-2$
+ + " Argument: " + lowerCaseFranceTriple[i][input], //$NON-NLS-2$
+ lowerCaseFranceTriple[i][output], f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format(Locale.JAPAN, formatSpecifier, lowerCaseJapanTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifier //$NON-NLS-2$
+ + " Argument: " + lowerCaseJapanTriple[i][input], //$NON-NLS-2$
+ lowerCaseJapanTriple[i][output], f.toString());
+
+ // test '%T'
+ f = new Formatter(Locale.GERMAN);
+ f.format(formatSpecifierUpper, lowerCaseGermanTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifierUpper //$NON-NLS-2$
+ + " Argument: " + lowerCaseGermanTriple[i][input], //$NON-NLS-2$
+ ((String)lowerCaseGermanTriple[i][output])
+ .toUpperCase(Locale.US), f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format(Locale.FRANCE, formatSpecifierUpper, lowerCaseFranceTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifierUpper //$NON-NLS-2$
+ + " Argument: " + lowerCaseFranceTriple[i][input], //$NON-NLS-2$
+ ((String)lowerCaseFranceTriple[i][output])
+ .toUpperCase(Locale.US), f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format(Locale.JAPAN, formatSpecifierUpper, lowerCaseJapanTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifierUpper //$NON-NLS-2$
+ + " Argument: " + lowerCaseJapanTriple[i][input], //$NON-NLS-2$
+ ((String)lowerCaseJapanTriple[i][output])
+ .toUpperCase(Locale.US), f.toString());
+ }
+
+ final Object[][] upperCaseGermanTriple = {
+ {0L, 'A', "Donnerstag"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'A', "Sonntag"}, //$NON-NLS-2$
+ {-1000L, 'A', "Donnerstag"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'A', "Donnerstag"}, //$NON-NLS-2$
+ {paris, 'A', "Montag"}, //$NON-NLS-2$
+ {china, 'A', "Montag"}, //$NON-NLS-2$
+ {0L, 'B', "Januar"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'B', "August"}, //$NON-NLS-2$
+ {-1000L, 'B', "Januar"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'B', "Mai"}, //$NON-NLS-2$
+ {paris, 'B', "Mai"}, //$NON-NLS-2$
+ {china, 'B', "Mai"}, //$NON-NLS-2$
+ {0L, 'C', "19"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'C', "2922789"}, //$NON-NLS-2$
+ {-1000L, 'C', "19"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'C', "20"}, //$NON-NLS-2$
+ {paris, 'C', "20"}, //$NON-NLS-2$
+ {china, 'C', "20"}, //$NON-NLS-2$
+ {0L, 'D', "01/01/70"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'D', "08/17/94"}, //$NON-NLS-2$
+ {-1000L, 'D', "01/01/70"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'D', "05/11/06"}, //$NON-NLS-2$
+ {paris, 'D', "05/08/06"}, //$NON-NLS-2$
+ {china, 'D', "05/08/06"}, //$NON-NLS-2$
+ {0L, 'F', "1970-01-01"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'F', "292278994-08-17"}, //$NON-NLS-2$
+ {-1000L, 'F', "1970-01-01"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'F', "2006-05-11"}, //$NON-NLS-2$
+ {paris, 'F', "2006-05-08"}, //$NON-NLS-2$
+ {china, 'F', "2006-05-08"}, //$NON-NLS-2$
+ {0L, 'H', "08"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'H', "15"}, //$NON-NLS-2$
+ {-1000L, 'H', "07"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'H', "13"}, //$NON-NLS-2$
+ {paris, 'H', "12"}, //$NON-NLS-2$
+ {china, 'H', "12"}, //$NON-NLS-2$
+ {0L, 'I', "08"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'I', "03"}, //$NON-NLS-2$
+ {-1000L, 'I', "07"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'I', "01"}, //$NON-NLS-2$
+ {paris, 'I', "12"}, //$NON-NLS-2$
+ {china, 'I', "12"}, //$NON-NLS-2$
+ {0L, 'L', "000"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'L', "807"}, //$NON-NLS-2$
+ {-1000L, 'L', "000"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'L', "578"}, //$NON-NLS-2$
+ {paris, 'L', "453"}, //$NON-NLS-2$
+ {china, 'L', "609"}, //$NON-NLS-2$
+ {0L, 'M', "00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'M', "12"}, //$NON-NLS-2$
+ {-1000L, 'M', "59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'M', "59"}, //$NON-NLS-2$
+ {paris, 'M', "00"}, //$NON-NLS-2$
+ {china, 'M', "00"}, //$NON-NLS-2$
+ {0L, 'N', "000000000"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'N', "807000000"}, //$NON-NLS-2$
+ {-1000L, 'N', "000000000"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'N', "578000000"}, //$NON-NLS-2$
+ {paris, 'N', "609000000"}, //$NON-NLS-2$
+ {china, 'N', "609000000"}, //$NON-NLS-2$
+ {0L, 'Q', "0"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'Q', "9223372036854775807"}, //$NON-NLS-2$
+ {-1000L, 'Q', "-1000"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'Q', "1147327147578"}, //$NON-NLS-2$
+ {paris, 'Q', "1147082400453"}, //$NON-NLS-2$
+ {china, 'Q', "1147118400609"}, //$NON-NLS-2$
+ {0L, 'R', "08:00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'R', "15:12"}, //$NON-NLS-2$
+ {-1000L, 'R', "07:59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'R', "13:59"}, //$NON-NLS-2$
+ {paris, 'R', "12:00"}, //$NON-NLS-2$
+ {china, 'R', "12:00"}, //$NON-NLS-2$
+ {0L, 'S', "00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'S', "55"}, //$NON-NLS-2$
+ {-1000L, 'S', "59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'S', "07"}, //$NON-NLS-2$
+ {paris, 'S', "00"}, //$NON-NLS-2$
+ {china, 'S', "00"}, //$NON-NLS-2$
+ {0L, 'T', "08:00:00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'T', "15:12:55"}, //$NON-NLS-2$
+ {-1000L, 'T', "07:59:59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'T', "13:59:07"}, //$NON-NLS-2$
+ {paris, 'T', "12:00:00"}, //$NON-NLS-2$
+ {china, 'T', "12:00:00"}, //$NON-NLS-2$
+ {0L, 'Y', "1970"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'Y', "292278994"}, //$NON-NLS-2$
+ {-1000L, 'Y', "1970"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'Y', "2006"}, //$NON-NLS-2$
+ {paris, 'Y', "2006"}, //$NON-NLS-2$
+ {china, 'Y', "2006"}, //$NON-NLS-2$
+ {0L, 'Z', "CST"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'Z', "CST"}, //$NON-NLS-2$
+ {-1000L, 'Z', "CST"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'Z', "CST"}, //$NON-NLS-2$
+ {paris, 'Z', "CEST"}, //$NON-NLS-2$
+ {china, 'Z', "GMT-08:00"}, //$NON-NLS-2$
+
+ };
+
+ final Object[][] upperCaseFranceTriple = {
+ {0L, 'A', "jeudi"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'A', "dimanche"}, //$NON-NLS-2$
+ {-1000L, 'A', "jeudi"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'A', "jeudi"}, //$NON-NLS-2$
+ {paris, 'A', "lundi"}, //$NON-NLS-2$
+ {china, 'A', "lundi"}, //$NON-NLS-2$
+ {0L, 'B', "janvier"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'B', "ao\u00fbt"}, //$NON-NLS-2$
+ {-1000L, 'B', "janvier"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'B', "mai"}, //$NON-NLS-2$
+ {paris, 'B', "mai"}, //$NON-NLS-2$
+ {china, 'B', "mai"}, //$NON-NLS-2$
+ {0L, 'C', "19"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'C', "2922789"}, //$NON-NLS-2$
+ {-1000L, 'C', "19"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'C', "20"}, //$NON-NLS-2$
+ {paris, 'C', "20"}, //$NON-NLS-2$
+ {china, 'C', "20"}, //$NON-NLS-2$
+ {0L, 'D', "01/01/70"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'D', "08/17/94"}, //$NON-NLS-2$
+ {-1000L, 'D', "01/01/70"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'D', "05/11/06"}, //$NON-NLS-2$
+ {paris, 'D', "05/08/06"}, //$NON-NLS-2$
+ {china, 'D', "05/08/06"}, //$NON-NLS-2$
+ {0L, 'F', "1970-01-01"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'F', "292278994-08-17"}, //$NON-NLS-2$
+ {-1000L, 'F', "1970-01-01"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'F', "2006-05-11"}, //$NON-NLS-2$
+ {paris, 'F', "2006-05-08"}, //$NON-NLS-2$
+ {china, 'F', "2006-05-08"}, //$NON-NLS-2$
+ {0L, 'H', "08"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'H', "15"}, //$NON-NLS-2$
+ {-1000L, 'H', "07"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'H', "13"}, //$NON-NLS-2$
+ {paris, 'H', "12"}, //$NON-NLS-2$
+ {china, 'H', "12"}, //$NON-NLS-2$
+ {0L, 'I', "08"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'I', "03"}, //$NON-NLS-2$
+ {-1000L, 'I', "07"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'I', "01"}, //$NON-NLS-2$
+ {paris, 'I', "12"}, //$NON-NLS-2$
+ {china, 'I', "12"}, //$NON-NLS-2$
+ {0L, 'L', "000"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'L', "807"}, //$NON-NLS-2$
+ {-1000L, 'L', "000"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'L', "578"}, //$NON-NLS-2$
+ {paris, 'L', "453"}, //$NON-NLS-2$
+ {china, 'L', "609"}, //$NON-NLS-2$
+ {0L, 'M', "00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'M', "12"}, //$NON-NLS-2$
+ {-1000L, 'M', "59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'M', "59"}, //$NON-NLS-2$
+ {paris, 'M', "00"}, //$NON-NLS-2$
+ {china, 'M', "00"}, //$NON-NLS-2$
+ {0L, 'N', "000000000"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'N', "807000000"}, //$NON-NLS-2$
+ {-1000L, 'N', "000000000"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'N', "578000000"}, //$NON-NLS-2$
+ {paris, 'N', "453000000"}, //$NON-NLS-2$
+ {china, 'N', "468000000"}, //$NON-NLS-2$
+ {0L, 'Q', "0"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'Q', "9223372036854775807"}, //$NON-NLS-2$
+ {-1000L, 'Q', "-1000"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'Q', "1147327147578"}, //$NON-NLS-2$
+ {paris, 'Q', "1147082400453"}, //$NON-NLS-2$
+ {china, 'Q', "1147118400609"}, //$NON-NLS-2$
+ {0L, 'R', "08:00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'R', "15:12"}, //$NON-NLS-2$
+ {-1000L, 'R', "07:59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'R', "13:59"}, //$NON-NLS-2$
+ {paris, 'R', "12:00"}, //$NON-NLS-2$
+ {china, 'R', "12:00"}, //$NON-NLS-2$
+ {0L, 'S', "00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'S', "55"}, //$NON-NLS-2$
+ {-1000L, 'S', "59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'S', "07"}, //$NON-NLS-2$
+ {paris, 'S', "00"}, //$NON-NLS-2$
+ {china, 'S', "00"}, //$NON-NLS-2$
+ {0L, 'T', "08:00:00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'T', "15:12:55"}, //$NON-NLS-2$
+ {-1000L, 'T', "07:59:59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'T', "13:59:07"}, //$NON-NLS-2$
+ {paris, 'T', "12:00:00"}, //$NON-NLS-2$
+ {china, 'T', "12:00:00"}, //$NON-NLS-2$
+ {0L, 'Y', "1970"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'Y', "292278994"}, //$NON-NLS-2$
+ {-1000L, 'Y', "1970"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'Y', "2006"}, //$NON-NLS-2$
+ {paris, 'Y', "2006"}, //$NON-NLS-2$
+ {china, 'Y', "2006"}, //$NON-NLS-2$
+ {0L, 'Z', "CST"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'Z', "CST"}, //$NON-NLS-2$
+ {-1000L, 'Z', "CST"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'Z', "CST"}, //$NON-NLS-2$
+ {paris, 'Z', "CEST"}, //$NON-NLS-2$
+ {china, 'Z', "GMT-08:00"}, //$NON-NLS-2$
+
+ };
+
+ final Object[][] upperCaseJapanTriple = {
+ {0L, 'A', "\u6728\u66dc\u65e5"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'A', "\u65e5\u66dc\u65e5"}, //$NON-NLS-2$
+ {-1000L, 'A', "\u6728\u66dc\u65e5"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'A', "\u6728\u66dc\u65e5"}, //$NON-NLS-2$
+ {paris, 'A', "\u6708\u66dc\u65e5"}, //$NON-NLS-2$
+ {china, 'A', "\u6708\u66dc\u65e5"}, //$NON-NLS-2$
+ {0L, 'B', "1\u6708"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'B', "8\u6708"}, //$NON-NLS-2$
+ {-1000L, 'B', "1\u6708"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'B', "5\u6708"}, //$NON-NLS-2$
+ {paris, 'B', "5\u6708"}, //$NON-NLS-2$
+ {china, 'B', "5\u6708"}, //$NON-NLS-2$
+ {0L, 'C', "19"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'C', "2922789"}, //$NON-NLS-2$
+ {-1000L, 'C', "19"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'C', "20"}, //$NON-NLS-2$
+ {paris, 'C', "20"}, //$NON-NLS-2$
+ {china, 'C', "20"}, //$NON-NLS-2$
+ {0L, 'D', "01/01/70"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'D', "08/17/94"}, //$NON-NLS-2$
+ {-1000L, 'D', "01/01/70"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'D', "05/11/06"}, //$NON-NLS-2$
+ {paris, 'D', "05/08/06"}, //$NON-NLS-2$
+ {china, 'D', "05/08/06"}, //$NON-NLS-2$
+ {0L, 'F', "1970-01-01"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'F', "292278994-08-17"}, //$NON-NLS-2$
+ {-1000L, 'F', "1970-01-01"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'F', "2006-05-11"}, //$NON-NLS-2$
+ {paris, 'F', "2006-05-08"}, //$NON-NLS-2$
+ {china, 'F', "2006-05-08"}, //$NON-NLS-2$
+ {0L, 'H', "08"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'H', "15"}, //$NON-NLS-2$
+ {-1000L, 'H', "07"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'H', "13"}, //$NON-NLS-2$
+ {paris, 'H', "12"}, //$NON-NLS-2$
+ {china, 'H', "12"}, //$NON-NLS-2$
+ {0L, 'I', "08"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'I', "03"}, //$NON-NLS-2$
+ {-1000L, 'I', "07"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'I', "01"}, //$NON-NLS-2$
+ {paris, 'I', "12"}, //$NON-NLS-2$
+ {china, 'I', "12"}, //$NON-NLS-2$
+ {0L, 'L', "000"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'L', "807"}, //$NON-NLS-2$
+ {-1000L, 'L', "000"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'L', "578"}, //$NON-NLS-2$
+ {paris, 'L', "453"}, //$NON-NLS-2$
+ {china, 'L', "609"}, //$NON-NLS-2$
+ {0L, 'M', "00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'M', "12"}, //$NON-NLS-2$
+ {-1000L, 'M', "59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'M', "59"}, //$NON-NLS-2$
+ {paris, 'M', "00"}, //$NON-NLS-2$
+ {china, 'M', "00"}, //$NON-NLS-2$
+ {0L, 'N', "000000000"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'N', "807000000"}, //$NON-NLS-2$
+ {-1000L, 'N', "000000000"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'N', "578000000"}, //$NON-NLS-2$
+ {paris, 'N', "453000000"}, //$NON-NLS-2$
+ {china, 'N', "468000000"}, //$NON-NLS-2$
+ {0L, 'Q', "0"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'Q', "9223372036854775807"}, //$NON-NLS-2$
+ {-1000L, 'Q', "-1000"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'Q', "1147327147578"}, //$NON-NLS-2$
+ {paris, 'Q', "1147082400453"}, //$NON-NLS-2$
+ {china, 'Q', "1147118400609"}, //$NON-NLS-2$
+ {0L, 'R', "08:00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'R', "15:12"}, //$NON-NLS-2$
+ {-1000L, 'R', "07:59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'R', "13:59"}, //$NON-NLS-2$
+ {paris, 'R', "12:00"}, //$NON-NLS-2$
+ {china, 'R', "12:00"}, //$NON-NLS-2$
+ {0L, 'S', "00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'S', "55"}, //$NON-NLS-2$
+ {-1000L, 'S', "59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'S', "07"}, //$NON-NLS-2$
+ {paris, 'S', "00"}, //$NON-NLS-2$
+ {china, 'S', "00"}, //$NON-NLS-2$
+ {0L, 'T', "08:00:00"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'T', "15:12:55"}, //$NON-NLS-2$
+ {-1000L, 'T', "07:59:59"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'T', "13:59:07"}, //$NON-NLS-2$
+ {paris, 'T', "12:00:00"}, //$NON-NLS-2$
+ {china, 'T', "12:00:00"}, //$NON-NLS-2$
+ {0L, 'Y', "1970"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'Y', "292278994"}, //$NON-NLS-2$
+ {-1000L, 'Y', "1970"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'Y', "2006"}, //$NON-NLS-2$
+ {paris, 'Y', "2006"}, //$NON-NLS-2$
+ {china, 'Y', "2006"}, //$NON-NLS-2$
+ {0L, 'Z', "CST"}, //$NON-NLS-2$
+ {Long.MAX_VALUE, 'Z', "CST"}, //$NON-NLS-2$
+ {-1000L, 'Z', "CST"}, //$NON-NLS-2$
+ {new Date(1147327147578L), 'Z', "CST"}, //$NON-NLS-2$
+ {paris, 'Z', "CEST"}, //$NON-NLS-2$
+ {china, 'Z', "GMT-08:00"}, //$NON-NLS-2$
+ };
+
+
+ for (int i = 0; i < 90; i++) {
+ String formatSpecifier = "%t" + upperCaseGermanTriple[i][pattern]; //$NON-NLS-2$
+ String formatSpecifierUpper = "%T" + upperCaseGermanTriple[i][pattern]; //$NON-NLS-2$
+ if ((Character)upperCaseGermanTriple[i][pattern] == 'N') {
+ // result can't be predicted on RI, so skip this test
+ continue;
+ }
+ // test '%t'
+ f = new Formatter(Locale.JAPAN);
+ f.format(formatSpecifier, upperCaseJapanTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifier //$NON-NLS-2$
+ + " Argument: " + upperCaseJapanTriple[i][input], //$NON-NLS-2$
+ upperCaseJapanTriple[i][output], f.toString());
+
+ f = new Formatter(Locale.JAPAN);
+ f.format(Locale.GERMAN, formatSpecifier, upperCaseGermanTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifier //$NON-NLS-2$
+ + " Argument: " + upperCaseGermanTriple[i][input], //$NON-NLS-2$
+ upperCaseGermanTriple[i][output], f.toString());
+
+ f = new Formatter(Locale.JAPAN);
+ f.format(Locale.FRANCE, formatSpecifier, upperCaseFranceTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifier //$NON-NLS-2$
+ + " Argument: " + upperCaseFranceTriple[i][input], //$NON-NLS-2$
+ upperCaseFranceTriple[i][output], f.toString());
+
+ // test '%T'
+ f = new Formatter(Locale.GERMAN);
+ f.format(formatSpecifierUpper, upperCaseGermanTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifierUpper //$NON-NLS-2$
+ + " Argument: " + upperCaseGermanTriple[i][input], //$NON-NLS-2$
+ ((String)upperCaseGermanTriple[i][output])
+ .toUpperCase(Locale.US), f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format(Locale.JAPAN, formatSpecifierUpper, upperCaseJapanTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifierUpper //$NON-NLS-2$
+ + " Argument: " + upperCaseJapanTriple[i][input], //$NON-NLS-2$
+ ((String)upperCaseJapanTriple[i][output])
+ .toUpperCase(Locale.US), f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format(Locale.FRANCE, formatSpecifierUpper, upperCaseFranceTriple[i][input]);
+ assertEquals("Format pattern: " + formatSpecifierUpper //$NON-NLS-2$
+ + " Argument: " + upperCaseFranceTriple[i][input], //$NON-NLS-2$
+ ((String)upperCaseFranceTriple[i][output])
+ .toUpperCase(Locale.US), f.toString());
+ }
+
+ f = new Formatter(Locale.US);
+ f.format("%-10ta", now); //$NON-NLS-2$
+ assertEquals("Thu ", f.toString()); //$NON-NLS-2$
+
+ f = new Formatter(Locale.US);
+ f.format("%10000000000000000000000000000000001ta", now); //$NON-NLS-2$
+ assertEquals("Thu", f.toString().trim()); //$NON-NLS-2$
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for null argment for
+ * Byte/Short/Integer/Long/BigInteger conversion
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_ByteShortIntegerLongNullConversion() {
+
+ Formatter f = new Formatter(Locale.FRANCE);
+ f.format("%d%
+ * MissingFormatWidthException > IllegalFormatFlagsException >
+ * IllegalFormatPrecisionException > IllegalFormatConversionException >
+ * FormatFlagsConversionMismatchException
+ *
+ */
+ f = new Formatter(Locale.US);
+ try {
+ // compare IllegalFormatConversionException and
+ // FormatFlagsConversionMismatchException
+ f.format("%(o", false);
+ fail("should throw IllegalFormatConversionException");
+ } catch (IllegalFormatConversionException e) {
+ // expected
+ }
+
+ try {
+ // compare IllegalFormatPrecisionException and
+ // IllegalFormatConversionException
+ f.format("%.4o", false);
+ fail("should throw IllegalFormatPrecisionException");
+ } catch (IllegalFormatPrecisionException e) {
+ // expected
+ }
+
+ try {
+ // compare IllegalFormatFlagsException and
+ // IllegalFormatPrecisionException
+ f.format("%+ .4o", big);
+ fail("should throw IllegalFormatFlagsException");
+ } catch (IllegalFormatFlagsException e) {
+ // expected
+ }
+
+ try {
+ // compare MissingFormatWidthException and
+ // IllegalFormatFlagsException
+ f.format("%+ -o", big);
+ fail("should throw MissingFormatWidthException");
+ } catch (MissingFormatWidthException e) {
+ // expected
+ }
+
+ try {
+ // compare UnknownFormatConversionException and
+ // MissingFormatWidthException
+ f.format("%-O", big);
+ fail("should throw UnknownFormatConversionException");
+ } catch (UnknownFormatConversionException e) {
+ // expected
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for Float/Double
+ * conversion type 'e' and 'E'
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionE() {
+ Formatter f = null;
+ final Object[][] tripleE = {
+ {0f, "%e", "0.000000e+00"},
+ {0f, "%#.0e", "0.e+00"},
+ {0f, "%#- (9.8e", " 0.00000000e+00"},
+ {0f, "%#+0(8.4e", "+0.0000e+00"},
+ {0f, "%-+(1.6e", "+0.000000e+00"},
+ {0f, "% 0(12e", " 0.000000e+00"},
+
+ {101f, "%e", "1.010000e+02"},
+ {101f, "%#.0e", "1.e+02"},
+ {101f, "%#- (9.8e", " 1.01000000e+02"},
+ {101f, "%#+0(8.4e", "+1.0100e+02"},
+ {101f, "%-+(1.6e", "+1.010000e+02"},
+ {101f, "% 0(12e", " 1.010000e+02"},
+
+ {1.f, "%e", "1.000000e+00"},
+ {1.f, "%#.0e", "1.e+00"},
+ {1.f, "%#- (9.8e", " 1.00000000e+00"},
+ {1.f, "%#+0(8.4e", "+1.0000e+00"},
+ {1.f, "%-+(1.6e", "+1.000000e+00"},
+ {1.f, "% 0(12e", " 1.000000e+00"},
+
+ {-98f, "%e", "-9.800000e+01"},
+ {-98f, "%#.0e", "-1.e+02"},
+ {-98f, "%#- (9.8e", "(9.80000000e+01)"},
+ {-98f, "%#+0(8.4e", "(9.8000e+01)"},
+ {-98f, "%-+(1.6e", "(9.800000e+01)"},
+ {-98f, "% 0(12e", "(9.800000e+01)"},
+
+ {1.23f, "%e", "1.230000e+00"},
+ {1.23f, "%#.0e", "1.e+00"},
+ {1.23f, "%#- (9.8e", " 1.23000002e+00"},
+ {1.23f, "%#+0(8.4e", "+1.2300e+00"},
+ {1.23f, "%-+(1.6e", "+1.230000e+00"},
+ {1.23f, "% 0(12e", " 1.230000e+00"},
+
+ {34.1234567f, "%e", "3.412346e+01"},
+ {34.1234567f, "%#.0e", "3.e+01"},
+ {34.1234567f, "%#- (9.8e", " 3.41234550e+01"},
+ {34.1234567f, "%#+0(8.4e", "+3.4123e+01"},
+ {34.1234567f, "%-+(1.6e", "+3.412346e+01"},
+ {34.1234567f, "% 0(12e", " 3.412346e+01"},
+
+ {-.12345f, "%e", "-1.234500e-01"},
+ {-.12345f, "%#.0e", "-1.e-01"},
+ {-.12345f, "%#- (9.8e", "(1.23450004e-01)"},
+ {-.12345f, "%#+0(8.4e", "(1.2345e-01)"},
+ {-.12345f, "%-+(1.6e", "(1.234500e-01)"},
+ {-.12345f, "% 0(12e", "(1.234500e-01)"},
+
+ {-9876.1234567f, "%e", "-9.876123e+03"},
+ {-9876.1234567f, "%#.0e", "-1.e+04"},
+ {-9876.1234567f, "%#- (9.8e", "(9.87612305e+03)"},
+ {-9876.1234567f, "%#+0(8.4e", "(9.8761e+03)"},
+ {-9876.1234567f, "%-+(1.6e", "(9.876123e+03)"},
+ {-9876.1234567f, "% 0(12e", "(9.876123e+03)"},
+
+ {Float.MAX_VALUE, "%e", "3.402823e+38"},
+ {Float.MAX_VALUE, "%#.0e", "3.e+38"},
+ {Float.MAX_VALUE, "%#- (9.8e", " 3.40282347e+38"},
+ {Float.MAX_VALUE, "%#+0(8.4e", "+3.4028e+38"},
+ {Float.MAX_VALUE, "%-+(1.6e", "+3.402823e+38"},
+ {Float.MAX_VALUE, "% 0(12e", " 3.402823e+38"},
+
+ {Float.MIN_VALUE, "%e", "1.401298e-45"},
+ {Float.MIN_VALUE, "%#.0e", "1.e-45"},
+ {Float.MIN_VALUE, "%#- (9.8e", " 1.40129846e-45"},
+ {Float.MIN_VALUE, "%#+0(8.4e", "+1.4013e-45"},
+ {Float.MIN_VALUE, "%-+(1.6e", "+1.401298e-45"},
+ {Float.MIN_VALUE, "% 0(12e", " 1.401298e-45"},
+
+ {Float.NaN, "%e", "NaN"},
+ {Float.NaN, "%#.0e", "NaN"},
+ {Float.NaN, "%#- (9.8e", "NaN "},
+ {Float.NaN, "%#+0(8.4e", " NaN"},
+ {Float.NaN, "%-+(1.6e", "NaN"},
+ {Float.NaN, "% 0(12e", " NaN"},
+
+
+ {Float.NEGATIVE_INFINITY, "%e", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%#.0e", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%#- (9.8e", "(Infinity)"},
+ {Float.NEGATIVE_INFINITY, "%#+0(8.4e", "(Infinity)"},
+ {Float.NEGATIVE_INFINITY, "%-+(1.6e", "(Infinity)"},
+ {Float.NEGATIVE_INFINITY, "% 0(12e", " (Infinity)"},
+
+ {Float.NEGATIVE_INFINITY, "%e", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%#.0e", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%#- (9.8e", "(Infinity)"},
+ {Float.NEGATIVE_INFINITY, "%#+0(8.4e", "(Infinity)"},
+ {Float.NEGATIVE_INFINITY, "%-+(1.6e", "(Infinity)"},
+ {Float.NEGATIVE_INFINITY, "% 0(12e", " (Infinity)"},
+
+ {0d, "%e", "0.000000e+00"},
+ {0d, "%#.0e", "0.e+00"},
+ {0d, "%#- (9.8e", " 0.00000000e+00"},
+ {0d, "%#+0(8.4e", "+0.0000e+00"},
+ {0d, "%-+(1.6e", "+0.000000e+00"},
+ {0d, "% 0(12e", " 0.000000e+00"},
+
+ {1d, "%e", "1.000000e+00"},
+ {1d, "%#.0e", "1.e+00"},
+ {1d, "%#- (9.8e", " 1.00000000e+00"},
+ {1d, "%#+0(8.4e", "+1.0000e+00"},
+ {1d, "%-+(1.6e", "+1.000000e+00"},
+ {1d, "% 0(12e", " 1.000000e+00"},
+
+ {-1d, "%e", "-1.000000e+00"},
+ {-1d, "%#.0e", "-1.e+00"},
+ {-1d, "%#- (9.8e", "(1.00000000e+00)"},
+ {-1d, "%#+0(8.4e", "(1.0000e+00)"},
+ {-1d, "%-+(1.6e", "(1.000000e+00)"},
+ {-1d, "% 0(12e", "(1.000000e+00)"},
+
+
+ {.00000001d, "%e", "1.000000e-08"},
+ {.00000001d, "%#.0e", "1.e-08"},
+ {.00000001d, "%#- (9.8e", " 1.00000000e-08"},
+ {.00000001d, "%#+0(8.4e", "+1.0000e-08"},
+ {.00000001d, "%-+(1.6e", "+1.000000e-08"},
+ {.00000001d, "% 0(12e", " 1.000000e-08"},
+
+ {9122.10d, "%e", "9.122100e+03"},
+ {9122.10d, "%#.0e", "9.e+03"},
+ {9122.10d, "%#- (9.8e", " 9.12210000e+03"},
+ {9122.10d, "%#+0(8.4e", "+9.1221e+03"},
+ {9122.10d, "%-+(1.6e", "+9.122100e+03"},
+ {9122.10d, "% 0(12e", " 9.122100e+03"},
+
+ {0.1d, "%e", "1.000000e-01"},
+ {0.1d, "%#.0e", "1.e-01"},
+ {0.1d, "%#- (9.8e", " 1.00000000e-01"},
+ {0.1d, "%#+0(8.4e", "+1.0000e-01"},
+ {0.1d, "%-+(1.6e", "+1.000000e-01"},
+ {0.1d, "% 0(12e", " 1.000000e-01"},
+
+ {-2.d, "%e", "-2.000000e+00"},
+ {-2.d, "%#.0e", "-2.e+00"},
+ {-2.d, "%#- (9.8e", "(2.00000000e+00)"},
+ {-2.d, "%#+0(8.4e", "(2.0000e+00)"},
+ {-2.d, "%-+(1.6e", "(2.000000e+00)"},
+ {-2.d, "% 0(12e", "(2.000000e+00)"},
+
+ {-.39d, "%e", "-3.900000e-01"},
+ {-.39d, "%#.0e", "-4.e-01"},
+ {-.39d, "%#- (9.8e", "(3.90000000e-01)"},
+ {-.39d, "%#+0(8.4e", "(3.9000e-01)"},
+ {-.39d, "%-+(1.6e", "(3.900000e-01)"},
+ {-.39d, "% 0(12e", "(3.900000e-01)"},
+
+ {-1234567890.012345678d, "%e", "-1.234568e+09"},
+ {-1234567890.012345678d, "%#.0e", "-1.e+09"},
+ {-1234567890.012345678d, "%#- (9.8e", "(1.23456789e+09)"},
+ {-1234567890.012345678d, "%#+0(8.4e", "(1.2346e+09)"},
+ {-1234567890.012345678d, "%-+(1.6e", "(1.234568e+09)"},
+ {-1234567890.012345678d, "% 0(12e", "(1.234568e+09)"},
+
+ {Double.MAX_VALUE, "%e", "1.797693e+308"},
+ {Double.MAX_VALUE, "%#.0e", "2.e+308"},
+ {Double.MAX_VALUE, "%#- (9.8e", " 1.79769313e+308"},
+ {Double.MAX_VALUE, "%#+0(8.4e", "+1.7977e+308"},
+ {Double.MAX_VALUE, "%-+(1.6e", "+1.797693e+308"},
+ {Double.MAX_VALUE, "% 0(12e", " 1.797693e+308"},
+
+ {Double.MIN_VALUE, "%e", "4.900000e-324"},
+ {Double.MIN_VALUE, "%#.0e", "5.e-324"},
+ {Double.MIN_VALUE, "%#- (9.8e", " 4.90000000e-324"},
+ {Double.MIN_VALUE, "%#+0(8.4e", "+4.9000e-324"},
+ {Double.MIN_VALUE, "%-+(1.6e", "+4.900000e-324"},
+ {Double.MIN_VALUE, "% 0(12e", " 4.900000e-324"},
+
+ {Double.NaN, "%e", "NaN"},
+ {Double.NaN, "%#.0e", "NaN"},
+ {Double.NaN, "%#- (9.8e", "NaN "},
+ {Double.NaN, "%#+0(8.4e", " NaN"},
+ {Double.NaN, "%-+(1.6e", "NaN"},
+ {Double.NaN, "% 0(12e", " NaN"},
+
+ {Double.NEGATIVE_INFINITY, "%e", "-Infinity"},
+ {Double.NEGATIVE_INFINITY, "%#.0e", "-Infinity"},
+ {Double.NEGATIVE_INFINITY, "%#- (9.8e", "(Infinity)"},
+ {Double.NEGATIVE_INFINITY, "%#+0(8.4e", "(Infinity)"},
+ {Double.NEGATIVE_INFINITY, "%-+(1.6e", "(Infinity)"},
+ {Double.NEGATIVE_INFINITY, "% 0(12e", " (Infinity)"},
+
+ {Double.POSITIVE_INFINITY, "%e", "Infinity"},
+ {Double.POSITIVE_INFINITY, "%#.0e", "Infinity"},
+ {Double.POSITIVE_INFINITY, "%#- (9.8e", " Infinity"},
+ {Double.POSITIVE_INFINITY, "%#+0(8.4e", "+Infinity"},
+ {Double.POSITIVE_INFINITY, "%-+(1.6e", "+Infinity"},
+ {Double.POSITIVE_INFINITY, "% 0(12e", " Infinity"},
+ };
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ for (int i = 0; i < tripleE.length; i++) {
+ f = new Formatter(Locale.US);
+ f.format((String)tripleE[i][pattern], tripleE[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleE[i][input] + ",pattern["
+ + i + "]:" + tripleE[i][pattern],
+ tripleE[i][output], f.toString());
+
+ // test for conversion type 'E'
+ f = new Formatter(Locale.US);
+ f.format(((String)tripleE[i][pattern]).toUpperCase(), tripleE[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleE[i][input] + ",pattern["
+ + i + "]:" + tripleE[i][pattern], ((String)tripleE[i][output])
+ .toUpperCase(Locale.UK), f.toString());
+ }
+
+ f = new Formatter(Locale.GERMAN);
+ f.format("%e", 1001f);
+ /*
+ * fail on RI, spec says 'e' requires the output to be formatted in
+ * general scientific notation and the localization algorithm is
+ * applied. But RI format this case to 1.001000e+03, which does not
+ * conform to the German Locale
+ */
+ assertEquals("1,001000e+03", f.toString());
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for Float/Double
+ * conversion type 'g' and 'G'
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionG() {
+ Formatter f = null;
+ final Object[][] tripleG = {
+ {1001f, "%g", "1001.00"},
+ {1001f, "%- (,9.8g", " 1,001.0000"},
+ {1001f, "%+0(,8.4g", "+001,001"},
+ {1001f, "%-+(,1.6g", "+1,001.00"},
+ {1001f, "% 0(,12.0g", " 0000001e+03"},
+
+ {1.f, "%g", "1.00000"},
+ {1.f, "%- (,9.8g", " 1.0000000"},
+ {1.f, "%+0(,8.4g", "+001.000"},
+ {1.f, "%-+(,1.6g", "+1.00000"},
+ {1.f, "% 0(,12.0g", " 00000000001"},
+
+ {-98f, "%g", "-98.0000"},
+ {-98f, "%- (,9.8g", "(98.000000)"},
+ {-98f, "%+0(,8.4g", "(098.00)"},
+ {-98f, "%-+(,1.6g", "(98.0000)"},
+ {-98f, "% 0(,12.0g", "(000001e+02)"},
+
+ {0.000001f, "%g", "1.00000e-06"},
+ {0.000001f, "%- (,9.8g", " 1.0000000e-06"},
+ {0.000001f, "%+0(,8.4g", "+1.000e-06"},
+ {0.000001f, "%-+(,1.6g", "+1.00000e-06"},
+ {0.000001f, "% 0(,12.0g", " 0000001e-06"},
+
+ {345.1234567f, "%g", "345.123"},
+ {345.1234567f, "%- (,9.8g", " 345.12344"},
+ {345.1234567f, "%+0(,8.4g", "+00345.1"},
+ {345.1234567f, "%-+(,1.6g", "+345.123"},
+ {345.1234567f, "% 0(,12.0g", " 0000003e+02"},
+
+ {-.00000012345f, "%g", "-1.23450e-07"},
+ {-.00000012345f, "%- (,9.8g", "(1.2344999e-07)"},
+ {-.00000012345f, "%+0(,8.4g", "(1.234e-07)"},
+ {-.00000012345f, "%-+(,1.6g", "(1.23450e-07)"},
+ {-.00000012345f, "% 0(,12.0g", "(000001e-07)"},
+
+ {-987.1234567f, "%g", "-987.123"},
+ {-987.1234567f, "%- (,9.8g", "(987.12347)"},
+ {-987.1234567f, "%+0(,8.4g", "(0987.1)"},
+ {-987.1234567f, "%-+(,1.6g", "(987.123)"},
+ {-987.1234567f, "% 0(,12.0g", "(000001e+03)"},
+
+ {Float.MAX_VALUE, "%g", "3.40282e+38"},
+ {Float.MAX_VALUE, "%- (,9.8g", " 3.4028235e+38"},
+ {Float.MAX_VALUE, "%+0(,8.4g", "+3.403e+38"},
+ {Float.MAX_VALUE, "%-+(,1.6g", "+3.40282e+38"},
+ {Float.MAX_VALUE, "% 0(,12.0g", " 0000003e+38"},
+
+ {Float.MIN_VALUE, "%g", "1.40130e-45"},
+ {Float.MIN_VALUE, "%- (,9.8g", " 1.4012985e-45"},
+ {Float.MIN_VALUE, "%+0(,8.4g", "+1.401e-45"},
+ {Float.MIN_VALUE, "%-+(,1.6g", "+1.40130e-45"},
+ {Float.MIN_VALUE, "% 0(,12.0g", " 0000001e-45"},
+
+ {Float.NaN, "%g", "NaN"},
+ {Float.NaN, "%- (,9.8g", "NaN "},
+ {Float.NaN, "%+0(,8.4g", " NaN"},
+ {Float.NaN, "%-+(,1.6g", "NaN"},
+ {Float.NaN, "% 0(,12.0g", " NaN"},
+
+ {Float.NEGATIVE_INFINITY, "%g", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%- (,9.8g", "(Infinity)"},
+ {Float.NEGATIVE_INFINITY, "%+0(,8.4g", "(Infinity)"},
+ {Float.NEGATIVE_INFINITY, "%-+(,1.6g", "(Infinity)"},
+ {Float.NEGATIVE_INFINITY, "% 0(,12.0g", " (Infinity)"},
+
+ {Float.POSITIVE_INFINITY, "%g", "Infinity"},
+ {Float.POSITIVE_INFINITY, "%- (,9.8g", " Infinity"},
+ {Float.POSITIVE_INFINITY, "%+0(,8.4g", "+Infinity"},
+ {Float.POSITIVE_INFINITY, "%-+(,1.6g", "+Infinity"},
+ {Float.POSITIVE_INFINITY, "% 0(,12.0g", " Infinity"},
+
+ {1d, "%g", "1.00000"},
+ {1d, "%- (,9.8g", " 1.0000000"},
+ {1d, "%+0(,8.4g", "+001.000"},
+ {1d, "%-+(,1.6g", "+1.00000"},
+ {1d, "% 0(,12.0g", " 00000000001"},
+
+ {-1d, "%g", "-1.00000"},
+ {-1d, "%- (,9.8g", "(1.0000000)"},
+ {-1d, "%+0(,8.4g", "(01.000)"},
+ {-1d, "%-+(,1.6g", "(1.00000)"},
+ {-1d, "% 0(,12.0g", "(0000000001)"},
+
+ {.00000001d, "%g", "1.00000e-08"},
+ {.00000001d, "%- (,9.8g", " 1.0000000e-08"},
+ {.00000001d, "%+0(,8.4g", "+1.000e-08"},
+ {.00000001d, "%-+(,1.6g", "+1.00000e-08"},
+ {.00000001d, "% 0(,12.0g", " 0000001e-08"},
+
+ {1912.10d, "%g", "1912.10"},
+ {1912.10d, "%- (,9.8g", " 1,912.1000"},
+ {1912.10d, "%+0(,8.4g", "+001,912"},
+ {1912.10d, "%-+(,1.6g", "+1,912.10"},
+ {1912.10d, "% 0(,12.0g", " 0000002e+03"},
+
+ {0.1d, "%g", "0.100000"},
+ {0.1d, "%- (,9.8g", " 0.10000000"},
+ {0.1d, "%+0(,8.4g", "+00.1000"},
+ {0.1d, "%-+(,1.6g", "+0.100000"},
+ {0.1d, "% 0(,12.0g", " 000000000.1"},
+
+ {-2.d, "%g", "-2.00000"},
+ {-2.d, "%- (,9.8g", "(2.0000000)"},
+ {-2.d, "%+0(,8.4g", "(02.000)"},
+ {-2.d, "%-+(,1.6g", "(2.00000)"},
+ {-2.d, "% 0(,12.0g", "(0000000002)"},
+
+ {-.00039d, "%g", "-0.000390000"},
+ {-.00039d, "%- (,9.8g", "(0.00039000000)"},
+ {-.00039d, "%+0(,8.4g", "(0.0003900)"},
+ {-.00039d, "%-+(,1.6g", "(0.000390000)"},
+ {-.00039d, "% 0(,12.0g", "(00000.0004)"},
+
+ {-1234567890.012345678d, "%g", "-1.23457e+09"},
+ {-1234567890.012345678d, "%- (,9.8g", "(1.2345679e+09)"},
+ {-1234567890.012345678d, "%+0(,8.4g", "(1.235e+09)"},
+ {-1234567890.012345678d, "%-+(,1.6g", "(1.23457e+09)"},
+ {-1234567890.012345678d, "% 0(,12.0g", "(000001e+09)"},
+
+ {Double.MAX_VALUE, "%g", "1.79769e+308"},
+ {Double.MAX_VALUE, "%- (,9.8g", " 1.7976931e+308"},
+ {Double.MAX_VALUE, "%+0(,8.4g", "+1.798e+308"},
+ {Double.MAX_VALUE, "%-+(,1.6g", "+1.79769e+308"},
+ {Double.MAX_VALUE, "% 0(,12.0g", " 000002e+308"},
+
+ {Double.MIN_VALUE, "%g", "4.90000e-324"},
+ {Double.MIN_VALUE, "%- (,9.8g", " 4.9000000e-324"},
+ {Double.MIN_VALUE, "%+0(,8.4g", "+4.900e-324"},
+ {Double.MIN_VALUE, "%-+(,1.6g", "+4.90000e-324"},
+ {Double.MIN_VALUE, "% 0(,12.0g", " 000005e-324"},
+
+ {Double.NaN, "%g", "NaN"},
+ {Double.NaN, "%- (,9.8g", "NaN "},
+ {Double.NaN, "%+0(,8.4g", " NaN"},
+ {Double.NaN, "%-+(,1.6g", "NaN"},
+ {Double.NaN, "% 0(,12.0g", " NaN"},
+
+ {Double.NEGATIVE_INFINITY, "%g", "-Infinity"},
+ {Double.NEGATIVE_INFINITY, "%- (,9.8g", "(Infinity)"},
+ {Double.NEGATIVE_INFINITY, "%+0(,8.4g", "(Infinity)"},
+ {Double.NEGATIVE_INFINITY, "%-+(,1.6g", "(Infinity)"},
+ {Double.NEGATIVE_INFINITY, "% 0(,12.0g", " (Infinity)"},
+
+ {Double.POSITIVE_INFINITY, "%g", "Infinity"},
+ {Double.POSITIVE_INFINITY, "%- (,9.8g", " Infinity"},
+ {Double.POSITIVE_INFINITY, "%+0(,8.4g", "+Infinity"},
+ {Double.POSITIVE_INFINITY, "%-+(,1.6g", "+Infinity"},
+ {Double.POSITIVE_INFINITY, "% 0(,12.0g", " Infinity"},
+
+ };
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ for (int i = 0; i < tripleG.length; i++) {
+
+ f = new Formatter(Locale.US);
+ f.format((String)tripleG[i][pattern], tripleG[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleG[i][input] + ",pattern["
+ + i + "]:" + tripleG[i][pattern],
+ tripleG[i][output], f.toString());
+
+ // test for conversion type 'G'
+ f = new Formatter(Locale.US);
+ f.format(((String)tripleG[i][pattern]).toUpperCase(), tripleG[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleG[i][input] + ",pattern["
+ + i + "]:" + tripleG[i][pattern], ((String)tripleG[i][output])
+ .toUpperCase(Locale.UK), f.toString());
+ }
+
+ f = new Formatter(Locale.US);
+ f.format("%.5g", 0f);
+ assertEquals("0.0000", f.toString());
+
+ f = new Formatter(Locale.US);
+ f.format("%.0g", 0f);
+ /*
+ * fail on RI, spec says if the precision is 0, then it is taken to be
+ * 1. but RI throws ArrayIndexOutOfBoundsException.
+ */
+ assertEquals("0", f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format("%g", 1001f);
+ /*
+ * fail on RI, spec says 'g' requires the output to be formatted in
+ * general scientific notation and the localization algorithm is
+ * applied. But RI format this case to 1001.00, which does not conform
+ * to the German Locale
+ */
+ assertEquals("1001,00", f.toString());
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for Float/Double
+ * conversion type 'g' and 'G' overflow
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionG_Overflow() {
+ Formatter f = new Formatter();
+ f.format("%g", 999999.5);
+ assertEquals("1.00000e+06", f.toString());
+
+ f = new Formatter();
+ f.format("%g", 99999.5);
+ assertEquals("99999.5", f.toString());
+
+ f = new Formatter();
+ f.format("%.4g", 99.95);
+ assertEquals("99.95", f.toString());
+
+ f = new Formatter();
+ f.format("%g", 99.95);
+ assertEquals("99.9500", f.toString());
+
+ f = new Formatter();
+ f.format("%g", 0.9);
+ assertEquals("0.900000", f.toString());
+
+ f = new Formatter();
+ f.format("%.0g", 0.000095);
+ assertEquals("0.0001", f.toString());
+
+ f = new Formatter();
+ f.format("%g", 0.0999999);
+ assertEquals("0.0999999", f.toString());
+
+ f = new Formatter();
+ f.format("%g", 0.00009);
+ assertEquals("9.00000e-05", f.toString());
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for Float/Double
+ * conversion type 'f'
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionF() {
+ Formatter f = null;
+
+ final Object[][] tripleF = {
+ {0f, "%f", "0,000000"},
+ {0f, "%#.3f", "0,000"},
+ {0f, "%,5f", "0,000000"},
+ {0f, "%- (12.0f", " 0 "},
+ {0f, "%#+0(1.6f", "+0,000000"},
+ {0f, "%-+(8.4f", "+0,0000 "},
+ {0f, "% 0#(9.8f", " 0,00000000"},
+
+ {1234f, "%f", "1234,000000"},
+ {1234f, "%#.3f", "1234,000"},
+ {1234f, "%,5f", "1.234,000000"},
+ {1234f, "%- (12.0f", " 1234 "},
+ {1234f, "%#+0(1.6f", "+1234,000000"},
+ {1234f, "%-+(8.4f", "+1234,0000"},
+ {1234f, "% 0#(9.8f", " 1234,00000000"},
+
+ {1.f, "%f", "1,000000"},
+ {1.f, "%#.3f", "1,000"},
+ {1.f, "%,5f", "1,000000"},
+ {1.f, "%- (12.0f", " 1 "},
+ {1.f, "%#+0(1.6f", "+1,000000"},
+ {1.f, "%-+(8.4f", "+1,0000 "},
+ {1.f, "% 0#(9.8f", " 1,00000000"},
+
+ {-98f, "%f", "-98,000000"},
+ {-98f, "%#.3f", "-98,000"},
+ {-98f, "%,5f", "-98,000000"},
+ {-98f, "%- (12.0f", "(98) "},
+ {-98f, "%#+0(1.6f", "(98,000000)"},
+ {-98f, "%-+(8.4f", "(98,0000)"},
+ {-98f, "% 0#(9.8f", "(98,00000000)"},
+
+ {0.000001f, "%f", "0,000001"},
+ {0.000001f, "%#.3f", "0,000"},
+ {0.000001f, "%,5f", "0,000001"},
+ {0.000001f, "%- (12.0f", " 0 "},
+ {0.000001f, "%#+0(1.6f", "+0,000001"},
+ {0.000001f, "%-+(8.4f", "+0,0000 "},
+ {0.000001f, "% 0#(9.8f", " 0,00000100"},
+
+ {345.1234567f, "%f", "345,123444"},
+ {345.1234567f, "%#.3f", "345,123"},
+ {345.1234567f, "%,5f", "345,123444"},
+ {345.1234567f, "%- (12.0f", " 345 "},
+ {345.1234567f, "%#+0(1.6f", "+345,123444"},
+ {345.1234567f, "%-+(8.4f", "+345,1234"},
+ {345.1234567f, "% 0#(9.8f", " 345,12344360"},
+
+ {-.00000012345f, "%f", "-0,000000"},
+ {-.00000012345f, "%#.3f", "-0,000"},
+ {-.00000012345f, "%,5f", "-0,000000"},
+ {-.00000012345f, "%- (12.0f", "(0) "},
+ {-.00000012345f, "%#+0(1.6f", "(0,000000)"},
+ {-.00000012345f, "%-+(8.4f", "(0,0000)"},
+ {-.00000012345f, "% 0#(9.8f", "(0,00000012)"},
+
+ {-987654321.1234567f, "%f", "-987654336,000000"},
+ {-987654321.1234567f, "%#.3f", "-987654336,000"},
+ {-987654321.1234567f, "%,5f", "-987.654.336,000000"},
+ {-987654321.1234567f, "%- (12.0f", "(987654336) "},
+ {-987654321.1234567f, "%#+0(1.6f", "(987654336,000000)"},
+ {-987654321.1234567f, "%-+(8.4f", "(987654336,0000)"},
+ {-987654321.1234567f, "% 0#(9.8f", "(987654336,00000000)"},
+
+ {Float.MAX_VALUE, "%f", "340282346638528860000000000000000000000,000000"},
+ {Float.MAX_VALUE, "%#.3f", "340282346638528860000000000000000000000,000"},
+ {Float.MAX_VALUE, "%,5f", "340.282.346.638.528.860.000.000.000.000.000.000.000,000000"},
+ {Float.MAX_VALUE, "%- (12.0f", " 340282346638528860000000000000000000000"},
+ {Float.MAX_VALUE, "%#+0(1.6f", "+340282346638528860000000000000000000000,000000"},
+ {Float.MAX_VALUE, "%-+(8.4f", "+340282346638528860000000000000000000000,0000"},
+ {Float.MAX_VALUE, "% 0#(9.8f", " 340282346638528860000000000000000000000,00000000"},
+
+ {Float.MIN_VALUE, "%f", "0,000000"},
+ {Float.MIN_VALUE, "%#.3f", "0,000"},
+ {Float.MIN_VALUE, "%,5f", "0,000000"},
+ {Float.MIN_VALUE, "%- (12.0f", " 0 "},
+ {Float.MIN_VALUE, "%#+0(1.6f", "+0,000000"},
+ {Float.MIN_VALUE, "%-+(8.4f", "+0,0000 "},
+ {Float.MIN_VALUE, "% 0#(9.8f", " 0,00000000"},
+
+ {Float.NaN, "%f", "NaN"},
+ {Float.NaN, "%#.3f", "NaN"},
+ {Float.NaN, "%,5f", " NaN"},
+ {Float.NaN, "%- (12.0f", "NaN "},
+ {Float.NaN, "%#+0(1.6f", "NaN"},
+ {Float.NaN, "%-+(8.4f", "NaN "},
+ {Float.NaN, "% 0#(9.8f", " NaN"},
+
+ {Float.NEGATIVE_INFINITY, "%f", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%#.3f", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%,5f", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%- (12.0f", "(Infinity) "},
+ {Float.NEGATIVE_INFINITY, "%#+0(1.6f", "(Infinity)"},
+ {Float.NEGATIVE_INFINITY, "%-+(8.4f", "(Infinity)"},
+ {Float.NEGATIVE_INFINITY, "% 0#(9.8f", "(Infinity)"},
+
+ {Float.POSITIVE_INFINITY, "%f", "Infinity"},
+ {Float.POSITIVE_INFINITY, "%#.3f", "Infinity"},
+ {Float.POSITIVE_INFINITY, "%,5f", "Infinity"},
+ {Float.POSITIVE_INFINITY, "%- (12.0f", " Infinity "},
+ {Float.POSITIVE_INFINITY, "%#+0(1.6f", "+Infinity"},
+ {Float.POSITIVE_INFINITY, "%-+(8.4f", "+Infinity"},
+ {Float.POSITIVE_INFINITY, "% 0#(9.8f", " Infinity"},
+
+
+ {0d, "%f", "0,000000"},
+ {0d, "%#.3f", "0,000"},
+ {0d, "%,5f", "0,000000"},
+ {0d, "%- (12.0f", " 0 "},
+ {0d, "%#+0(1.6f", "+0,000000"},
+ {0d, "%-+(8.4f", "+0,0000 "},
+ {0d, "% 0#(9.8f", " 0,00000000"},
+
+ {1d, "%f", "1,000000"},
+ {1d, "%#.3f", "1,000"},
+ {1d, "%,5f", "1,000000"},
+ {1d, "%- (12.0f", " 1 "},
+ {1d, "%#+0(1.6f", "+1,000000"},
+ {1d, "%-+(8.4f", "+1,0000 "},
+ {1d, "% 0#(9.8f", " 1,00000000"},
+
+ {-1d, "%f", "-1,000000"},
+ {-1d, "%#.3f", "-1,000"},
+ {-1d, "%,5f", "-1,000000"},
+ {-1d, "%- (12.0f", "(1) "},
+ {-1d, "%#+0(1.6f", "(1,000000)"},
+ {-1d, "%-+(8.4f", "(1,0000)"},
+ {-1d, "% 0#(9.8f", "(1,00000000)"},
+
+ {.00000001d, "%f", "0,000000"},
+ {.00000001d, "%#.3f", "0,000"},
+ {.00000001d, "%,5f", "0,000000"},
+ {.00000001d, "%- (12.0f", " 0 "},
+ {.00000001d, "%#+0(1.6f", "+0,000000"},
+ {.00000001d, "%-+(8.4f", "+0,0000 "},
+ {.00000001d, "% 0#(9.8f", " 0,00000001"},
+
+ {1000.10d, "%f", "1000,100000"},
+ {1000.10d, "%#.3f", "1000,100"},
+ {1000.10d, "%,5f", "1.000,100000"},
+ {1000.10d, "%- (12.0f", " 1000 "},
+ {1000.10d, "%#+0(1.6f", "+1000,100000"},
+ {1000.10d, "%-+(8.4f", "+1000,1000"},
+ {1000.10d, "% 0#(9.8f", " 1000,10000000"},
+
+ {0.1d, "%f", "0,100000"},
+ {0.1d, "%#.3f", "0,100"},
+ {0.1d, "%,5f", "0,100000"},
+ {0.1d, "%- (12.0f", " 0 "},
+ {0.1d, "%#+0(1.6f", "+0,100000"},
+ {0.1d, "%-+(8.4f", "+0,1000 "},
+ {0.1d, "% 0#(9.8f", " 0,10000000"},
+
+ {-2.d, "%f", "-2,000000"},
+ {-2.d, "%#.3f", "-2,000"},
+ {-2.d, "%,5f", "-2,000000"},
+ {-2.d, "%- (12.0f", "(2) "},
+ {-2.d, "%#+0(1.6f", "(2,000000)"},
+ {-2.d, "%-+(8.4f", "(2,0000)"},
+ {-2.d, "% 0#(9.8f", "(2,00000000)"},
+
+ {-.00009d, "%f", "-0,000090"},
+ {-.00009d, "%#.3f", "-0,000"},
+ {-.00009d, "%,5f", "-0,000090"},
+ {-.00009d, "%- (12.0f", "(0) "},
+ {-.00009d, "%#+0(1.6f", "(0,000090)"},
+ {-.00009d, "%-+(8.4f", "(0,0001)"},
+ {-.00009d, "% 0#(9.8f", "(0,00009000)"},
+
+ {-1234567890.012345678d, "%f", "-1234567890,012346"},
+ {-1234567890.012345678d, "%#.3f", "-1234567890,012"},
+ {-1234567890.012345678d, "%,5f", "-1.234.567.890,012346"},
+ {-1234567890.012345678d, "%- (12.0f", "(1234567890)"},
+ {-1234567890.012345678d, "%#+0(1.6f", "(1234567890,012346)"},
+ {-1234567890.012345678d, "%-+(8.4f", "(1234567890,0123)"},
+ {-1234567890.012345678d, "% 0#(9.8f", "(1234567890,01234580)"},
+
+ {Double.MAX_VALUE, "%f", "179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,000000"},
+ {Double.MAX_VALUE, "%#.3f", "179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,000"},
+ {Double.MAX_VALUE, "%,5f", "179.769.313.486.231.570.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000,000000"},
+ {Double.MAX_VALUE, "%- (12.0f", " 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},
+ {Double.MAX_VALUE, "%#+0(1.6f", "+179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,000000"},
+ {Double.MAX_VALUE, "%-+(8.4f", "+179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0000"},
+ {Double.MAX_VALUE, "% 0#(9.8f", " 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,00000000"},
+
+ {Double.MIN_VALUE, "%f", "0,000000"},
+ {Double.MIN_VALUE, "%#.3f", "0,000"},
+ {Double.MIN_VALUE, "%,5f", "0,000000"},
+ {Double.MIN_VALUE, "%- (12.0f", " 0 "},
+ {Double.MIN_VALUE, "%#+0(1.6f", "+0,000000"},
+ {Double.MIN_VALUE, "%-+(8.4f", "+0,0000 "},
+ {Double.MIN_VALUE, "% 0#(9.8f", " 0,00000000"},
+
+ {Double.NaN, "%f", "NaN"},
+ {Double.NaN, "%#.3f", "NaN"},
+ {Double.NaN, "%,5f", " NaN"},
+ {Double.NaN, "%- (12.0f", "NaN "},
+ {Double.NaN, "%#+0(1.6f", "NaN"},
+ {Double.NaN, "%-+(8.4f", "NaN "},
+ {Double.NaN, "% 0#(9.8f", " NaN"},
+
+ {Double.POSITIVE_INFINITY, "%f", "Infinity"},
+ {Double.POSITIVE_INFINITY, "%#.3f", "Infinity"},
+ {Double.POSITIVE_INFINITY, "%,5f", "Infinity"},
+ {Double.POSITIVE_INFINITY, "%- (12.0f", " Infinity "},
+ {Double.POSITIVE_INFINITY, "%#+0(1.6f", "+Infinity"},
+ {Double.POSITIVE_INFINITY, "%-+(8.4f", "+Infinity"},
+ {Double.POSITIVE_INFINITY, "% 0#(9.8f", " Infinity"},
+
+ {Double.NEGATIVE_INFINITY, "%f", "-Infinity"},
+ {Double.NEGATIVE_INFINITY, "%#.3f", "-Infinity"},
+ {Double.NEGATIVE_INFINITY, "%,5f", "-Infinity"},
+ {Double.NEGATIVE_INFINITY, "%- (12.0f", "(Infinity) "},
+ {Double.NEGATIVE_INFINITY, "%#+0(1.6f", "(Infinity)"},
+ {Double.NEGATIVE_INFINITY, "%-+(8.4f", "(Infinity)"},
+ {Double.NEGATIVE_INFINITY, "% 0#(9.8f", "(Infinity)"},
+ };
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ for (int i = 0; i < tripleF.length; i++) {
+ f = new Formatter(Locale.GERMAN);
+ f.format((String)tripleF[i][pattern], tripleF[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleF[i][input] + ",pattern["
+ + i + "]:" + tripleF[i][pattern],
+ tripleF[i][output], f.toString());
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for Float/Double
+ * conversion type 'a' and 'A'
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_FloatConversionA() {
+ Formatter f = null;
+ final Object[][] tripleA = {
+ {-0f, "%a", "-0x0.0p0"},
+ {-0f, "%#.3a", "-0x0.000p0"},
+ {-0f, "%5a", "-0x0.0p0"},
+ {-0f, "%- 12.0a", "-0x0.0p0 "},
+ {-0f, "%#+01.6a", "-0x0.000000p0"},
+ {-0f, "%-+8.4a", "-0x0.0000p0"},
+
+ {0f, "%a", "0x0.0p0"},
+ {0f, "%#.3a", "0x0.000p0"},
+ {0f, "%5a", "0x0.0p0"},
+ {0f, "%- 12.0a", " 0x0.0p0 "},
+ {0f, "%#+01.6a", "+0x0.000000p0"},
+ {0f, "%-+8.4a", "+0x0.0000p0"},
+
+ {1234f, "%a", "0x1.348p10"},
+ {1234f, "%#.3a", "0x1.348p10"},
+ {1234f, "%5a", "0x1.348p10"},
+ {1234f, "%- 12.0a", " 0x1.3p10 "},
+ {1234f, "%#+01.6a", "+0x1.348000p10"},
+ {1234f, "%-+8.4a", "+0x1.3480p10"},
+
+ {1.f, "%a", "0x1.0p0"},
+ {1.f, "%#.3a", "0x1.000p0"},
+ {1.f, "%5a", "0x1.0p0"},
+ {1.f, "%- 12.0a", " 0x1.0p0 "},
+ {1.f, "%#+01.6a", "+0x1.000000p0"},
+ {1.f, "%-+8.4a", "+0x1.0000p0"},
+
+ {-98f, "%a", "-0x1.88p6"},
+ {-98f, "%#.3a", "-0x1.880p6"},
+ {-98f, "%5a", "-0x1.88p6"},
+ {-98f, "%- 12.0a", "-0x1.8p6 "},
+ {-98f, "%#+01.6a", "-0x1.880000p6"},
+ {-98f, "%-+8.4a", "-0x1.8800p6"},
+
+ {345.1234567f, "%a", "0x1.591f9ap8"},
+ {345.1234567f, "%5a", "0x1.591f9ap8"},
+ {345.1234567f, "%#+01.6a", "+0x1.591f9ap8"},
+
+ {-987654321.1234567f, "%a", "-0x1.d6f346p29"},
+ {-987654321.1234567f, "%#.3a", "-0x1.d6fp29"},
+ {-987654321.1234567f, "%5a", "-0x1.d6f346p29"},
+ {-987654321.1234567f, "%- 12.0a", "-0x1.dp29 "},
+ {-987654321.1234567f, "%#+01.6a", "-0x1.d6f346p29"},
+ {-987654321.1234567f, "%-+8.4a", "-0x1.d6f3p29"},
+
+ {Float.MAX_VALUE, "%a", "0x1.fffffep127"},
+ {Float.MAX_VALUE, "%5a", "0x1.fffffep127"},
+ {Float.MAX_VALUE, "%#+01.6a", "+0x1.fffffep127"},
+
+ {Float.NaN, "%a", "NaN"},
+ {Float.NaN, "%#.3a", "NaN"},
+ {Float.NaN, "%5a", " NaN"},
+ {Float.NaN, "%- 12.0a", "NaN "},
+ {Float.NaN, "%#+01.6a", "NaN"},
+ {Float.NaN, "%-+8.4a", "NaN "},
+
+ {Float.NEGATIVE_INFINITY, "%a", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%#.3a", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%5a", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%- 12.0a", "-Infinity "},
+ {Float.NEGATIVE_INFINITY, "%#+01.6a", "-Infinity"},
+ {Float.NEGATIVE_INFINITY, "%-+8.4a", "-Infinity"},
+
+ {Float.POSITIVE_INFINITY, "%a", "Infinity"},
+ {Float.POSITIVE_INFINITY, "%#.3a", "Infinity"},
+ {Float.POSITIVE_INFINITY, "%5a", "Infinity"},
+ {Float.POSITIVE_INFINITY, "%- 12.0a", " Infinity "},
+ {Float.POSITIVE_INFINITY, "%#+01.6a", "+Infinity"},
+ {Float.POSITIVE_INFINITY, "%-+8.4a", "+Infinity"},
+
+ {-0d, "%a", "-0x0.0p0"},
+ {-0d, "%#.3a", "-0x0.000p0"},
+ {-0d, "%5a", "-0x0.0p0"},
+ {-0d, "%- 12.0a", "-0x0.0p0 "},
+ {-0d, "%#+01.6a", "-0x0.000000p0"},
+ {-0d, "%-+8.4a", "-0x0.0000p0"},
+
+ {0d, "%a", "0x0.0p0"},
+ {0d, "%#.3a", "0x0.000p0"},
+ {0d, "%5a", "0x0.0p0"},
+ {0d, "%- 12.0a", " 0x0.0p0 "},
+ {0d, "%#+01.6a", "+0x0.000000p0"},
+ {0d, "%-+8.4a", "+0x0.0000p0"},
+
+ {1d, "%a", "0x1.0p0"},
+ {1d, "%#.3a", "0x1.000p0"},
+ {1d, "%5a", "0x1.0p0"},
+ {1d, "%- 12.0a", " 0x1.0p0 "},
+ {1d, "%#+01.6a", "+0x1.000000p0"},
+ {1d, "%-+8.4a", "+0x1.0000p0"},
+
+ {-1d, "%a", "-0x1.0p0"},
+ {-1d, "%#.3a", "-0x1.000p0"},
+ {-1d, "%5a", "-0x1.0p0"},
+ {-1d, "%- 12.0a", "-0x1.0p0 "},
+ {-1d, "%#+01.6a", "-0x1.000000p0"},
+ {-1d, "%-+8.4a", "-0x1.0000p0"},
+
+ {.00000001d, "%a", "0x1.5798ee2308c3ap-27"},
+ {.00000001d, "%5a", "0x1.5798ee2308c3ap-27"},
+ {.00000001d, "%- 12.0a", " 0x1.5p-27 "},
+ {.00000001d, "%#+01.6a", "+0x1.5798eep-27"},
+
+ {1000.10d, "%a", "0x1.f40cccccccccdp9"},
+ {1000.10d, "%5a", "0x1.f40cccccccccdp9"},
+ {1000.10d, "%- 12.0a", " 0x1.fp9 "},
+
+ {0.1d, "%a", "0x1.999999999999ap-4"},
+ {0.1d, "%5a", "0x1.999999999999ap-4"},
+
+ {-2.d, "%a", "-0x1.0p1"},
+ {-2.d, "%#.3a", "-0x1.000p1"},
+ {-2.d, "%5a", "-0x1.0p1"},
+ {-2.d, "%- 12.0a", "-0x1.0p1 "},
+ {-2.d, "%#+01.6a", "-0x1.000000p1"},
+ {-2.d, "%-+8.4a", "-0x1.0000p1"},
+
+ {-.00009d, "%a", "-0x1.797cc39ffd60fp-14"},
+ {-.00009d, "%5a", "-0x1.797cc39ffd60fp-14"},
+
+ {-1234567890.012345678d, "%a", "-0x1.26580b480ca46p30"},
+ {-1234567890.012345678d, "%5a", "-0x1.26580b480ca46p30"},
+ {-1234567890.012345678d, "%- 12.0a", "-0x1.2p30 "},
+ {-1234567890.012345678d, "%#+01.6a", "-0x1.26580bp30"},
+ {-1234567890.012345678d, "%-+8.4a", "-0x1.2658p30"},
+
+ {Double.MAX_VALUE, "%a", "0x1.fffffffffffffp1023"},
+ {Double.MAX_VALUE, "%5a", "0x1.fffffffffffffp1023"},
+
+ {Double.MIN_VALUE, "%a", "0x0.0000000000001p-1022"},
+ {Double.MIN_VALUE, "%5a", "0x0.0000000000001p-1022"},
+
+ {Double.NaN, "%a", "NaN"},
+ {Double.NaN, "%#.3a", "NaN"},
+ {Double.NaN, "%5a", " NaN"},
+ {Double.NaN, "%- 12.0a", "NaN "},
+ {Double.NaN, "%#+01.6a", "NaN"},
+ {Double.NaN, "%-+8.4a", "NaN "},
+
+ {Double.NEGATIVE_INFINITY, "%a", "-Infinity"},
+ {Double.NEGATIVE_INFINITY, "%#.3a", "-Infinity"},
+ {Double.NEGATIVE_INFINITY, "%5a", "-Infinity"},
+ {Double.NEGATIVE_INFINITY, "%- 12.0a", "-Infinity "},
+ {Double.NEGATIVE_INFINITY, "%#+01.6a", "-Infinity"},
+ {Double.NEGATIVE_INFINITY, "%-+8.4a", "-Infinity"},
+
+ {Double.POSITIVE_INFINITY, "%a", "Infinity"},
+ {Double.POSITIVE_INFINITY, "%#.3a", "Infinity"},
+ {Double.POSITIVE_INFINITY, "%5a", "Infinity"},
+ {Double.POSITIVE_INFINITY, "%- 12.0a", " Infinity "},
+ {Double.POSITIVE_INFINITY, "%#+01.6a", "+Infinity"},
+ {Double.POSITIVE_INFINITY, "%-+8.4a", "+Infinity"},
+
+ };
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ for (int i = 0; i < tripleA.length; i++) {
+ f = new Formatter(Locale.UK);
+ f.format((String)tripleA[i][pattern], tripleA[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleA[i][input] + ",pattern["
+ + i + "]:" + tripleA[i][pattern],
+ tripleA[i][output], f.toString());
+
+ // test for conversion type 'A'
+ f = new Formatter(Locale.UK);
+ f.format(((String)tripleA[i][pattern]).toUpperCase(), tripleA[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleA[i][input] + ",pattern["
+ + i + "]:" + tripleA[i][pattern], ((String)tripleA[i][output])
+ .toUpperCase(Locale.UK), f.toString());
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for BigDecimal
+ * conversion type 'e' and 'E'
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_BigDecimalConversionE() {
+ Formatter f = null;
+ final Object[][] tripleE = {
+ {BigDecimal.ZERO, "%e", "0.000000e+00"},
+ {BigDecimal.ZERO, "%#.0e", "0.e+00"},
+ {BigDecimal.ZERO, "%# 9.8e", " 0.00000000e+00"},
+ {BigDecimal.ZERO, "%#+0(8.4e", "+0.0000e+00"},
+ {BigDecimal.ZERO, "%-+17.6e", "+0.000000e+00 "},
+ {BigDecimal.ZERO, "% 0(20e", " 00000000.000000e+00"},
+
+ {BigDecimal.ONE, "%e", "1.000000e+00"},
+ {BigDecimal.ONE, "%#.0e", "1.e+00"},
+ {BigDecimal.ONE, "%# 9.8e", " 1.00000000e+00"},
+ {BigDecimal.ONE, "%#+0(8.4e", "+1.0000e+00"},
+ {BigDecimal.ONE, "%-+17.6e", "+1.000000e+00 "},
+ {BigDecimal.ONE, "% 0(20e", " 00000001.000000e+00"},
+
+ {BigDecimal.TEN, "%e", "1.000000e+01"},
+ {BigDecimal.TEN, "%#.0e", "1.e+01"},
+ {BigDecimal.TEN, "%# 9.8e", " 1.00000000e+01"},
+ {BigDecimal.TEN, "%#+0(8.4e", "+1.0000e+01"},
+ {BigDecimal.TEN, "%-+17.6e", "+1.000000e+01 "},
+ {BigDecimal.TEN, "% 0(20e", " 00000001.000000e+01"},
+
+ {new BigDecimal(-1), "%e", "-1.000000e+00"},
+ {new BigDecimal(-1), "%#.0e", "-1.e+00"},
+ {new BigDecimal(-1), "%# 9.8e", "-1.00000000e+00"},
+ {new BigDecimal(-1), "%#+0(8.4e", "(1.0000e+00)"},
+ {new BigDecimal(-1), "%-+17.6e", "-1.000000e+00 "},
+ {new BigDecimal(-1), "% 0(20e", "(0000001.000000e+00)"},
+
+ {new BigDecimal("5.000E999"), "%e", "5.000000e+999"},
+ {new BigDecimal("5.000E999"), "%#.0e", "5.e+999"},
+ {new BigDecimal("5.000E999"), "%# 9.8e", " 5.00000000e+999"},
+ {new BigDecimal("5.000E999"), "%#+0(8.4e", "+5.0000e+999"},
+ {new BigDecimal("5.000E999"), "%-+17.6e", "+5.000000e+999 "},
+ {new BigDecimal("5.000E999"), "% 0(20e", " 0000005.000000e+999"},
+
+ {new BigDecimal("-5.000E999"), "%e", "-5.000000e+999"},
+ {new BigDecimal("-5.000E999"), "%#.0e", "-5.e+999"},
+ {new BigDecimal("-5.000E999"), "%# 9.8e", "-5.00000000e+999"},
+ {new BigDecimal("-5.000E999"), "%#+0(8.4e", "(5.0000e+999)"},
+ {new BigDecimal("-5.000E999"), "%-+17.6e", "-5.000000e+999 "},
+ {new BigDecimal("-5.000E999"), "% 0(20e", "(000005.000000e+999)"},
+ };
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ for (int i = 0; i < tripleE.length; i++) {
+ f = new Formatter(Locale.US);
+ f.format((String)tripleE[i][pattern], tripleE[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleE[i][input] + ",pattern["
+ + i + "]:" + tripleE[i][pattern],
+ tripleE[i][output], f.toString());
+
+ // test for conversion type 'E'
+ f = new Formatter(Locale.US);
+ f.format(((String)tripleE[i][pattern]).toUpperCase(), tripleE[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleE[i][input] + ",pattern["
+ + i + "]:" + tripleE[i][pattern], ((String)tripleE[i][output])
+ .toUpperCase(Locale.US), f.toString());
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for BigDecimal
+ * conversion type 'g' and 'G'
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_BigDecimalConversionG() {
+ Formatter f = null;
+ final Object[][] tripleG = {
+ {BigDecimal.ZERO, "%g", "0.00000"},
+ {BigDecimal.ZERO, "%.5g", "0.0000"},
+ {BigDecimal.ZERO, "%- (,9.8g", " 0.0000000"},
+ {BigDecimal.ZERO, "%+0(,8.4g", "+000.000"},
+ {BigDecimal.ZERO, "%-+10.6g", "+0.00000 "},
+ {BigDecimal.ZERO, "% 0(,12.0g", " 00000000000"},
+ {BigDecimal.ONE, "%g", "1.00000"},
+ {BigDecimal.ONE, "%.5g", "1.0000"},
+ {BigDecimal.ONE, "%- (,9.8g", " 1.0000000"},
+ {BigDecimal.ONE, "%+0(,8.4g", "+001.000"},
+ {BigDecimal.ONE, "%-+10.6g", "+1.00000 "},
+ {BigDecimal.ONE, "% 0(,12.0g", " 00000000001"},
+
+ {new BigDecimal(-1), "%g", "-1.00000"},
+ {new BigDecimal(-1), "%.5g", "-1.0000"},
+ {new BigDecimal(-1), "%- (,9.8g", "(1.0000000)"},
+ {new BigDecimal(-1), "%+0(,8.4g", "(01.000)"},
+ {new BigDecimal(-1), "%-+10.6g", "-1.00000 "},
+ {new BigDecimal(-1), "% 0(,12.0g", "(0000000001)"},
+
+ {new BigDecimal(-0.000001), "%g", "-1.00000e-06"},
+ {new BigDecimal(-0.000001), "%.5g", "-1.0000e-06"},
+ {new BigDecimal(-0.000001), "%- (,9.8g", "(1.0000000e-06)"},
+ {new BigDecimal(-0.000001), "%+0(,8.4g", "(1.000e-06)"},
+ {new BigDecimal(-0.000001), "%-+10.6g", "-1.00000e-06"},
+ {new BigDecimal(-0.000001), "% 0(,12.0g", "(000001e-06)"},
+
+ {new BigDecimal(0.0002), "%g", "0.000200000"},
+ {new BigDecimal(0.0002), "%.5g", "0.00020000"},
+ {new BigDecimal(0.0002), "%- (,9.8g", " 0.00020000000"},
+ {new BigDecimal(0.0002), "%+0(,8.4g", "+0.0002000"},
+ {new BigDecimal(0.0002), "%-+10.6g", "+0.000200000"},
+ {new BigDecimal(0.0002), "% 0(,12.0g", " 000000.0002"},
+
+ {new BigDecimal(-0.003), "%g", "-0.00300000"},
+ {new BigDecimal(-0.003), "%.5g", "-0.0030000"},
+ {new BigDecimal(-0.003), "%- (,9.8g", "(0.0030000000)"},
+ {new BigDecimal(-0.003), "%+0(,8.4g", "(0.003000)"},
+ {new BigDecimal(-0.003), "%-+10.6g", "-0.00300000"},
+ {new BigDecimal(-0.003), "% 0(,12.0g", "(000000.003)"},
+
+ {new BigDecimal("5.000E999"), "%g", "5.00000e+999"},
+ {new BigDecimal("5.000E999"), "%.5g", "5.0000e+999"},
+ {new BigDecimal("5.000E999"), "%- (,9.8g", " 5.0000000e+999"},
+ {new BigDecimal("5.000E999"), "%+0(,8.4g", "+5.000e+999"},
+ {new BigDecimal("5.000E999"), "%-+10.6g", "+5.00000e+999"},
+ {new BigDecimal("5.000E999"), "% 0(,12.0g", " 000005e+999"},
+
+ {new BigDecimal("-5.000E999"), "%g", "-5.00000e+999"},
+ {new BigDecimal("-5.000E999"), "%.5g", "-5.0000e+999"},
+ {new BigDecimal("-5.000E999"), "%- (,9.8g", "(5.0000000e+999)"},
+ {new BigDecimal("-5.000E999"), "%+0(,8.4g", "(5.000e+999)"},
+ {new BigDecimal("-5.000E999"), "%-+10.6g", "-5.00000e+999"},
+ {new BigDecimal("-5.000E999"), "% 0(,12.0g", "(00005e+999)"},
+ };
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ for (int i = 0; i < tripleG.length; i++) {
+ f = new Formatter(Locale.US);
+ f.format((String)tripleG[i][pattern], tripleG[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleG[i][input] + ",pattern["
+ + i + "]:" + tripleG[i][pattern],
+ tripleG[i][output], f.toString());
+
+ // test for conversion type 'G'
+ f = new Formatter(Locale.US);
+ f.format(((String)tripleG[i][pattern]).toUpperCase(), tripleG[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleG[i][input] + ",pattern["
+ + i + "]:" + tripleG[i][pattern], ((String)tripleG[i][output])
+ .toUpperCase(Locale.US), f.toString());
+ }
+
+ f = new Formatter(Locale.GERMAN);
+ f.format("%- (,9.6g", new BigDecimal("4E6"));
+ /*
+ * fail on RI, spec says 'g' requires the output to be formatted in
+ * general scientific notation and the localization algorithm is
+ * applied. But RI format this case to 4.00000e+06, which does not
+ * conform to the German Locale
+ */
+ assertEquals(" 4,00000e+06", f.toString());
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for BigDecimal
+ * conversion type 'f'
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_BigDecimalConversionF() {
+
+ Formatter f = null;
+ final int input = 0;
+ final int pattern = 1;
+ final int output = 2;
+ final Object[][] tripleF = {
+ {BigDecimal.ZERO, "%f", "0.000000"},
+ {BigDecimal.ZERO, "%#.3f", "0.000"},
+ {BigDecimal.ZERO, "%#,5f", "0.000000"},
+ {BigDecimal.ZERO, "%- #(12.0f", " 0. "},
+ {BigDecimal.ZERO, "%#+0(1.6f", "+0.000000"},
+ {BigDecimal.ZERO, "%-+(8.4f", "+0.0000 "},
+ {BigDecimal.ZERO, "% 0#(9.8f", " 0.00000000"},
+ {BigDecimal.ONE, "%f", "1.000000"},
+ {BigDecimal.ONE, "%#.3f", "1.000"},
+ {BigDecimal.ONE, "%#,5f", "1.000000"},
+ {BigDecimal.ONE, "%- #(12.0f", " 1. "},
+ {BigDecimal.ONE, "%#+0(1.6f", "+1.000000"},
+ {BigDecimal.ONE, "%-+(8.4f", "+1.0000 "},
+ {BigDecimal.ONE, "% 0#(9.8f", " 1.00000000"},
+ {BigDecimal.TEN, "%f", "10.000000"},
+ {BigDecimal.TEN, "%#.3f", "10.000"},
+ {BigDecimal.TEN, "%#,5f", "10.000000"},
+ {BigDecimal.TEN, "%- #(12.0f", " 10. "},
+ {BigDecimal.TEN, "%#+0(1.6f", "+10.000000"},
+ {BigDecimal.TEN, "%-+(8.4f", "+10.0000"},
+ {BigDecimal.TEN, "% 0#(9.8f", " 10.00000000"},
+ {new BigDecimal(-1), "%f", "-1.000000"},
+ {new BigDecimal(-1), "%#.3f", "-1.000"},
+ {new BigDecimal(-1), "%#,5f", "-1.000000"},
+ {new BigDecimal(-1), "%- #(12.0f", "(1.) "},
+ {new BigDecimal(-1), "%#+0(1.6f", "(1.000000)"},
+ {new BigDecimal(-1), "%-+(8.4f", "(1.0000)"},
+ {new BigDecimal(-1), "% 0#(9.8f", "(1.00000000)"},
+ {new BigDecimal("9999999999999999999999999999999999999999999"), "%f", "9999999999999999999999999999999999999999999.000000"},
+ {new BigDecimal("9999999999999999999999999999999999999999999"), "%#.3f", "9999999999999999999999999999999999999999999.000"},
+ {new BigDecimal("9999999999999999999999999999999999999999999"), "%#,5f", "9,999,999,999,999,999,999,999,999,999,999,999,999,999,999.000000"},
+ {new BigDecimal("9999999999999999999999999999999999999999999"), "%- #(12.0f", " 9999999999999999999999999999999999999999999."},
+ {new BigDecimal("9999999999999999999999999999999999999999999"), "%#+0(1.6f", "+9999999999999999999999999999999999999999999.000000"},
+ {new BigDecimal("9999999999999999999999999999999999999999999"), "%-+(8.4f", "+9999999999999999999999999999999999999999999.0000"},
+ {new BigDecimal("9999999999999999999999999999999999999999999"), "% 0#(9.8f", " 9999999999999999999999999999999999999999999.00000000"},
+ {new BigDecimal("-9999999999999999999999999999999999999999999"), "%f", "-9999999999999999999999999999999999999999999.000000"},
+ {new BigDecimal("-9999999999999999999999999999999999999999999"), "%#.3f", "-9999999999999999999999999999999999999999999.000"},
+ {new BigDecimal("-9999999999999999999999999999999999999999999"), "%#,5f", "-9,999,999,999,999,999,999,999,999,999,999,999,999,999,999.000000"},
+ {new BigDecimal("-9999999999999999999999999999999999999999999"), "%- #(12.0f", "(9999999999999999999999999999999999999999999.)"},
+ {new BigDecimal("-9999999999999999999999999999999999999999999"), "%#+0(1.6f", "(9999999999999999999999999999999999999999999.000000)"},
+ {new BigDecimal("-9999999999999999999999999999999999999999999"), "%-+(8.4f", "(9999999999999999999999999999999999999999999.0000)"},
+ {new BigDecimal("-9999999999999999999999999999999999999999999"), "% 0#(9.8f", "(9999999999999999999999999999999999999999999.00000000)"},
+ };
+ for (int i = 0; i < tripleF.length; i++) {
+ f = new Formatter(Locale.US);
+ f.format((String)tripleF[i][pattern], tripleF[i][input]);
+ assertEquals("triple[" + i + "]:" + tripleF[i][input] + ",pattern["
+ + i + "]:" + tripleF[i][pattern], tripleF[i][output], f.toString());
+ }
+
+ f = new Formatter(Locale.US);
+ f.format("%f", new BigDecimal("5.0E9"));
+ // error on RI
+ // RI throw ArrayIndexOutOfBoundsException
+ assertEquals("5000000000.000000", f.toString());
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for exceptions in
+ * Float/Double/BigDecimal conversion type 'e', 'E', 'g', 'G', 'f', 'a', 'A'
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_FloatDoubleBigDecimalConversionException() {
+ Formatter f = null;
+
+ final char[] conversions = { 'e', 'E', 'g', 'G', 'f', 'a', 'A' };
+ final Object[] illArgs = { false, (byte) 1, (short) 2, 3, (long) 4,
+ new BigInteger("5"), new Character('c'), new Object(),
+ new Date() };
+ for (int i = 0; i < illArgs.length; i++) {
+ for (int j = 0; j < conversions.length; j++) {
+ try {
+ f = new Formatter(Locale.UK);
+ f.format("%" + conversions[j], illArgs[i]);
+ fail("should throw IllegalFormatConversionException");
+ } catch (IllegalFormatConversionException e) {
+ // expected
+ }
+ }
+ }
+
+ try {
+ f = new Formatter(Locale.UK);
+ f.format("%a", new BigDecimal(1));
+ fail("should throw IllegalFormatConversionException");
+ } catch (IllegalFormatConversionException e) {
+ // expected
+ }
+
+ try {
+ f = new Formatter(Locale.UK);
+ f.format("%A", new BigDecimal(1));
+ fail("should throw IllegalFormatConversionException");
+ } catch (IllegalFormatConversionException e) {
+ // expected
+ }
+
+ final String[] flagsConversionMismatches = { "%,e", "%,E", "%#g",
+ "%#G", "%,a", "%,A", "%(a", "%(A" };
+ for (int i = 0; i < flagsConversionMismatches.length; i++) {
+ try {
+ f = new Formatter(Locale.CHINA);
+ f.format(flagsConversionMismatches[i], new BigDecimal(1));
+ fail("should throw FormatFlagsConversionMismatchException");
+ } catch (FormatFlagsConversionMismatchException e) {
+ // expected
+ }
+ try {
+ f = new Formatter(Locale.JAPAN);
+ f.format(flagsConversionMismatches[i], (BigDecimal) null);
+ fail("should throw FormatFlagsConversionMismatchException");
+ } catch (FormatFlagsConversionMismatchException e) {
+ // expected
+ }
+ }
+
+ final String[] missingFormatWidths = { "%-0e", "%0e", "%-e", "%-0E",
+ "%0E", "%-E", "%-0g", "%0g", "%-g", "%-0G", "%0G", "%-G",
+ "%-0f", "%0f", "%-f", "%-0a", "%0a", "%-a", "%-0A", "%0A",
+ "%-A" };
+ for (int i = 0; i < missingFormatWidths.length; i++) {
+ try {
+ f = new Formatter(Locale.KOREA);
+ f.format(missingFormatWidths[i], 1f);
+ fail("should throw MissingFormatWidthException");
+ } catch (MissingFormatWidthException e) {
+ // expected
+ }
+
+ try {
+ f = new Formatter(Locale.KOREA);
+ f.format(missingFormatWidths[i], (Float) null);
+ fail("should throw MissingFormatWidthException");
+ } catch (MissingFormatWidthException e) {
+ // expected
+ }
+ }
+
+ final String[] illFlags = { "%+ e", "%+ E", "%+ g", "%+ G", "%+ f",
+ "%+ a", "%+ A", "%-03e", "%-03E", "%-03g", "%-03G", "%-03f",
+ "%-03a", "%-03A" };
+ for (int i = 0; i < illFlags.length; i++) {
+ try {
+ f = new Formatter(Locale.CANADA);
+ f.format(illFlags[i], 1.23d);
+ fail("should throw IllegalFormatFlagsException");
+ } catch (IllegalFormatFlagsException e) {
+ // expected
+ }
+
+ try {
+ f = new Formatter(Locale.CANADA);
+ f.format(illFlags[i], (Double) null);
+ fail("should throw IllegalFormatFlagsException");
+ } catch (IllegalFormatFlagsException e) {
+ // expected
+ }
+ }
+
+ f = new Formatter(Locale.US);
+ try {
+ f.format("%F", 1);
+ fail("should throw UnknownFormatConversionException");
+ } catch (UnknownFormatConversionException e) {
+ // expected
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for
+ * Float/Double/BigDecimal exception throwing order
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_FloatDoubleBigDecimalExceptionOrder() {
+ Formatter f = null;
+
+ /*
+ * Summary: UnknownFormatConversionException >
+ * MissingFormatWidthException > IllegalFormatFlagsException >
+ * FormatFlagsConversionMismatchException >
+ * IllegalFormatConversionException
+ *
+ */
+ try {
+ // compare FormatFlagsConversionMismatchException and
+ // IllegalFormatConversionException
+ f = new Formatter(Locale.US);
+ f.format("%,e", (byte) 1);
+ fail("should throw FormatFlagsConversionMismatchException");
+ } catch (FormatFlagsConversionMismatchException e) {
+ // expected
+ }
+
+ try {
+ // compare IllegalFormatFlagsException and
+ // FormatFlagsConversionMismatchException
+ f = new Formatter(Locale.US);
+ f.format("%+ ,e", 1f);
+ fail("should throw IllegalFormatFlagsException");
+ } catch (IllegalFormatFlagsException e) {
+ // expected
+ }
+
+ try {
+ // compare MissingFormatWidthException and
+ // IllegalFormatFlagsException
+ f = new Formatter(Locale.US);
+ f.format("%+ -e", 1f);
+ fail("should throw MissingFormatWidthException");
+ } catch (MissingFormatWidthException e) {
+ // expected
+ }
+
+ try {
+ // compare UnknownFormatConversionException and
+ // MissingFormatWidthException
+ f = new Formatter(Locale.US);
+ f.format("%-F", 1f);
+ fail("should throw UnknownFormatConversionException");
+ } catch (UnknownFormatConversionException e) {
+ // expected
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for BigDecimal
+ * exception throwing order
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_BigDecimalExceptionOrder() {
+ Formatter f = null;
+ BigDecimal bd = new BigDecimal("1.0");
+
+ /*
+ * Summary: UnknownFormatConversionException >
+ * MissingFormatWidthException > IllegalFormatFlagsException >
+ * FormatFlagsConversionMismatchException >
+ * IllegalFormatConversionException
+ *
+ */
+ try {
+ // compare FormatFlagsConversionMismatchException and
+ // IllegalFormatConversionException
+ f = new Formatter(Locale.US);
+ f.format("%,e", (byte) 1);
+ fail("should throw FormatFlagsConversionMismatchException");
+ } catch (FormatFlagsConversionMismatchException e) {
+ // expected
+ }
+
+ try {
+ // compare IllegalFormatFlagsException and
+ // FormatFlagsConversionMismatchException
+ f = new Formatter(Locale.US);
+ f.format("%+ ,e", bd);
+ fail("should throw IllegalFormatFlagsException");
+ } catch (IllegalFormatFlagsException e) {
+ // expected
+ }
+
+ try {
+ // compare MissingFormatWidthException and
+ // IllegalFormatFlagsException
+ f = new Formatter(Locale.US);
+ f.format("%+ -e", bd);
+ fail("should throw MissingFormatWidthException");
+ } catch (MissingFormatWidthException e) {
+ // expected
+ }
+
+ // compare UnknownFormatConversionException and
+ // MissingFormatWidthException
+ try {
+ f = new Formatter(Locale.US);
+ f.format("%-F", bd);
+ fail("should throw UnknownFormatConversionException");
+ } catch (UnknownFormatConversionException e) {
+ // expected
+ }
+ }
+
+ /**
+ * @tests java.util.Formatter#format(String, Object...) for null argment for
+ * Float/Double/BigDecimal conversion
+ */
+ public void test_formatLjava_lang_String$Ljava_lang_Object_FloatDoubleBigDecimalNullConversion() {
+ Formatter f = null;
+
+ // test (Float)null
+ f = new Formatter(Locale.FRANCE);
+ f.format("%#- (9.0e", (Float) null);
+ assertEquals(" ", f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format("%-+(1.6E", (Float) null);
+ assertEquals("NULL", f.toString());
+
+ f = new Formatter(Locale.UK);
+ f.format("%+0(,8.4g", (Float) null);
+ assertEquals(" null", f.toString());
+
+ f = new Formatter(Locale.FRANCE);
+ f.format("%- (9.8G", (Float) null);
+ assertEquals("NULL ", f.toString());
+
+ f = new Formatter(Locale.FRANCE);
+ f.format("%- (12.1f", (Float) null);
+ assertEquals("n ", f.toString());
+
+ f = new Formatter(Locale.FRANCE);
+ f.format("% .4a", (Float) null);
+ assertEquals("null", f.toString());
+
+ f = new Formatter(Locale.FRANCE);
+ f.format("%06A", (Float) null);
+ assertEquals(" NULL", f.toString());
+
+ // test (Double)null
+ f = new Formatter(Locale.GERMAN);
+ f.format("%- (9e", (Double) null);
+ assertEquals("null ", f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format("%#-+(1.6E", (Double) null);
+ assertEquals("NULL", f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format("%+0(6.4g", (Double) null);
+ assertEquals(" null", f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format("%- (,5.8G", (Double) null);
+ assertEquals("NULL ", f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format("% (.4f", (Double) null);
+ assertEquals("null", f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format("%#.6a", (Double) null);
+ assertEquals("null", f.toString());
+
+ f = new Formatter(Locale.GERMAN);
+ f.format("% 2.5A", (Double) null);
+ assertEquals("NULL", f.toString());
+
+ // test (BigDecimal)null
+ f = new Formatter(Locale.UK);
+ f.format("%#- (6.2e", (BigDecimal) null);
+ assertEquals("nu ", f.toString());
+
+ f = new Formatter(Locale.UK);
+ f.format("%-+(1.6E", (BigDecimal) null);
+ assertEquals("NULL", f.toString());
+
+ f = new Formatter(Locale.UK);
+ f.format("%+-(,5.3g", (BigDecimal) null);
+ assertEquals("nul ", f.toString());
+
+ f = new Formatter(Locale.UK);
+ f.format("%0 3G", (BigDecimal) null);
+ assertEquals("NULL", f.toString());
+
+ f = new Formatter(Locale.UK);
+ f.format("%0 (9.0G", (BigDecimal) null);
+ assertEquals(" ", f.toString());
+
+ f = new Formatter(Locale.UK);
+ f.format("% (.5f", (BigDecimal) null);
+ assertEquals("null", f.toString());
+
+ f = new Formatter(Locale.UK);
+ f.format("%06a", (BigDecimal) null);
+ assertEquals(" null", f.toString());
+
+ f = new Formatter(Locale.UK);
+ f.format("% .5A", (BigDecimal) null);
+ assertEquals("NULL", f.toString());
+ }
+
+ /**
+ * Setup resource files for testing
+ */
+ protected void setUp() throws IOException {
+ notExist = File.createTempFile("notexist", null);
+ notExist.delete();
+
+ fileWithContent = File.createTempFile("filewithcontent", null);
+ BufferedOutputStream bw = new BufferedOutputStream(
+ new FileOutputStream(fileWithContent));
+ bw.write(1);// write something into the file
+ bw.close();
+
+ readOnly = File.createTempFile("readonly", null);
+ readOnly.setReadOnly();
+
+ secret = File.createTempFile("secret", null);
+
+ defaultTimeZone = TimeZone.getDefault();
+ TimeZone cst = TimeZone.getTimeZone("Asia/Shanghai");
+ TimeZone.setDefault(cst);
+ }
+
+ /**
+ * Delete the resource files if they exist
+ */
+ protected void tearDown() {
+ if (notExist.exists()) {
+ notExist.delete();
+ }
+
+ if (fileWithContent.exists()) {
+ fileWithContent.delete();
+ }
+ if (readOnly.exists()) {
+ readOnly.delete();
+ }
+ if (secret.exists()) {
+ secret.delete();
+ }
+
+ TimeZone.setDefault(defaultTimeZone);
+ }
+}
diff --git a/Tests.Runtime.Standard/Java9/Java9Lexer.cs b/Tests.Runtime.Standard/Java9/Java9Lexer.cs
new file mode 100644
index 0000000..38c279e
--- /dev/null
+++ b/Tests.Runtime.Standard/Java9/Java9Lexer.cs
@@ -0,0 +1,1244 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// ANTLR Version: 4.7.2
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+// Generated from C:\Users\Spitz\source\repos\AntlrBug_40\AntlrConsole3\Java9Lexer.g4 by ANTLR 4.7.2
+
+// Unreachable code detected
+#pragma warning disable 0162
+// The variable '...' is assigned but its value is never used
+#pragma warning disable 0219
+// Missing XML comment for publicly visible type or member '...'
+#pragma warning disable 1591
+// Ambiguous reference in cref attribute
+#pragma warning disable 419
+
+
+using System.Linq;
+using System.Text.RegularExpressions;
+
+using System;
+using System.IO;
+using System.Text;
+using Antlr4.Runtime;
+using Antlr4.Runtime.Atn;
+using Antlr4.Runtime.Misc;
+using DFA = Antlr4.Runtime.Dfa.DFA;
+
+[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.7.2")]
+[System.CLSCompliant(false)]
+public partial class Java9Lexer : Lexer {
+ protected static DFA[] decisionToDFA;
+ protected static PredictionContextCache sharedContextCache = new PredictionContextCache();
+ public const int
+ ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8,
+ CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15,
+ ENUM=16, EXPORTS=17, EXTENDS=18, FINAL=19, FINALLY=20, FLOAT=21, FOR=22,
+ IF=23, GOTO=24, IMPLEMENTS=25, IMPORT=26, INSTANCEOF=27, INT=28, INTERFACE=29,
+ LONG=30, MODULE=31, NATIVE=32, NEW=33, OPEN=34, OPENS=35, PACKAGE=36,
+ PRIVATE=37, PROTECTED=38, PROVIDES=39, PUBLIC=40, REQUIRES=41, RETURN=42,
+ SHORT=43, STATIC=44, STRICTFP=45, SUPER=46, SWITCH=47, SYNCHRONIZED=48,
+ THIS=49, THROW=50, THROWS=51, TO=52, TRANSIENT=53, TRANSITIVE=54, TRY=55,
+ USES=56, VOID=57, VOLATILE=58, WHILE=59, WITH=60, UNDER_SCORE=61, IntegerLiteral=62,
+ FloatingPointLiteral=63, BooleanLiteral=64, CharacterLiteral=65, StringLiteral=66,
+ NullLiteral=67, LPAREN=68, RPAREN=69, LBRACE=70, RBRACE=71, LBRACK=72,
+ RBRACK=73, SEMI=74, COMMA=75, DOT=76, ELLIPSIS=77, AT=78, COLONCOLON=79,
+ ASSIGN=80, GT=81, LT=82, BANG=83, TILDE=84, QUESTION=85, COLON=86, ARROW=87,
+ EQUAL=88, LE=89, GE=90, NOTEQUAL=91, AND=92, OR=93, INC=94, DEC=95, ADD=96,
+ SUB=97, MUL=98, DIV=99, BITAND=100, BITOR=101, CARET=102, MOD=103, ADD_ASSIGN=104,
+ SUB_ASSIGN=105, MUL_ASSIGN=106, DIV_ASSIGN=107, AND_ASSIGN=108, OR_ASSIGN=109,
+ XOR_ASSIGN=110, MOD_ASSIGN=111, LSHIFT_ASSIGN=112, RSHIFT_ASSIGN=113,
+ URSHIFT_ASSIGN=114, Identifier=115, WS=116, COMMENT=117, LINE_COMMENT=118;
+ public const int
+ COMMENTS_CHANNEL=2;
+ public static string[] channelNames = {
+ "DEFAULT_TOKEN_CHANNEL", "HIDDEN", "COMMENTS_CHANNEL"
+ };
+
+ public static string[] modeNames = {
+ "DEFAULT_MODE"
+ };
+
+ public static readonly string[] ruleNames = {
+ "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", "CHAR",
+ "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM",
+ "EXPORTS", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO",
+ "IMPLEMENTS", "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "MODULE",
+ "NATIVE", "NEW", "OPEN", "OPENS", "PACKAGE", "PRIVATE", "PROTECTED", "PROVIDES",
+ "PUBLIC", "REQUIRES", "RETURN", "SHORT", "STATIC", "STRICTFP", "SUPER",
+ "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TO", "TRANSIENT",
+ "TRANSITIVE", "TRY", "USES", "VOID", "VOLATILE", "WHILE", "WITH", "UNDER_SCORE",
+ "IntegerLiteral", "DecimalIntegerLiteral", "HexIntegerLiteral", "OctalIntegerLiteral",
+ "BinaryIntegerLiteral", "IntegerTypeSuffix", "DecimalNumeral", "Digits",
+ "Digit", "NonZeroDigit", "DigitsAndUnderscores", "DigitOrUnderscore",
+ "Underscores", "HexNumeral", "HexDigits", "HexDigit", "HexDigitsAndUnderscores",
+ "HexDigitOrUnderscore", "OctalNumeral", "OctalDigits", "OctalDigit", "OctalDigitsAndUnderscores",
+ "OctalDigitOrUnderscore", "BinaryNumeral", "BinaryDigits", "BinaryDigit",
+ "BinaryDigitsAndUnderscores", "BinaryDigitOrUnderscore", "FloatingPointLiteral",
+ "DecimalFloatingPointLiteral", "ExponentPart", "ExponentIndicator", "SignedInteger",
+ "Sign", "FloatTypeSuffix", "HexadecimalFloatingPointLiteral", "HexSignificand",
+ "BinaryExponent", "BinaryExponentIndicator", "BooleanLiteral", "CharacterLiteral",
+ "SingleCharacter", "StringLiteral", "StringCharacters", "StringCharacter",
+ "EscapeSequence", "OctalEscape", "ZeroToThree", "UnicodeEscape", "NullLiteral",
+ "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA",
+ "DOT", "ELLIPSIS", "AT", "COLONCOLON", "ASSIGN", "GT", "LT", "BANG", "TILDE",
+ "QUESTION", "COLON", "ARROW", "EQUAL", "LE", "GE", "NOTEQUAL", "AND",
+ "OR", "INC", "DEC", "ADD", "SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET",
+ "MOD", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN",
+ "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN",
+ "URSHIFT_ASSIGN", "Identifier", "JavaLetter", "JavaLetterOrDigit", "WS",
+ "COMMENT", "LINE_COMMENT"
+ };
+
+
+ private class Character
+ {
+ public static bool isJavaIdentifierPart(int c)
+ {
+ if (Char.IsLetter((char)c))
+ return true;
+ else if (c == (int)'$')
+ return true;
+ else if (c == (int)'_')
+ return true;
+ else if (Char.IsDigit((char)c))
+ return true;
+ else if (Char.IsNumber((char)c))
+ return true;
+ return false;
+ }
+
+ public static bool isJavaIdentifierStart(int c)
+ {
+ if (Char.IsLetter((char)c))
+ return true;
+ else if (c == (int)'$')
+ return true;
+ else if (c == (int)'_')
+ return true;
+ return false;
+ }
+
+ public static int toCodePoint(int high, int low)
+ {
+ return Char.ConvertToUtf32((char)high, (char)low);
+ }
+ }
+
+
+ public Java9Lexer(ICharStream input)
+ : this(input, Console.Out, Console.Error) { }
+
+ public Java9Lexer(ICharStream input, TextWriter output, TextWriter errorOutput)
+ : base(input, output, errorOutput)
+ {
+ Interpreter = new LexerATNSimulator(this, _ATN, decisionToDFA, sharedContextCache);
+ }
+
+ private static readonly string[] _LiteralNames = {
+ null, "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'", "'case'",
+ "'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'",
+ "'do'", "'double'", "'else'", "'enum'", "'exports'", "'extends'", "'final'",
+ "'finally'", "'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'",
+ "'instanceof'", "'int'", "'interface'", "'long'", "'module'", "'native'",
+ "'new'", "'open'", "'opens'", "'package'", "'private'", "'protected'",
+ "'provides'", "'public'", "'requires'", "'return'", "'short'", "'static'",
+ "'strictfp'", "'super'", "'switch'", "'synchronized'", "'this'", "'throw'",
+ "'throws'", "'to'", "'transient'", "'transitive'", "'try'", "'uses'",
+ "'void'", "'volatile'", "'while'", "'with'", "'_'", null, null, null,
+ null, null, "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'",
+ "','", "'.'", "'...'", "'@'", "'::'", "'='", "'>'", "'<'", "'!'", "'~'",
+ "'?'", "':'", "'->'", "'=='", "'<='", "'>='", "'!='", "'&&'", "'||'",
+ "'++'", "'--'", "'+'", "'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'",
+ "'+='", "'-='", "'*='", "'/='", "'&='", "'|='", "'^='", "'%='", "'<<='",
+ "'>>='", "'>>>='"
+ };
+ private static readonly string[] _SymbolicNames = {
+ null, "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH",
+ "CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE",
+ "ENUM", "EXPORTS", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF",
+ "GOTO", "IMPLEMENTS", "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG",
+ "MODULE", "NATIVE", "NEW", "OPEN", "OPENS", "PACKAGE", "PRIVATE", "PROTECTED",
+ "PROVIDES", "PUBLIC", "REQUIRES", "RETURN", "SHORT", "STATIC", "STRICTFP",
+ "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TO", "TRANSIENT",
+ "TRANSITIVE", "TRY", "USES", "VOID", "VOLATILE", "WHILE", "WITH", "UNDER_SCORE",
+ "IntegerLiteral", "FloatingPointLiteral", "BooleanLiteral", "CharacterLiteral",
+ "StringLiteral", "NullLiteral", "LPAREN", "RPAREN", "LBRACE", "RBRACE",
+ "LBRACK", "RBRACK", "SEMI", "COMMA", "DOT", "ELLIPSIS", "AT", "COLONCOLON",
+ "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", "COLON", "ARROW", "EQUAL",
+ "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", "SUB", "MUL",
+ "DIV", "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", "SUB_ASSIGN",
+ "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN",
+ "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "Identifier", "WS",
+ "COMMENT", "LINE_COMMENT"
+ };
+ public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames);
+
+ [NotNull]
+ public override IVocabulary Vocabulary
+ {
+ get
+ {
+ return DefaultVocabulary;
+ }
+ }
+
+ public override string GrammarFileName { get { return "Java9Lexer.g4"; } }
+
+ public override string[] RuleNames { get { return ruleNames; } }
+
+ public override string[] ChannelNames { get { return channelNames; } }
+
+ public override string[] ModeNames { get { return modeNames; } }
+
+ public override string SerializedAtn { get { return new string(_serializedATN); } }
+
+ static Java9Lexer() {
+ decisionToDFA = new DFA[_ATN.NumberOfDecisions];
+ for (int i = 0; i < _ATN.NumberOfDecisions; i++) {
+ decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i);
+ }
+ }
+ public override bool Sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
+ switch (ruleIndex) {
+ case 159 : return JavaLetter_sempred(_localctx, predIndex);
+ case 160 : return JavaLetterOrDigit_sempred(_localctx, predIndex);
+ }
+ return true;
+ }
+ private bool JavaLetter_sempred(RuleContext _localctx, int predIndex) {
+ switch (predIndex) {
+ case 0: return Character.isJavaIdentifierStart(this.InputStream.LA(-1));
+ case 1: return Character.isJavaIdentifierStart(Character.toCodePoint((char)this.InputStream.LA(-2), (char)this.InputStream.LA(-1)));
+ }
+ return true;
+ }
+ private bool JavaLetterOrDigit_sempred(RuleContext _localctx, int predIndex) {
+ switch (predIndex) {
+ case 2: return Character.isJavaIdentifierPart(this.InputStream.LA(-1));
+ case 3: return Character.isJavaIdentifierPart(Character.toCodePoint((char)this.InputStream.LA(-2), (char)this.InputStream.LA(-1)));
+ }
+ return true;
+ }
+
+ private static char[] _serializedATN = {
+ '\x3', '\x608B', '\xA72A', '\x8133', '\xB9ED', '\x417C', '\x3BE7', '\x7786',
+ '\x5964', '\x2', 'x', '\x4A8', '\b', '\x1', '\x4', '\x2', '\t', '\x2',
+ '\x4', '\x3', '\t', '\x3', '\x4', '\x4', '\t', '\x4', '\x4', '\x5', '\t',
+ '\x5', '\x4', '\x6', '\t', '\x6', '\x4', '\a', '\t', '\a', '\x4', '\b',
+ '\t', '\b', '\x4', '\t', '\t', '\t', '\x4', '\n', '\t', '\n', '\x4', '\v',
+ '\t', '\v', '\x4', '\f', '\t', '\f', '\x4', '\r', '\t', '\r', '\x4', '\xE',
+ '\t', '\xE', '\x4', '\xF', '\t', '\xF', '\x4', '\x10', '\t', '\x10', '\x4',
+ '\x11', '\t', '\x11', '\x4', '\x12', '\t', '\x12', '\x4', '\x13', '\t',
+ '\x13', '\x4', '\x14', '\t', '\x14', '\x4', '\x15', '\t', '\x15', '\x4',
+ '\x16', '\t', '\x16', '\x4', '\x17', '\t', '\x17', '\x4', '\x18', '\t',
+ '\x18', '\x4', '\x19', '\t', '\x19', '\x4', '\x1A', '\t', '\x1A', '\x4',
+ '\x1B', '\t', '\x1B', '\x4', '\x1C', '\t', '\x1C', '\x4', '\x1D', '\t',
+ '\x1D', '\x4', '\x1E', '\t', '\x1E', '\x4', '\x1F', '\t', '\x1F', '\x4',
+ ' ', '\t', ' ', '\x4', '!', '\t', '!', '\x4', '\"', '\t', '\"', '\x4',
+ '#', '\t', '#', '\x4', '$', '\t', '$', '\x4', '%', '\t', '%', '\x4', '&',
+ '\t', '&', '\x4', '\'', '\t', '\'', '\x4', '(', '\t', '(', '\x4', ')',
+ '\t', ')', '\x4', '*', '\t', '*', '\x4', '+', '\t', '+', '\x4', ',', '\t',
+ ',', '\x4', '-', '\t', '-', '\x4', '.', '\t', '.', '\x4', '/', '\t', '/',
+ '\x4', '\x30', '\t', '\x30', '\x4', '\x31', '\t', '\x31', '\x4', '\x32',
+ '\t', '\x32', '\x4', '\x33', '\t', '\x33', '\x4', '\x34', '\t', '\x34',
+ '\x4', '\x35', '\t', '\x35', '\x4', '\x36', '\t', '\x36', '\x4', '\x37',
+ '\t', '\x37', '\x4', '\x38', '\t', '\x38', '\x4', '\x39', '\t', '\x39',
+ '\x4', ':', '\t', ':', '\x4', ';', '\t', ';', '\x4', '<', '\t', '<', '\x4',
+ '=', '\t', '=', '\x4', '>', '\t', '>', '\x4', '?', '\t', '?', '\x4', '@',
+ '\t', '@', '\x4', '\x41', '\t', '\x41', '\x4', '\x42', '\t', '\x42', '\x4',
+ '\x43', '\t', '\x43', '\x4', '\x44', '\t', '\x44', '\x4', '\x45', '\t',
+ '\x45', '\x4', '\x46', '\t', '\x46', '\x4', 'G', '\t', 'G', '\x4', 'H',
+ '\t', 'H', '\x4', 'I', '\t', 'I', '\x4', 'J', '\t', 'J', '\x4', 'K', '\t',
+ 'K', '\x4', 'L', '\t', 'L', '\x4', 'M', '\t', 'M', '\x4', 'N', '\t', 'N',
+ '\x4', 'O', '\t', 'O', '\x4', 'P', '\t', 'P', '\x4', 'Q', '\t', 'Q', '\x4',
+ 'R', '\t', 'R', '\x4', 'S', '\t', 'S', '\x4', 'T', '\t', 'T', '\x4', 'U',
+ '\t', 'U', '\x4', 'V', '\t', 'V', '\x4', 'W', '\t', 'W', '\x4', 'X', '\t',
+ 'X', '\x4', 'Y', '\t', 'Y', '\x4', 'Z', '\t', 'Z', '\x4', '[', '\t', '[',
+ '\x4', '\\', '\t', '\\', '\x4', ']', '\t', ']', '\x4', '^', '\t', '^',
+ '\x4', '_', '\t', '_', '\x4', '`', '\t', '`', '\x4', '\x61', '\t', '\x61',
+ '\x4', '\x62', '\t', '\x62', '\x4', '\x63', '\t', '\x63', '\x4', '\x64',
+ '\t', '\x64', '\x4', '\x65', '\t', '\x65', '\x4', '\x66', '\t', '\x66',
+ '\x4', 'g', '\t', 'g', '\x4', 'h', '\t', 'h', '\x4', 'i', '\t', 'i', '\x4',
+ 'j', '\t', 'j', '\x4', 'k', '\t', 'k', '\x4', 'l', '\t', 'l', '\x4', 'm',
+ '\t', 'm', '\x4', 'n', '\t', 'n', '\x4', 'o', '\t', 'o', '\x4', 'p', '\t',
+ 'p', '\x4', 'q', '\t', 'q', '\x4', 'r', '\t', 'r', '\x4', 's', '\t', 's',
+ '\x4', 't', '\t', 't', '\x4', 'u', '\t', 'u', '\x4', 'v', '\t', 'v', '\x4',
+ 'w', '\t', 'w', '\x4', 'x', '\t', 'x', '\x4', 'y', '\t', 'y', '\x4', 'z',
+ '\t', 'z', '\x4', '{', '\t', '{', '\x4', '|', '\t', '|', '\x4', '}', '\t',
+ '}', '\x4', '~', '\t', '~', '\x4', '\x7F', '\t', '\x7F', '\x4', '\x80',
+ '\t', '\x80', '\x4', '\x81', '\t', '\x81', '\x4', '\x82', '\t', '\x82',
+ '\x4', '\x83', '\t', '\x83', '\x4', '\x84', '\t', '\x84', '\x4', '\x85',
+ '\t', '\x85', '\x4', '\x86', '\t', '\x86', '\x4', '\x87', '\t', '\x87',
+ '\x4', '\x88', '\t', '\x88', '\x4', '\x89', '\t', '\x89', '\x4', '\x8A',
+ '\t', '\x8A', '\x4', '\x8B', '\t', '\x8B', '\x4', '\x8C', '\t', '\x8C',
+ '\x4', '\x8D', '\t', '\x8D', '\x4', '\x8E', '\t', '\x8E', '\x4', '\x8F',
+ '\t', '\x8F', '\x4', '\x90', '\t', '\x90', '\x4', '\x91', '\t', '\x91',
+ '\x4', '\x92', '\t', '\x92', '\x4', '\x93', '\t', '\x93', '\x4', '\x94',
+ '\t', '\x94', '\x4', '\x95', '\t', '\x95', '\x4', '\x96', '\t', '\x96',
+ '\x4', '\x97', '\t', '\x97', '\x4', '\x98', '\t', '\x98', '\x4', '\x99',
+ '\t', '\x99', '\x4', '\x9A', '\t', '\x9A', '\x4', '\x9B', '\t', '\x9B',
+ '\x4', '\x9C', '\t', '\x9C', '\x4', '\x9D', '\t', '\x9D', '\x4', '\x9E',
+ '\t', '\x9E', '\x4', '\x9F', '\t', '\x9F', '\x4', '\xA0', '\t', '\xA0',
+ '\x4', '\xA1', '\t', '\xA1', '\x4', '\xA2', '\t', '\xA2', '\x4', '\xA3',
+ '\t', '\xA3', '\x4', '\xA4', '\t', '\xA4', '\x4', '\xA5', '\t', '\xA5',
+ '\x3', '\x2', '\x3', '\x2', '\x3', '\x2', '\x3', '\x2', '\x3', '\x2',
+ '\x3', '\x2', '\x3', '\x2', '\x3', '\x2', '\x3', '\x2', '\x3', '\x3',
+ '\x3', '\x3', '\x3', '\x3', '\x3', '\x3', '\x3', '\x3', '\x3', '\x3',
+ '\x3', '\x3', '\x3', '\x4', '\x3', '\x4', '\x3', '\x4', '\x3', '\x4',
+ '\x3', '\x4', '\x3', '\x4', '\x3', '\x4', '\x3', '\x4', '\x3', '\x5',
+ '\x3', '\x5', '\x3', '\x5', '\x3', '\x5', '\x3', '\x5', '\x3', '\x5',
+ '\x3', '\x6', '\x3', '\x6', '\x3', '\x6', '\x3', '\x6', '\x3', '\x6',
+ '\x3', '\a', '\x3', '\a', '\x3', '\a', '\x3', '\a', '\x3', '\a', '\x3',
+ '\b', '\x3', '\b', '\x3', '\b', '\x3', '\b', '\x3', '\b', '\x3', '\b',
+ '\x3', '\t', '\x3', '\t', '\x3', '\t', '\x3', '\t', '\x3', '\t', '\x3',
+ '\n', '\x3', '\n', '\x3', '\n', '\x3', '\n', '\x3', '\n', '\x3', '\n',
+ '\x3', '\v', '\x3', '\v', '\x3', '\v', '\x3', '\v', '\x3', '\v', '\x3',
+ '\v', '\x3', '\f', '\x3', '\f', '\x3', '\f', '\x3', '\f', '\x3', '\f',
+ '\x3', '\f', '\x3', '\f', '\x3', '\f', '\x3', '\f', '\x3', '\r', '\x3',
+ '\r', '\x3', '\r', '\x3', '\r', '\x3', '\r', '\x3', '\r', '\x3', '\r',
+ '\x3', '\r', '\x3', '\xE', '\x3', '\xE', '\x3', '\xE', '\x3', '\xF', '\x3',
+ '\xF', '\x3', '\xF', '\x3', '\xF', '\x3', '\xF', '\x3', '\xF', '\x3',
+ '\xF', '\x3', '\x10', '\x3', '\x10', '\x3', '\x10', '\x3', '\x10', '\x3',
+ '\x10', '\x3', '\x11', '\x3', '\x11', '\x3', '\x11', '\x3', '\x11', '\x3',
+ '\x11', '\x3', '\x12', '\x3', '\x12', '\x3', '\x12', '\x3', '\x12', '\x3',
+ '\x12', '\x3', '\x12', '\x3', '\x12', '\x3', '\x12', '\x3', '\x13', '\x3',
+ '\x13', '\x3', '\x13', '\x3', '\x13', '\x3', '\x13', '\x3', '\x13', '\x3',
+ '\x13', '\x3', '\x13', '\x3', '\x14', '\x3', '\x14', '\x3', '\x14', '\x3',
+ '\x14', '\x3', '\x14', '\x3', '\x14', '\x3', '\x15', '\x3', '\x15', '\x3',
+ '\x15', '\x3', '\x15', '\x3', '\x15', '\x3', '\x15', '\x3', '\x15', '\x3',
+ '\x15', '\x3', '\x16', '\x3', '\x16', '\x3', '\x16', '\x3', '\x16', '\x3',
+ '\x16', '\x3', '\x16', '\x3', '\x17', '\x3', '\x17', '\x3', '\x17', '\x3',
+ '\x17', '\x3', '\x18', '\x3', '\x18', '\x3', '\x18', '\x3', '\x19', '\x3',
+ '\x19', '\x3', '\x19', '\x3', '\x19', '\x3', '\x19', '\x3', '\x1A', '\x3',
+ '\x1A', '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1A', '\x3',
+ '\x1A', '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1A', '\x3',
+ '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1B', '\x3',
+ '\x1B', '\x3', '\x1B', '\x3', '\x1C', '\x3', '\x1C', '\x3', '\x1C', '\x3',
+ '\x1C', '\x3', '\x1C', '\x3', '\x1C', '\x3', '\x1C', '\x3', '\x1C', '\x3',
+ '\x1C', '\x3', '\x1C', '\x3', '\x1C', '\x3', '\x1D', '\x3', '\x1D', '\x3',
+ '\x1D', '\x3', '\x1D', '\x3', '\x1E', '\x3', '\x1E', '\x3', '\x1E', '\x3',
+ '\x1E', '\x3', '\x1E', '\x3', '\x1E', '\x3', '\x1E', '\x3', '\x1E', '\x3',
+ '\x1E', '\x3', '\x1E', '\x3', '\x1F', '\x3', '\x1F', '\x3', '\x1F', '\x3',
+ '\x1F', '\x3', '\x1F', '\x3', ' ', '\x3', ' ', '\x3', ' ', '\x3', ' ',
+ '\x3', ' ', '\x3', ' ', '\x3', ' ', '\x3', '!', '\x3', '!', '\x3', '!',
+ '\x3', '!', '\x3', '!', '\x3', '!', '\x3', '!', '\x3', '\"', '\x3', '\"',
+ '\x3', '\"', '\x3', '\"', '\x3', '#', '\x3', '#', '\x3', '#', '\x3', '#',
+ '\x3', '#', '\x3', '$', '\x3', '$', '\x3', '$', '\x3', '$', '\x3', '$',
+ '\x3', '$', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '%',
+ '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '&', '\x3', '&', '\x3', '&',
+ '\x3', '&', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', '\'',
+ '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3',
+ '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3', '(', '\x3', '(', '\x3',
+ '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3',
+ '(', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x3',
+ ')', '\x3', ')', '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '*', '\x3',
+ '*', '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '+', '\x3',
+ '+', '\x3', '+', '\x3', '+', '\x3', '+', '\x3', '+', '\x3', '+', '\x3',
+ ',', '\x3', ',', '\x3', ',', '\x3', ',', '\x3', ',', '\x3', ',', '\x3',
+ '-', '\x3', '-', '\x3', '-', '\x3', '-', '\x3', '-', '\x3', '-', '\x3',
+ '-', '\x3', '.', '\x3', '.', '\x3', '.', '\x3', '.', '\x3', '.', '\x3',
+ '.', '\x3', '.', '\x3', '.', '\x3', '.', '\x3', '/', '\x3', '/', '\x3',
+ '/', '\x3', '/', '\x3', '/', '\x3', '/', '\x3', '\x30', '\x3', '\x30',
+ '\x3', '\x30', '\x3', '\x30', '\x3', '\x30', '\x3', '\x30', '\x3', '\x30',
+ '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x31',
+ '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x31',
+ '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x32', '\x3', '\x32',
+ '\x3', '\x32', '\x3', '\x32', '\x3', '\x32', '\x3', '\x33', '\x3', '\x33',
+ '\x3', '\x33', '\x3', '\x33', '\x3', '\x33', '\x3', '\x33', '\x3', '\x34',
+ '\x3', '\x34', '\x3', '\x34', '\x3', '\x34', '\x3', '\x34', '\x3', '\x34',
+ '\x3', '\x34', '\x3', '\x35', '\x3', '\x35', '\x3', '\x35', '\x3', '\x36',
+ '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', '\x36',
+ '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', '\x37',
+ '\x3', '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', '\x37',
+ '\x3', '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', '\x37',
+ '\x3', '\x38', '\x3', '\x38', '\x3', '\x38', '\x3', '\x38', '\x3', '\x39',
+ '\x3', '\x39', '\x3', '\x39', '\x3', '\x39', '\x3', '\x39', '\x3', ':',
+ '\x3', ':', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', ';', '\x3', ';',
+ '\x3', ';', '\x3', ';', '\x3', ';', '\x3', ';', '\x3', ';', '\x3', ';',
+ '\x3', ';', '\x3', '<', '\x3', '<', '\x3', '<', '\x3', '<', '\x3', '<',
+ '\x3', '<', '\x3', '=', '\x3', '=', '\x3', '=', '\x3', '=', '\x3', '=',
+ '\x3', '>', '\x3', '>', '\x3', '?', '\x3', '?', '\x3', '?', '\x3', '?',
+ '\x5', '?', '\x2E9', '\n', '?', '\x3', '@', '\x3', '@', '\x5', '@', '\x2ED',
+ '\n', '@', '\x3', '\x41', '\x3', '\x41', '\x5', '\x41', '\x2F1', '\n',
+ '\x41', '\x3', '\x42', '\x3', '\x42', '\x5', '\x42', '\x2F5', '\n', '\x42',
+ '\x3', '\x43', '\x3', '\x43', '\x5', '\x43', '\x2F9', '\n', '\x43', '\x3',
+ '\x44', '\x3', '\x44', '\x3', '\x45', '\x3', '\x45', '\x3', '\x45', '\x5',
+ '\x45', '\x300', '\n', '\x45', '\x3', '\x45', '\x3', '\x45', '\x3', '\x45',
+ '\x5', '\x45', '\x305', '\n', '\x45', '\x5', '\x45', '\x307', '\n', '\x45',
+ '\x3', '\x46', '\x3', '\x46', '\x5', '\x46', '\x30B', '\n', '\x46', '\x3',
+ '\x46', '\x5', '\x46', '\x30E', '\n', '\x46', '\x3', 'G', '\x3', 'G',
+ '\x5', 'G', '\x312', '\n', 'G', '\x3', 'H', '\x3', 'H', '\x3', 'I', '\x6',
+ 'I', '\x317', '\n', 'I', '\r', 'I', '\xE', 'I', '\x318', '\x3', 'J', '\x3',
+ 'J', '\x5', 'J', '\x31D', '\n', 'J', '\x3', 'K', '\x6', 'K', '\x320',
+ '\n', 'K', '\r', 'K', '\xE', 'K', '\x321', '\x3', 'L', '\x3', 'L', '\x3',
+ 'L', '\x3', 'L', '\x3', 'M', '\x3', 'M', '\x5', 'M', '\x32A', '\n', 'M',
+ '\x3', 'M', '\x5', 'M', '\x32D', '\n', 'M', '\x3', 'N', '\x3', 'N', '\x3',
+ 'O', '\x6', 'O', '\x332', '\n', 'O', '\r', 'O', '\xE', 'O', '\x333', '\x3',
+ 'P', '\x3', 'P', '\x5', 'P', '\x338', '\n', 'P', '\x3', 'Q', '\x3', 'Q',
+ '\x5', 'Q', '\x33C', '\n', 'Q', '\x3', 'Q', '\x3', 'Q', '\x3', 'R', '\x3',
+ 'R', '\x5', 'R', '\x342', '\n', 'R', '\x3', 'R', '\x5', 'R', '\x345',
+ '\n', 'R', '\x3', 'S', '\x3', 'S', '\x3', 'T', '\x6', 'T', '\x34A', '\n',
+ 'T', '\r', 'T', '\xE', 'T', '\x34B', '\x3', 'U', '\x3', 'U', '\x5', 'U',
+ '\x350', '\n', 'U', '\x3', 'V', '\x3', 'V', '\x3', 'V', '\x3', 'V', '\x3',
+ 'W', '\x3', 'W', '\x5', 'W', '\x358', '\n', 'W', '\x3', 'W', '\x5', 'W',
+ '\x35B', '\n', 'W', '\x3', 'X', '\x3', 'X', '\x3', 'Y', '\x6', 'Y', '\x360',
+ '\n', 'Y', '\r', 'Y', '\xE', 'Y', '\x361', '\x3', 'Z', '\x3', 'Z', '\x5',
+ 'Z', '\x366', '\n', 'Z', '\x3', '[', '\x3', '[', '\x5', '[', '\x36A',
+ '\n', '[', '\x3', '\\', '\x3', '\\', '\x3', '\\', '\x5', '\\', '\x36F',
+ '\n', '\\', '\x3', '\\', '\x5', '\\', '\x372', '\n', '\\', '\x3', '\\',
+ '\x5', '\\', '\x375', '\n', '\\', '\x3', '\\', '\x3', '\\', '\x3', '\\',
+ '\x5', '\\', '\x37A', '\n', '\\', '\x3', '\\', '\x5', '\\', '\x37D', '\n',
+ '\\', '\x3', '\\', '\x3', '\\', '\x3', '\\', '\x5', '\\', '\x382', '\n',
+ '\\', '\x3', '\\', '\x3', '\\', '\x3', '\\', '\x5', '\\', '\x387', '\n',
+ '\\', '\x3', ']', '\x3', ']', '\x3', ']', '\x3', '^', '\x3', '^', '\x3',
+ '_', '\x5', '_', '\x38F', '\n', '_', '\x3', '_', '\x3', '_', '\x3', '`',
+ '\x3', '`', '\x3', '\x61', '\x3', '\x61', '\x3', '\x62', '\x3', '\x62',
+ '\x3', '\x62', '\x5', '\x62', '\x39A', '\n', '\x62', '\x3', '\x63', '\x3',
+ '\x63', '\x5', '\x63', '\x39E', '\n', '\x63', '\x3', '\x63', '\x3', '\x63',
+ '\x3', '\x63', '\x5', '\x63', '\x3A3', '\n', '\x63', '\x3', '\x63', '\x3',
+ '\x63', '\x5', '\x63', '\x3A7', '\n', '\x63', '\x3', '\x64', '\x3', '\x64',
+ '\x3', '\x64', '\x3', '\x65', '\x3', '\x65', '\x3', '\x66', '\x3', '\x66',
+ '\x3', '\x66', '\x3', '\x66', '\x3', '\x66', '\x3', '\x66', '\x3', '\x66',
+ '\x3', '\x66', '\x3', '\x66', '\x5', '\x66', '\x3B7', '\n', '\x66', '\x3',
+ 'g', '\x3', 'g', '\x3', 'g', '\x3', 'g', '\x3', 'g', '\x3', 'g', '\x3',
+ 'g', '\x3', 'g', '\x5', 'g', '\x3C1', '\n', 'g', '\x3', 'h', '\x3', 'h',
+ '\x3', 'i', '\x3', 'i', '\x5', 'i', '\x3C7', '\n', 'i', '\x3', 'i', '\x3',
+ 'i', '\x3', 'j', '\x6', 'j', '\x3CC', '\n', 'j', '\r', 'j', '\xE', 'j',
+ '\x3CD', '\x3', 'k', '\x3', 'k', '\x5', 'k', '\x3D2', '\n', 'k', '\x3',
+ 'l', '\x3', 'l', '\x3', 'l', '\x3', 'l', '\x5', 'l', '\x3D8', '\n', 'l',
+ '\x3', 'm', '\x3', 'm', '\x3', 'm', '\x3', 'm', '\x3', 'm', '\x3', 'm',
+ '\x3', 'm', '\x3', 'm', '\x3', 'm', '\x3', 'm', '\x3', 'm', '\x5', 'm',
+ '\x3E5', '\n', 'm', '\x3', 'n', '\x3', 'n', '\x3', 'o', '\x3', 'o', '\x6',
+ 'o', '\x3EB', '\n', 'o', '\r', 'o', '\xE', 'o', '\x3EC', '\x3', 'o', '\x3',
+ 'o', '\x3', 'o', '\x3', 'o', '\x3', 'o', '\x3', 'p', '\x3', 'p', '\x3',
+ 'p', '\x3', 'p', '\x3', 'p', '\x3', 'q', '\x3', 'q', '\x3', 'r', '\x3',
+ 'r', '\x3', 's', '\x3', 's', '\x3', 't', '\x3', 't', '\x3', 'u', '\x3',
+ 'u', '\x3', 'v', '\x3', 'v', '\x3', 'w', '\x3', 'w', '\x3', 'x', '\x3',
+ 'x', '\x3', 'y', '\x3', 'y', '\x3', 'z', '\x3', 'z', '\x3', 'z', '\x3',
+ 'z', '\x3', '{', '\x3', '{', '\x3', '|', '\x3', '|', '\x3', '|', '\x3',
+ '}', '\x3', '}', '\x3', '~', '\x3', '~', '\x3', '\x7F', '\x3', '\x7F',
+ '\x3', '\x80', '\x3', '\x80', '\x3', '\x81', '\x3', '\x81', '\x3', '\x82',
+ '\x3', '\x82', '\x3', '\x83', '\x3', '\x83', '\x3', '\x84', '\x3', '\x84',
+ '\x3', '\x84', '\x3', '\x85', '\x3', '\x85', '\x3', '\x85', '\x3', '\x86',
+ '\x3', '\x86', '\x3', '\x86', '\x3', '\x87', '\x3', '\x87', '\x3', '\x87',
+ '\x3', '\x88', '\x3', '\x88', '\x3', '\x88', '\x3', '\x89', '\x3', '\x89',
+ '\x3', '\x89', '\x3', '\x8A', '\x3', '\x8A', '\x3', '\x8A', '\x3', '\x8B',
+ '\x3', '\x8B', '\x3', '\x8B', '\x3', '\x8C', '\x3', '\x8C', '\x3', '\x8C',
+ '\x3', '\x8D', '\x3', '\x8D', '\x3', '\x8E', '\x3', '\x8E', '\x3', '\x8F',
+ '\x3', '\x8F', '\x3', '\x90', '\x3', '\x90', '\x3', '\x91', '\x3', '\x91',
+ '\x3', '\x92', '\x3', '\x92', '\x3', '\x93', '\x3', '\x93', '\x3', '\x94',
+ '\x3', '\x94', '\x3', '\x95', '\x3', '\x95', '\x3', '\x95', '\x3', '\x96',
+ '\x3', '\x96', '\x3', '\x96', '\x3', '\x97', '\x3', '\x97', '\x3', '\x97',
+ '\x3', '\x98', '\x3', '\x98', '\x3', '\x98', '\x3', '\x99', '\x3', '\x99',
+ '\x3', '\x99', '\x3', '\x9A', '\x3', '\x9A', '\x3', '\x9A', '\x3', '\x9B',
+ '\x3', '\x9B', '\x3', '\x9B', '\x3', '\x9C', '\x3', '\x9C', '\x3', '\x9C',
+ '\x3', '\x9D', '\x3', '\x9D', '\x3', '\x9D', '\x3', '\x9D', '\x3', '\x9E',
+ '\x3', '\x9E', '\x3', '\x9E', '\x3', '\x9E', '\x3', '\x9F', '\x3', '\x9F',
+ '\x3', '\x9F', '\x3', '\x9F', '\x3', '\x9F', '\x3', '\xA0', '\x3', '\xA0',
+ '\a', '\xA0', '\x474', '\n', '\xA0', '\f', '\xA0', '\xE', '\xA0', '\x477',
+ '\v', '\xA0', '\x3', '\xA1', '\x3', '\xA1', '\x3', '\xA1', '\x3', '\xA1',
+ '\x3', '\xA1', '\x3', '\xA1', '\x5', '\xA1', '\x47F', '\n', '\xA1', '\x3',
+ '\xA2', '\x3', '\xA2', '\x3', '\xA2', '\x3', '\xA2', '\x3', '\xA2', '\x3',
+ '\xA2', '\x5', '\xA2', '\x487', '\n', '\xA2', '\x3', '\xA3', '\x6', '\xA3',
+ '\x48A', '\n', '\xA3', '\r', '\xA3', '\xE', '\xA3', '\x48B', '\x3', '\xA3',
+ '\x3', '\xA3', '\x3', '\xA4', '\x3', '\xA4', '\x3', '\xA4', '\x3', '\xA4',
+ '\a', '\xA4', '\x494', '\n', '\xA4', '\f', '\xA4', '\xE', '\xA4', '\x497',
+ '\v', '\xA4', '\x3', '\xA4', '\x3', '\xA4', '\x3', '\xA4', '\x3', '\xA4',
+ '\x3', '\xA4', '\x3', '\xA5', '\x3', '\xA5', '\x3', '\xA5', '\x3', '\xA5',
+ '\a', '\xA5', '\x4A2', '\n', '\xA5', '\f', '\xA5', '\xE', '\xA5', '\x4A5',
+ '\v', '\xA5', '\x3', '\xA5', '\x3', '\xA5', '\x3', '\x495', '\x2', '\xA6',
+ '\x3', '\x3', '\x5', '\x4', '\a', '\x5', '\t', '\x6', '\v', '\a', '\r',
+ '\b', '\xF', '\t', '\x11', '\n', '\x13', '\v', '\x15', '\f', '\x17', '\r',
+ '\x19', '\xE', '\x1B', '\xF', '\x1D', '\x10', '\x1F', '\x11', '!', '\x12',
+ '#', '\x13', '%', '\x14', '\'', '\x15', ')', '\x16', '+', '\x17', '-',
+ '\x18', '/', '\x19', '\x31', '\x1A', '\x33', '\x1B', '\x35', '\x1C', '\x37',
+ '\x1D', '\x39', '\x1E', ';', '\x1F', '=', ' ', '?', '!', '\x41', '\"',
+ '\x43', '#', '\x45', '$', 'G', '%', 'I', '&', 'K', '\'', 'M', '(', 'O',
+ ')', 'Q', '*', 'S', '+', 'U', ',', 'W', '-', 'Y', '.', '[', '/', ']',
+ '\x30', '_', '\x31', '\x61', '\x32', '\x63', '\x33', '\x65', '\x34', 'g',
+ '\x35', 'i', '\x36', 'k', '\x37', 'm', '\x38', 'o', '\x39', 'q', ':',
+ 's', ';', 'u', '<', 'w', '=', 'y', '>', '{', '?', '}', '@', '\x7F', '\x2',
+ '\x81', '\x2', '\x83', '\x2', '\x85', '\x2', '\x87', '\x2', '\x89', '\x2',
+ '\x8B', '\x2', '\x8D', '\x2', '\x8F', '\x2', '\x91', '\x2', '\x93', '\x2',
+ '\x95', '\x2', '\x97', '\x2', '\x99', '\x2', '\x9B', '\x2', '\x9D', '\x2',
+ '\x9F', '\x2', '\xA1', '\x2', '\xA3', '\x2', '\xA5', '\x2', '\xA7', '\x2',
+ '\xA9', '\x2', '\xAB', '\x2', '\xAD', '\x2', '\xAF', '\x2', '\xB1', '\x2',
+ '\xB3', '\x2', '\xB5', '\x41', '\xB7', '\x2', '\xB9', '\x2', '\xBB', '\x2',
+ '\xBD', '\x2', '\xBF', '\x2', '\xC1', '\x2', '\xC3', '\x2', '\xC5', '\x2',
+ '\xC7', '\x2', '\xC9', '\x2', '\xCB', '\x42', '\xCD', '\x43', '\xCF',
+ '\x2', '\xD1', '\x44', '\xD3', '\x2', '\xD5', '\x2', '\xD7', '\x2', '\xD9',
+ '\x2', '\xDB', '\x2', '\xDD', '\x2', '\xDF', '\x45', '\xE1', '\x46', '\xE3',
+ 'G', '\xE5', 'H', '\xE7', 'I', '\xE9', 'J', '\xEB', 'K', '\xED', 'L',
+ '\xEF', 'M', '\xF1', 'N', '\xF3', 'O', '\xF5', 'P', '\xF7', 'Q', '\xF9',
+ 'R', '\xFB', 'S', '\xFD', 'T', '\xFF', 'U', '\x101', 'V', '\x103', 'W',
+ '\x105', 'X', '\x107', 'Y', '\x109', 'Z', '\x10B', '[', '\x10D', '\\',
+ '\x10F', ']', '\x111', '^', '\x113', '_', '\x115', '`', '\x117', '\x61',
+ '\x119', '\x62', '\x11B', '\x63', '\x11D', '\x64', '\x11F', '\x65', '\x121',
+ '\x66', '\x123', 'g', '\x125', 'h', '\x127', 'i', '\x129', 'j', '\x12B',
+ 'k', '\x12D', 'l', '\x12F', 'm', '\x131', 'n', '\x133', 'o', '\x135',
+ 'p', '\x137', 'q', '\x139', 'r', '\x13B', 's', '\x13D', 't', '\x13F',
+ 'u', '\x141', '\x2', '\x143', '\x2', '\x145', 'v', '\x147', 'w', '\x149',
+ 'x', '\x3', '\x2', '\x18', '\x4', '\x2', 'N', 'N', 'n', 'n', '\x3', '\x2',
+ '\x33', ';', '\x4', '\x2', 'Z', 'Z', 'z', 'z', '\x5', '\x2', '\x32', ';',
+ '\x43', 'H', '\x63', 'h', '\x3', '\x2', '\x32', '\x39', '\x4', '\x2',
+ '\x44', '\x44', '\x64', '\x64', '\x3', '\x2', '\x32', '\x33', '\x4', '\x2',
+ 'G', 'G', 'g', 'g', '\x4', '\x2', '-', '-', '/', '/', '\x6', '\x2', '\x46',
+ '\x46', 'H', 'H', '\x66', '\x66', 'h', 'h', '\x4', '\x2', 'R', 'R', 'r',
+ 'r', '\x6', '\x2', '\f', '\f', '\xF', '\xF', ')', ')', '^', '^', '\x6',
+ '\x2', '\f', '\f', '\xF', '\xF', '$', '$', '^', '^', '\n', '\x2', '$',
+ '$', ')', ')', '^', '^', '\x64', '\x64', 'h', 'h', 'p', 'p', 't', 't',
+ 'v', 'v', '\x3', '\x2', '\x32', '\x35', '\x6', '\x2', '&', '&', '\x43',
+ '\\', '\x61', '\x61', '\x63', '|', '\x4', '\x2', '\x2', '\x81', '\xD802',
+ '\xDC01', '\x3', '\x2', '\xD802', '\xDC01', '\x3', '\x2', '\xDC02', '\xE001',
+ '\a', '\x2', '&', '&', '\x32', ';', '\x43', '\\', '\x61', '\x61', '\x63',
+ '|', '\x5', '\x2', '\v', '\f', '\xE', '\xF', '\"', '\"', '\x4', '\x2',
+ '\f', '\f', '\xF', '\xF', '\x2', '\x4B7', '\x2', '\x3', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\x5', '\x3', '\x2', '\x2', '\x2', '\x2', '\a', '\x3',
+ '\x2', '\x2', '\x2', '\x2', '\t', '\x3', '\x2', '\x2', '\x2', '\x2', '\v',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\r', '\x3', '\x2', '\x2', '\x2', '\x2',
+ '\xF', '\x3', '\x2', '\x2', '\x2', '\x2', '\x11', '\x3', '\x2', '\x2',
+ '\x2', '\x2', '\x13', '\x3', '\x2', '\x2', '\x2', '\x2', '\x15', '\x3',
+ '\x2', '\x2', '\x2', '\x2', '\x17', '\x3', '\x2', '\x2', '\x2', '\x2',
+ '\x19', '\x3', '\x2', '\x2', '\x2', '\x2', '\x1B', '\x3', '\x2', '\x2',
+ '\x2', '\x2', '\x1D', '\x3', '\x2', '\x2', '\x2', '\x2', '\x1F', '\x3',
+ '\x2', '\x2', '\x2', '\x2', '!', '\x3', '\x2', '\x2', '\x2', '\x2', '#',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '%', '\x3', '\x2', '\x2', '\x2', '\x2',
+ '\'', '\x3', '\x2', '\x2', '\x2', '\x2', ')', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '+', '\x3', '\x2', '\x2', '\x2', '\x2', '-', '\x3', '\x2', '\x2',
+ '\x2', '\x2', '/', '\x3', '\x2', '\x2', '\x2', '\x2', '\x31', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\x33', '\x3', '\x2', '\x2', '\x2', '\x2', '\x35',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\x37', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\x39', '\x3', '\x2', '\x2', '\x2', '\x2', ';', '\x3', '\x2', '\x2',
+ '\x2', '\x2', '=', '\x3', '\x2', '\x2', '\x2', '\x2', '?', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\x41', '\x3', '\x2', '\x2', '\x2', '\x2', '\x43',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\x45', '\x3', '\x2', '\x2', '\x2',
+ '\x2', 'G', '\x3', '\x2', '\x2', '\x2', '\x2', 'I', '\x3', '\x2', '\x2',
+ '\x2', '\x2', 'K', '\x3', '\x2', '\x2', '\x2', '\x2', 'M', '\x3', '\x2',
+ '\x2', '\x2', '\x2', 'O', '\x3', '\x2', '\x2', '\x2', '\x2', 'Q', '\x3',
+ '\x2', '\x2', '\x2', '\x2', 'S', '\x3', '\x2', '\x2', '\x2', '\x2', 'U',
+ '\x3', '\x2', '\x2', '\x2', '\x2', 'W', '\x3', '\x2', '\x2', '\x2', '\x2',
+ 'Y', '\x3', '\x2', '\x2', '\x2', '\x2', '[', '\x3', '\x2', '\x2', '\x2',
+ '\x2', ']', '\x3', '\x2', '\x2', '\x2', '\x2', '_', '\x3', '\x2', '\x2',
+ '\x2', '\x2', '\x61', '\x3', '\x2', '\x2', '\x2', '\x2', '\x63', '\x3',
+ '\x2', '\x2', '\x2', '\x2', '\x65', '\x3', '\x2', '\x2', '\x2', '\x2',
+ 'g', '\x3', '\x2', '\x2', '\x2', '\x2', 'i', '\x3', '\x2', '\x2', '\x2',
+ '\x2', 'k', '\x3', '\x2', '\x2', '\x2', '\x2', 'm', '\x3', '\x2', '\x2',
+ '\x2', '\x2', 'o', '\x3', '\x2', '\x2', '\x2', '\x2', 'q', '\x3', '\x2',
+ '\x2', '\x2', '\x2', 's', '\x3', '\x2', '\x2', '\x2', '\x2', 'u', '\x3',
+ '\x2', '\x2', '\x2', '\x2', 'w', '\x3', '\x2', '\x2', '\x2', '\x2', 'y',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '{', '\x3', '\x2', '\x2', '\x2', '\x2',
+ '}', '\x3', '\x2', '\x2', '\x2', '\x2', '\xB5', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\xCB', '\x3', '\x2', '\x2', '\x2', '\x2', '\xCD', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\xD1', '\x3', '\x2', '\x2', '\x2', '\x2', '\xDF',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\xE1', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\xE3', '\x3', '\x2', '\x2', '\x2', '\x2', '\xE5', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\xE7', '\x3', '\x2', '\x2', '\x2', '\x2', '\xE9',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\xEB', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\xED', '\x3', '\x2', '\x2', '\x2', '\x2', '\xEF', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\xF1', '\x3', '\x2', '\x2', '\x2', '\x2', '\xF3',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\xF5', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\xF7', '\x3', '\x2', '\x2', '\x2', '\x2', '\xF9', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\xFB', '\x3', '\x2', '\x2', '\x2', '\x2', '\xFD',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\xFF', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\x101', '\x3', '\x2', '\x2', '\x2', '\x2', '\x103', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\x105', '\x3', '\x2', '\x2', '\x2', '\x2', '\x107',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\x109', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\x10B', '\x3', '\x2', '\x2', '\x2', '\x2', '\x10D', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\x10F', '\x3', '\x2', '\x2', '\x2', '\x2', '\x111',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\x113', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\x115', '\x3', '\x2', '\x2', '\x2', '\x2', '\x117', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\x119', '\x3', '\x2', '\x2', '\x2', '\x2', '\x11B',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\x11D', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\x11F', '\x3', '\x2', '\x2', '\x2', '\x2', '\x121', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\x123', '\x3', '\x2', '\x2', '\x2', '\x2', '\x125',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\x127', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\x129', '\x3', '\x2', '\x2', '\x2', '\x2', '\x12B', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\x12D', '\x3', '\x2', '\x2', '\x2', '\x2', '\x12F',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\x131', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\x133', '\x3', '\x2', '\x2', '\x2', '\x2', '\x135', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\x137', '\x3', '\x2', '\x2', '\x2', '\x2', '\x139',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\x13B', '\x3', '\x2', '\x2', '\x2',
+ '\x2', '\x13D', '\x3', '\x2', '\x2', '\x2', '\x2', '\x13F', '\x3', '\x2',
+ '\x2', '\x2', '\x2', '\x145', '\x3', '\x2', '\x2', '\x2', '\x2', '\x147',
+ '\x3', '\x2', '\x2', '\x2', '\x2', '\x149', '\x3', '\x2', '\x2', '\x2',
+ '\x3', '\x14B', '\x3', '\x2', '\x2', '\x2', '\x5', '\x154', '\x3', '\x2',
+ '\x2', '\x2', '\a', '\x15B', '\x3', '\x2', '\x2', '\x2', '\t', '\x163',
+ '\x3', '\x2', '\x2', '\x2', '\v', '\x169', '\x3', '\x2', '\x2', '\x2',
+ '\r', '\x16E', '\x3', '\x2', '\x2', '\x2', '\xF', '\x173', '\x3', '\x2',
+ '\x2', '\x2', '\x11', '\x179', '\x3', '\x2', '\x2', '\x2', '\x13', '\x17E',
+ '\x3', '\x2', '\x2', '\x2', '\x15', '\x184', '\x3', '\x2', '\x2', '\x2',
+ '\x17', '\x18A', '\x3', '\x2', '\x2', '\x2', '\x19', '\x193', '\x3', '\x2',
+ '\x2', '\x2', '\x1B', '\x19B', '\x3', '\x2', '\x2', '\x2', '\x1D', '\x19E',
+ '\x3', '\x2', '\x2', '\x2', '\x1F', '\x1A5', '\x3', '\x2', '\x2', '\x2',
+ '!', '\x1AA', '\x3', '\x2', '\x2', '\x2', '#', '\x1AF', '\x3', '\x2',
+ '\x2', '\x2', '%', '\x1B7', '\x3', '\x2', '\x2', '\x2', '\'', '\x1BF',
+ '\x3', '\x2', '\x2', '\x2', ')', '\x1C5', '\x3', '\x2', '\x2', '\x2',
+ '+', '\x1CD', '\x3', '\x2', '\x2', '\x2', '-', '\x1D3', '\x3', '\x2',
+ '\x2', '\x2', '/', '\x1D7', '\x3', '\x2', '\x2', '\x2', '\x31', '\x1DA',
+ '\x3', '\x2', '\x2', '\x2', '\x33', '\x1DF', '\x3', '\x2', '\x2', '\x2',
+ '\x35', '\x1EA', '\x3', '\x2', '\x2', '\x2', '\x37', '\x1F1', '\x3', '\x2',
+ '\x2', '\x2', '\x39', '\x1FC', '\x3', '\x2', '\x2', '\x2', ';', '\x200',
+ '\x3', '\x2', '\x2', '\x2', '=', '\x20A', '\x3', '\x2', '\x2', '\x2',
+ '?', '\x20F', '\x3', '\x2', '\x2', '\x2', '\x41', '\x216', '\x3', '\x2',
+ '\x2', '\x2', '\x43', '\x21D', '\x3', '\x2', '\x2', '\x2', '\x45', '\x221',
+ '\x3', '\x2', '\x2', '\x2', 'G', '\x226', '\x3', '\x2', '\x2', '\x2',
+ 'I', '\x22C', '\x3', '\x2', '\x2', '\x2', 'K', '\x234', '\x3', '\x2',
+ '\x2', '\x2', 'M', '\x23C', '\x3', '\x2', '\x2', '\x2', 'O', '\x246',
+ '\x3', '\x2', '\x2', '\x2', 'Q', '\x24F', '\x3', '\x2', '\x2', '\x2',
+ 'S', '\x256', '\x3', '\x2', '\x2', '\x2', 'U', '\x25F', '\x3', '\x2',
+ '\x2', '\x2', 'W', '\x266', '\x3', '\x2', '\x2', '\x2', 'Y', '\x26C',
+ '\x3', '\x2', '\x2', '\x2', '[', '\x273', '\x3', '\x2', '\x2', '\x2',
+ ']', '\x27C', '\x3', '\x2', '\x2', '\x2', '_', '\x282', '\x3', '\x2',
+ '\x2', '\x2', '\x61', '\x289', '\x3', '\x2', '\x2', '\x2', '\x63', '\x296',
+ '\x3', '\x2', '\x2', '\x2', '\x65', '\x29B', '\x3', '\x2', '\x2', '\x2',
+ 'g', '\x2A1', '\x3', '\x2', '\x2', '\x2', 'i', '\x2A8', '\x3', '\x2',
+ '\x2', '\x2', 'k', '\x2AB', '\x3', '\x2', '\x2', '\x2', 'm', '\x2B5',
+ '\x3', '\x2', '\x2', '\x2', 'o', '\x2C0', '\x3', '\x2', '\x2', '\x2',
+ 'q', '\x2C4', '\x3', '\x2', '\x2', '\x2', 's', '\x2C9', '\x3', '\x2',
+ '\x2', '\x2', 'u', '\x2CE', '\x3', '\x2', '\x2', '\x2', 'w', '\x2D7',
+ '\x3', '\x2', '\x2', '\x2', 'y', '\x2DD', '\x3', '\x2', '\x2', '\x2',
+ '{', '\x2E2', '\x3', '\x2', '\x2', '\x2', '}', '\x2E8', '\x3', '\x2',
+ '\x2', '\x2', '\x7F', '\x2EA', '\x3', '\x2', '\x2', '\x2', '\x81', '\x2EE',
+ '\x3', '\x2', '\x2', '\x2', '\x83', '\x2F2', '\x3', '\x2', '\x2', '\x2',
+ '\x85', '\x2F6', '\x3', '\x2', '\x2', '\x2', '\x87', '\x2FA', '\x3', '\x2',
+ '\x2', '\x2', '\x89', '\x306', '\x3', '\x2', '\x2', '\x2', '\x8B', '\x308',
+ '\x3', '\x2', '\x2', '\x2', '\x8D', '\x311', '\x3', '\x2', '\x2', '\x2',
+ '\x8F', '\x313', '\x3', '\x2', '\x2', '\x2', '\x91', '\x316', '\x3', '\x2',
+ '\x2', '\x2', '\x93', '\x31C', '\x3', '\x2', '\x2', '\x2', '\x95', '\x31F',
+ '\x3', '\x2', '\x2', '\x2', '\x97', '\x323', '\x3', '\x2', '\x2', '\x2',
+ '\x99', '\x327', '\x3', '\x2', '\x2', '\x2', '\x9B', '\x32E', '\x3', '\x2',
+ '\x2', '\x2', '\x9D', '\x331', '\x3', '\x2', '\x2', '\x2', '\x9F', '\x337',
+ '\x3', '\x2', '\x2', '\x2', '\xA1', '\x339', '\x3', '\x2', '\x2', '\x2',
+ '\xA3', '\x33F', '\x3', '\x2', '\x2', '\x2', '\xA5', '\x346', '\x3', '\x2',
+ '\x2', '\x2', '\xA7', '\x349', '\x3', '\x2', '\x2', '\x2', '\xA9', '\x34F',
+ '\x3', '\x2', '\x2', '\x2', '\xAB', '\x351', '\x3', '\x2', '\x2', '\x2',
+ '\xAD', '\x355', '\x3', '\x2', '\x2', '\x2', '\xAF', '\x35C', '\x3', '\x2',
+ '\x2', '\x2', '\xB1', '\x35F', '\x3', '\x2', '\x2', '\x2', '\xB3', '\x365',
+ '\x3', '\x2', '\x2', '\x2', '\xB5', '\x369', '\x3', '\x2', '\x2', '\x2',
+ '\xB7', '\x386', '\x3', '\x2', '\x2', '\x2', '\xB9', '\x388', '\x3', '\x2',
+ '\x2', '\x2', '\xBB', '\x38B', '\x3', '\x2', '\x2', '\x2', '\xBD', '\x38E',
+ '\x3', '\x2', '\x2', '\x2', '\xBF', '\x392', '\x3', '\x2', '\x2', '\x2',
+ '\xC1', '\x394', '\x3', '\x2', '\x2', '\x2', '\xC3', '\x396', '\x3', '\x2',
+ '\x2', '\x2', '\xC5', '\x3A6', '\x3', '\x2', '\x2', '\x2', '\xC7', '\x3A8',
+ '\x3', '\x2', '\x2', '\x2', '\xC9', '\x3AB', '\x3', '\x2', '\x2', '\x2',
+ '\xCB', '\x3B6', '\x3', '\x2', '\x2', '\x2', '\xCD', '\x3C0', '\x3', '\x2',
+ '\x2', '\x2', '\xCF', '\x3C2', '\x3', '\x2', '\x2', '\x2', '\xD1', '\x3C4',
+ '\x3', '\x2', '\x2', '\x2', '\xD3', '\x3CB', '\x3', '\x2', '\x2', '\x2',
+ '\xD5', '\x3D1', '\x3', '\x2', '\x2', '\x2', '\xD7', '\x3D7', '\x3', '\x2',
+ '\x2', '\x2', '\xD9', '\x3E4', '\x3', '\x2', '\x2', '\x2', '\xDB', '\x3E6',
+ '\x3', '\x2', '\x2', '\x2', '\xDD', '\x3E8', '\x3', '\x2', '\x2', '\x2',
+ '\xDF', '\x3F3', '\x3', '\x2', '\x2', '\x2', '\xE1', '\x3F8', '\x3', '\x2',
+ '\x2', '\x2', '\xE3', '\x3FA', '\x3', '\x2', '\x2', '\x2', '\xE5', '\x3FC',
+ '\x3', '\x2', '\x2', '\x2', '\xE7', '\x3FE', '\x3', '\x2', '\x2', '\x2',
+ '\xE9', '\x400', '\x3', '\x2', '\x2', '\x2', '\xEB', '\x402', '\x3', '\x2',
+ '\x2', '\x2', '\xED', '\x404', '\x3', '\x2', '\x2', '\x2', '\xEF', '\x406',
+ '\x3', '\x2', '\x2', '\x2', '\xF1', '\x408', '\x3', '\x2', '\x2', '\x2',
+ '\xF3', '\x40A', '\x3', '\x2', '\x2', '\x2', '\xF5', '\x40E', '\x3', '\x2',
+ '\x2', '\x2', '\xF7', '\x410', '\x3', '\x2', '\x2', '\x2', '\xF9', '\x413',
+ '\x3', '\x2', '\x2', '\x2', '\xFB', '\x415', '\x3', '\x2', '\x2', '\x2',
+ '\xFD', '\x417', '\x3', '\x2', '\x2', '\x2', '\xFF', '\x419', '\x3', '\x2',
+ '\x2', '\x2', '\x101', '\x41B', '\x3', '\x2', '\x2', '\x2', '\x103', '\x41D',
+ '\x3', '\x2', '\x2', '\x2', '\x105', '\x41F', '\x3', '\x2', '\x2', '\x2',
+ '\x107', '\x421', '\x3', '\x2', '\x2', '\x2', '\x109', '\x424', '\x3',
+ '\x2', '\x2', '\x2', '\x10B', '\x427', '\x3', '\x2', '\x2', '\x2', '\x10D',
+ '\x42A', '\x3', '\x2', '\x2', '\x2', '\x10F', '\x42D', '\x3', '\x2', '\x2',
+ '\x2', '\x111', '\x430', '\x3', '\x2', '\x2', '\x2', '\x113', '\x433',
+ '\x3', '\x2', '\x2', '\x2', '\x115', '\x436', '\x3', '\x2', '\x2', '\x2',
+ '\x117', '\x439', '\x3', '\x2', '\x2', '\x2', '\x119', '\x43C', '\x3',
+ '\x2', '\x2', '\x2', '\x11B', '\x43E', '\x3', '\x2', '\x2', '\x2', '\x11D',
+ '\x440', '\x3', '\x2', '\x2', '\x2', '\x11F', '\x442', '\x3', '\x2', '\x2',
+ '\x2', '\x121', '\x444', '\x3', '\x2', '\x2', '\x2', '\x123', '\x446',
+ '\x3', '\x2', '\x2', '\x2', '\x125', '\x448', '\x3', '\x2', '\x2', '\x2',
+ '\x127', '\x44A', '\x3', '\x2', '\x2', '\x2', '\x129', '\x44C', '\x3',
+ '\x2', '\x2', '\x2', '\x12B', '\x44F', '\x3', '\x2', '\x2', '\x2', '\x12D',
+ '\x452', '\x3', '\x2', '\x2', '\x2', '\x12F', '\x455', '\x3', '\x2', '\x2',
+ '\x2', '\x131', '\x458', '\x3', '\x2', '\x2', '\x2', '\x133', '\x45B',
+ '\x3', '\x2', '\x2', '\x2', '\x135', '\x45E', '\x3', '\x2', '\x2', '\x2',
+ '\x137', '\x461', '\x3', '\x2', '\x2', '\x2', '\x139', '\x464', '\x3',
+ '\x2', '\x2', '\x2', '\x13B', '\x468', '\x3', '\x2', '\x2', '\x2', '\x13D',
+ '\x46C', '\x3', '\x2', '\x2', '\x2', '\x13F', '\x471', '\x3', '\x2', '\x2',
+ '\x2', '\x141', '\x47E', '\x3', '\x2', '\x2', '\x2', '\x143', '\x486',
+ '\x3', '\x2', '\x2', '\x2', '\x145', '\x489', '\x3', '\x2', '\x2', '\x2',
+ '\x147', '\x48F', '\x3', '\x2', '\x2', '\x2', '\x149', '\x49D', '\x3',
+ '\x2', '\x2', '\x2', '\x14B', '\x14C', '\a', '\x63', '\x2', '\x2', '\x14C',
+ '\x14D', '\a', '\x64', '\x2', '\x2', '\x14D', '\x14E', '\a', 'u', '\x2',
+ '\x2', '\x14E', '\x14F', '\a', 'v', '\x2', '\x2', '\x14F', '\x150', '\a',
+ 't', '\x2', '\x2', '\x150', '\x151', '\a', '\x63', '\x2', '\x2', '\x151',
+ '\x152', '\a', '\x65', '\x2', '\x2', '\x152', '\x153', '\a', 'v', '\x2',
+ '\x2', '\x153', '\x4', '\x3', '\x2', '\x2', '\x2', '\x154', '\x155', '\a',
+ '\x63', '\x2', '\x2', '\x155', '\x156', '\a', 'u', '\x2', '\x2', '\x156',
+ '\x157', '\a', 'u', '\x2', '\x2', '\x157', '\x158', '\a', 'g', '\x2',
+ '\x2', '\x158', '\x159', '\a', 't', '\x2', '\x2', '\x159', '\x15A', '\a',
+ 'v', '\x2', '\x2', '\x15A', '\x6', '\x3', '\x2', '\x2', '\x2', '\x15B',
+ '\x15C', '\a', '\x64', '\x2', '\x2', '\x15C', '\x15D', '\a', 'q', '\x2',
+ '\x2', '\x15D', '\x15E', '\a', 'q', '\x2', '\x2', '\x15E', '\x15F', '\a',
+ 'n', '\x2', '\x2', '\x15F', '\x160', '\a', 'g', '\x2', '\x2', '\x160',
+ '\x161', '\a', '\x63', '\x2', '\x2', '\x161', '\x162', '\a', 'p', '\x2',
+ '\x2', '\x162', '\b', '\x3', '\x2', '\x2', '\x2', '\x163', '\x164', '\a',
+ '\x64', '\x2', '\x2', '\x164', '\x165', '\a', 't', '\x2', '\x2', '\x165',
+ '\x166', '\a', 'g', '\x2', '\x2', '\x166', '\x167', '\a', '\x63', '\x2',
+ '\x2', '\x167', '\x168', '\a', 'm', '\x2', '\x2', '\x168', '\n', '\x3',
+ '\x2', '\x2', '\x2', '\x169', '\x16A', '\a', '\x64', '\x2', '\x2', '\x16A',
+ '\x16B', '\a', '{', '\x2', '\x2', '\x16B', '\x16C', '\a', 'v', '\x2',
+ '\x2', '\x16C', '\x16D', '\a', 'g', '\x2', '\x2', '\x16D', '\f', '\x3',
+ '\x2', '\x2', '\x2', '\x16E', '\x16F', '\a', '\x65', '\x2', '\x2', '\x16F',
+ '\x170', '\a', '\x63', '\x2', '\x2', '\x170', '\x171', '\a', 'u', '\x2',
+ '\x2', '\x171', '\x172', '\a', 'g', '\x2', '\x2', '\x172', '\xE', '\x3',
+ '\x2', '\x2', '\x2', '\x173', '\x174', '\a', '\x65', '\x2', '\x2', '\x174',
+ '\x175', '\a', '\x63', '\x2', '\x2', '\x175', '\x176', '\a', 'v', '\x2',
+ '\x2', '\x176', '\x177', '\a', '\x65', '\x2', '\x2', '\x177', '\x178',
+ '\a', 'j', '\x2', '\x2', '\x178', '\x10', '\x3', '\x2', '\x2', '\x2',
+ '\x179', '\x17A', '\a', '\x65', '\x2', '\x2', '\x17A', '\x17B', '\a',
+ 'j', '\x2', '\x2', '\x17B', '\x17C', '\a', '\x63', '\x2', '\x2', '\x17C',
+ '\x17D', '\a', 't', '\x2', '\x2', '\x17D', '\x12', '\x3', '\x2', '\x2',
+ '\x2', '\x17E', '\x17F', '\a', '\x65', '\x2', '\x2', '\x17F', '\x180',
+ '\a', 'n', '\x2', '\x2', '\x180', '\x181', '\a', '\x63', '\x2', '\x2',
+ '\x181', '\x182', '\a', 'u', '\x2', '\x2', '\x182', '\x183', '\a', 'u',
+ '\x2', '\x2', '\x183', '\x14', '\x3', '\x2', '\x2', '\x2', '\x184', '\x185',
+ '\a', '\x65', '\x2', '\x2', '\x185', '\x186', '\a', 'q', '\x2', '\x2',
+ '\x186', '\x187', '\a', 'p', '\x2', '\x2', '\x187', '\x188', '\a', 'u',
+ '\x2', '\x2', '\x188', '\x189', '\a', 'v', '\x2', '\x2', '\x189', '\x16',
+ '\x3', '\x2', '\x2', '\x2', '\x18A', '\x18B', '\a', '\x65', '\x2', '\x2',
+ '\x18B', '\x18C', '\a', 'q', '\x2', '\x2', '\x18C', '\x18D', '\a', 'p',
+ '\x2', '\x2', '\x18D', '\x18E', '\a', 'v', '\x2', '\x2', '\x18E', '\x18F',
+ '\a', 'k', '\x2', '\x2', '\x18F', '\x190', '\a', 'p', '\x2', '\x2', '\x190',
+ '\x191', '\a', 'w', '\x2', '\x2', '\x191', '\x192', '\a', 'g', '\x2',
+ '\x2', '\x192', '\x18', '\x3', '\x2', '\x2', '\x2', '\x193', '\x194',
+ '\a', '\x66', '\x2', '\x2', '\x194', '\x195', '\a', 'g', '\x2', '\x2',
+ '\x195', '\x196', '\a', 'h', '\x2', '\x2', '\x196', '\x197', '\a', '\x63',
+ '\x2', '\x2', '\x197', '\x198', '\a', 'w', '\x2', '\x2', '\x198', '\x199',
+ '\a', 'n', '\x2', '\x2', '\x199', '\x19A', '\a', 'v', '\x2', '\x2', '\x19A',
+ '\x1A', '\x3', '\x2', '\x2', '\x2', '\x19B', '\x19C', '\a', '\x66', '\x2',
+ '\x2', '\x19C', '\x19D', '\a', 'q', '\x2', '\x2', '\x19D', '\x1C', '\x3',
+ '\x2', '\x2', '\x2', '\x19E', '\x19F', '\a', '\x66', '\x2', '\x2', '\x19F',
+ '\x1A0', '\a', 'q', '\x2', '\x2', '\x1A0', '\x1A1', '\a', 'w', '\x2',
+ '\x2', '\x1A1', '\x1A2', '\a', '\x64', '\x2', '\x2', '\x1A2', '\x1A3',
+ '\a', 'n', '\x2', '\x2', '\x1A3', '\x1A4', '\a', 'g', '\x2', '\x2', '\x1A4',
+ '\x1E', '\x3', '\x2', '\x2', '\x2', '\x1A5', '\x1A6', '\a', 'g', '\x2',
+ '\x2', '\x1A6', '\x1A7', '\a', 'n', '\x2', '\x2', '\x1A7', '\x1A8', '\a',
+ 'u', '\x2', '\x2', '\x1A8', '\x1A9', '\a', 'g', '\x2', '\x2', '\x1A9',
+ ' ', '\x3', '\x2', '\x2', '\x2', '\x1AA', '\x1AB', '\a', 'g', '\x2', '\x2',
+ '\x1AB', '\x1AC', '\a', 'p', '\x2', '\x2', '\x1AC', '\x1AD', '\a', 'w',
+ '\x2', '\x2', '\x1AD', '\x1AE', '\a', 'o', '\x2', '\x2', '\x1AE', '\"',
+ '\x3', '\x2', '\x2', '\x2', '\x1AF', '\x1B0', '\a', 'g', '\x2', '\x2',
+ '\x1B0', '\x1B1', '\a', 'z', '\x2', '\x2', '\x1B1', '\x1B2', '\a', 'r',
+ '\x2', '\x2', '\x1B2', '\x1B3', '\a', 'q', '\x2', '\x2', '\x1B3', '\x1B4',
+ '\a', 't', '\x2', '\x2', '\x1B4', '\x1B5', '\a', 'v', '\x2', '\x2', '\x1B5',
+ '\x1B6', '\a', 'u', '\x2', '\x2', '\x1B6', '$', '\x3', '\x2', '\x2', '\x2',
+ '\x1B7', '\x1B8', '\a', 'g', '\x2', '\x2', '\x1B8', '\x1B9', '\a', 'z',
+ '\x2', '\x2', '\x1B9', '\x1BA', '\a', 'v', '\x2', '\x2', '\x1BA', '\x1BB',
+ '\a', 'g', '\x2', '\x2', '\x1BB', '\x1BC', '\a', 'p', '\x2', '\x2', '\x1BC',
+ '\x1BD', '\a', '\x66', '\x2', '\x2', '\x1BD', '\x1BE', '\a', 'u', '\x2',
+ '\x2', '\x1BE', '&', '\x3', '\x2', '\x2', '\x2', '\x1BF', '\x1C0', '\a',
+ 'h', '\x2', '\x2', '\x1C0', '\x1C1', '\a', 'k', '\x2', '\x2', '\x1C1',
+ '\x1C2', '\a', 'p', '\x2', '\x2', '\x1C2', '\x1C3', '\a', '\x63', '\x2',
+ '\x2', '\x1C3', '\x1C4', '\a', 'n', '\x2', '\x2', '\x1C4', '(', '\x3',
+ '\x2', '\x2', '\x2', '\x1C5', '\x1C6', '\a', 'h', '\x2', '\x2', '\x1C6',
+ '\x1C7', '\a', 'k', '\x2', '\x2', '\x1C7', '\x1C8', '\a', 'p', '\x2',
+ '\x2', '\x1C8', '\x1C9', '\a', '\x63', '\x2', '\x2', '\x1C9', '\x1CA',
+ '\a', 'n', '\x2', '\x2', '\x1CA', '\x1CB', '\a', 'n', '\x2', '\x2', '\x1CB',
+ '\x1CC', '\a', '{', '\x2', '\x2', '\x1CC', '*', '\x3', '\x2', '\x2', '\x2',
+ '\x1CD', '\x1CE', '\a', 'h', '\x2', '\x2', '\x1CE', '\x1CF', '\a', 'n',
+ '\x2', '\x2', '\x1CF', '\x1D0', '\a', 'q', '\x2', '\x2', '\x1D0', '\x1D1',
+ '\a', '\x63', '\x2', '\x2', '\x1D1', '\x1D2', '\a', 'v', '\x2', '\x2',
+ '\x1D2', ',', '\x3', '\x2', '\x2', '\x2', '\x1D3', '\x1D4', '\a', 'h',
+ '\x2', '\x2', '\x1D4', '\x1D5', '\a', 'q', '\x2', '\x2', '\x1D5', '\x1D6',
+ '\a', 't', '\x2', '\x2', '\x1D6', '.', '\x3', '\x2', '\x2', '\x2', '\x1D7',
+ '\x1D8', '\a', 'k', '\x2', '\x2', '\x1D8', '\x1D9', '\a', 'h', '\x2',
+ '\x2', '\x1D9', '\x30', '\x3', '\x2', '\x2', '\x2', '\x1DA', '\x1DB',
+ '\a', 'i', '\x2', '\x2', '\x1DB', '\x1DC', '\a', 'q', '\x2', '\x2', '\x1DC',
+ '\x1DD', '\a', 'v', '\x2', '\x2', '\x1DD', '\x1DE', '\a', 'q', '\x2',
+ '\x2', '\x1DE', '\x32', '\x3', '\x2', '\x2', '\x2', '\x1DF', '\x1E0',
+ '\a', 'k', '\x2', '\x2', '\x1E0', '\x1E1', '\a', 'o', '\x2', '\x2', '\x1E1',
+ '\x1E2', '\a', 'r', '\x2', '\x2', '\x1E2', '\x1E3', '\a', 'n', '\x2',
+ '\x2', '\x1E3', '\x1E4', '\a', 'g', '\x2', '\x2', '\x1E4', '\x1E5', '\a',
+ 'o', '\x2', '\x2', '\x1E5', '\x1E6', '\a', 'g', '\x2', '\x2', '\x1E6',
+ '\x1E7', '\a', 'p', '\x2', '\x2', '\x1E7', '\x1E8', '\a', 'v', '\x2',
+ '\x2', '\x1E8', '\x1E9', '\a', 'u', '\x2', '\x2', '\x1E9', '\x34', '\x3',
+ '\x2', '\x2', '\x2', '\x1EA', '\x1EB', '\a', 'k', '\x2', '\x2', '\x1EB',
+ '\x1EC', '\a', 'o', '\x2', '\x2', '\x1EC', '\x1ED', '\a', 'r', '\x2',
+ '\x2', '\x1ED', '\x1EE', '\a', 'q', '\x2', '\x2', '\x1EE', '\x1EF', '\a',
+ 't', '\x2', '\x2', '\x1EF', '\x1F0', '\a', 'v', '\x2', '\x2', '\x1F0',
+ '\x36', '\x3', '\x2', '\x2', '\x2', '\x1F1', '\x1F2', '\a', 'k', '\x2',
+ '\x2', '\x1F2', '\x1F3', '\a', 'p', '\x2', '\x2', '\x1F3', '\x1F4', '\a',
+ 'u', '\x2', '\x2', '\x1F4', '\x1F5', '\a', 'v', '\x2', '\x2', '\x1F5',
+ '\x1F6', '\a', '\x63', '\x2', '\x2', '\x1F6', '\x1F7', '\a', 'p', '\x2',
+ '\x2', '\x1F7', '\x1F8', '\a', '\x65', '\x2', '\x2', '\x1F8', '\x1F9',
+ '\a', 'g', '\x2', '\x2', '\x1F9', '\x1FA', '\a', 'q', '\x2', '\x2', '\x1FA',
+ '\x1FB', '\a', 'h', '\x2', '\x2', '\x1FB', '\x38', '\x3', '\x2', '\x2',
+ '\x2', '\x1FC', '\x1FD', '\a', 'k', '\x2', '\x2', '\x1FD', '\x1FE', '\a',
+ 'p', '\x2', '\x2', '\x1FE', '\x1FF', '\a', 'v', '\x2', '\x2', '\x1FF',
+ ':', '\x3', '\x2', '\x2', '\x2', '\x200', '\x201', '\a', 'k', '\x2', '\x2',
+ '\x201', '\x202', '\a', 'p', '\x2', '\x2', '\x202', '\x203', '\a', 'v',
+ '\x2', '\x2', '\x203', '\x204', '\a', 'g', '\x2', '\x2', '\x204', '\x205',
+ '\a', 't', '\x2', '\x2', '\x205', '\x206', '\a', 'h', '\x2', '\x2', '\x206',
+ '\x207', '\a', '\x63', '\x2', '\x2', '\x207', '\x208', '\a', '\x65', '\x2',
+ '\x2', '\x208', '\x209', '\a', 'g', '\x2', '\x2', '\x209', '<', '\x3',
+ '\x2', '\x2', '\x2', '\x20A', '\x20B', '\a', 'n', '\x2', '\x2', '\x20B',
+ '\x20C', '\a', 'q', '\x2', '\x2', '\x20C', '\x20D', '\a', 'p', '\x2',
+ '\x2', '\x20D', '\x20E', '\a', 'i', '\x2', '\x2', '\x20E', '>', '\x3',
+ '\x2', '\x2', '\x2', '\x20F', '\x210', '\a', 'o', '\x2', '\x2', '\x210',
+ '\x211', '\a', 'q', '\x2', '\x2', '\x211', '\x212', '\a', '\x66', '\x2',
+ '\x2', '\x212', '\x213', '\a', 'w', '\x2', '\x2', '\x213', '\x214', '\a',
+ 'n', '\x2', '\x2', '\x214', '\x215', '\a', 'g', '\x2', '\x2', '\x215',
+ '@', '\x3', '\x2', '\x2', '\x2', '\x216', '\x217', '\a', 'p', '\x2', '\x2',
+ '\x217', '\x218', '\a', '\x63', '\x2', '\x2', '\x218', '\x219', '\a',
+ 'v', '\x2', '\x2', '\x219', '\x21A', '\a', 'k', '\x2', '\x2', '\x21A',
+ '\x21B', '\a', 'x', '\x2', '\x2', '\x21B', '\x21C', '\a', 'g', '\x2',
+ '\x2', '\x21C', '\x42', '\x3', '\x2', '\x2', '\x2', '\x21D', '\x21E',
+ '\a', 'p', '\x2', '\x2', '\x21E', '\x21F', '\a', 'g', '\x2', '\x2', '\x21F',
+ '\x220', '\a', 'y', '\x2', '\x2', '\x220', '\x44', '\x3', '\x2', '\x2',
+ '\x2', '\x221', '\x222', '\a', 'q', '\x2', '\x2', '\x222', '\x223', '\a',
+ 'r', '\x2', '\x2', '\x223', '\x224', '\a', 'g', '\x2', '\x2', '\x224',
+ '\x225', '\a', 'p', '\x2', '\x2', '\x225', '\x46', '\x3', '\x2', '\x2',
+ '\x2', '\x226', '\x227', '\a', 'q', '\x2', '\x2', '\x227', '\x228', '\a',
+ 'r', '\x2', '\x2', '\x228', '\x229', '\a', 'g', '\x2', '\x2', '\x229',
+ '\x22A', '\a', 'p', '\x2', '\x2', '\x22A', '\x22B', '\a', 'u', '\x2',
+ '\x2', '\x22B', 'H', '\x3', '\x2', '\x2', '\x2', '\x22C', '\x22D', '\a',
+ 'r', '\x2', '\x2', '\x22D', '\x22E', '\a', '\x63', '\x2', '\x2', '\x22E',
+ '\x22F', '\a', '\x65', '\x2', '\x2', '\x22F', '\x230', '\a', 'm', '\x2',
+ '\x2', '\x230', '\x231', '\a', '\x63', '\x2', '\x2', '\x231', '\x232',
+ '\a', 'i', '\x2', '\x2', '\x232', '\x233', '\a', 'g', '\x2', '\x2', '\x233',
+ 'J', '\x3', '\x2', '\x2', '\x2', '\x234', '\x235', '\a', 'r', '\x2', '\x2',
+ '\x235', '\x236', '\a', 't', '\x2', '\x2', '\x236', '\x237', '\a', 'k',
+ '\x2', '\x2', '\x237', '\x238', '\a', 'x', '\x2', '\x2', '\x238', '\x239',
+ '\a', '\x63', '\x2', '\x2', '\x239', '\x23A', '\a', 'v', '\x2', '\x2',
+ '\x23A', '\x23B', '\a', 'g', '\x2', '\x2', '\x23B', 'L', '\x3', '\x2',
+ '\x2', '\x2', '\x23C', '\x23D', '\a', 'r', '\x2', '\x2', '\x23D', '\x23E',
+ '\a', 't', '\x2', '\x2', '\x23E', '\x23F', '\a', 'q', '\x2', '\x2', '\x23F',
+ '\x240', '\a', 'v', '\x2', '\x2', '\x240', '\x241', '\a', 'g', '\x2',
+ '\x2', '\x241', '\x242', '\a', '\x65', '\x2', '\x2', '\x242', '\x243',
+ '\a', 'v', '\x2', '\x2', '\x243', '\x244', '\a', 'g', '\x2', '\x2', '\x244',
+ '\x245', '\a', '\x66', '\x2', '\x2', '\x245', 'N', '\x3', '\x2', '\x2',
+ '\x2', '\x246', '\x247', '\a', 'r', '\x2', '\x2', '\x247', '\x248', '\a',
+ 't', '\x2', '\x2', '\x248', '\x249', '\a', 'q', '\x2', '\x2', '\x249',
+ '\x24A', '\a', 'x', '\x2', '\x2', '\x24A', '\x24B', '\a', 'k', '\x2',
+ '\x2', '\x24B', '\x24C', '\a', '\x66', '\x2', '\x2', '\x24C', '\x24D',
+ '\a', 'g', '\x2', '\x2', '\x24D', '\x24E', '\a', 'u', '\x2', '\x2', '\x24E',
+ 'P', '\x3', '\x2', '\x2', '\x2', '\x24F', '\x250', '\a', 'r', '\x2', '\x2',
+ '\x250', '\x251', '\a', 'w', '\x2', '\x2', '\x251', '\x252', '\a', '\x64',
+ '\x2', '\x2', '\x252', '\x253', '\a', 'n', '\x2', '\x2', '\x253', '\x254',
+ '\a', 'k', '\x2', '\x2', '\x254', '\x255', '\a', '\x65', '\x2', '\x2',
+ '\x255', 'R', '\x3', '\x2', '\x2', '\x2', '\x256', '\x257', '\a', 't',
+ '\x2', '\x2', '\x257', '\x258', '\a', 'g', '\x2', '\x2', '\x258', '\x259',
+ '\a', 's', '\x2', '\x2', '\x259', '\x25A', '\a', 'w', '\x2', '\x2', '\x25A',
+ '\x25B', '\a', 'k', '\x2', '\x2', '\x25B', '\x25C', '\a', 't', '\x2',
+ '\x2', '\x25C', '\x25D', '\a', 'g', '\x2', '\x2', '\x25D', '\x25E', '\a',
+ 'u', '\x2', '\x2', '\x25E', 'T', '\x3', '\x2', '\x2', '\x2', '\x25F',
+ '\x260', '\a', 't', '\x2', '\x2', '\x260', '\x261', '\a', 'g', '\x2',
+ '\x2', '\x261', '\x262', '\a', 'v', '\x2', '\x2', '\x262', '\x263', '\a',
+ 'w', '\x2', '\x2', '\x263', '\x264', '\a', 't', '\x2', '\x2', '\x264',
+ '\x265', '\a', 'p', '\x2', '\x2', '\x265', 'V', '\x3', '\x2', '\x2', '\x2',
+ '\x266', '\x267', '\a', 'u', '\x2', '\x2', '\x267', '\x268', '\a', 'j',
+ '\x2', '\x2', '\x268', '\x269', '\a', 'q', '\x2', '\x2', '\x269', '\x26A',
+ '\a', 't', '\x2', '\x2', '\x26A', '\x26B', '\a', 'v', '\x2', '\x2', '\x26B',
+ 'X', '\x3', '\x2', '\x2', '\x2', '\x26C', '\x26D', '\a', 'u', '\x2', '\x2',
+ '\x26D', '\x26E', '\a', 'v', '\x2', '\x2', '\x26E', '\x26F', '\a', '\x63',
+ '\x2', '\x2', '\x26F', '\x270', '\a', 'v', '\x2', '\x2', '\x270', '\x271',
+ '\a', 'k', '\x2', '\x2', '\x271', '\x272', '\a', '\x65', '\x2', '\x2',
+ '\x272', 'Z', '\x3', '\x2', '\x2', '\x2', '\x273', '\x274', '\a', 'u',
+ '\x2', '\x2', '\x274', '\x275', '\a', 'v', '\x2', '\x2', '\x275', '\x276',
+ '\a', 't', '\x2', '\x2', '\x276', '\x277', '\a', 'k', '\x2', '\x2', '\x277',
+ '\x278', '\a', '\x65', '\x2', '\x2', '\x278', '\x279', '\a', 'v', '\x2',
+ '\x2', '\x279', '\x27A', '\a', 'h', '\x2', '\x2', '\x27A', '\x27B', '\a',
+ 'r', '\x2', '\x2', '\x27B', '\\', '\x3', '\x2', '\x2', '\x2', '\x27C',
+ '\x27D', '\a', 'u', '\x2', '\x2', '\x27D', '\x27E', '\a', 'w', '\x2',
+ '\x2', '\x27E', '\x27F', '\a', 'r', '\x2', '\x2', '\x27F', '\x280', '\a',
+ 'g', '\x2', '\x2', '\x280', '\x281', '\a', 't', '\x2', '\x2', '\x281',
+ '^', '\x3', '\x2', '\x2', '\x2', '\x282', '\x283', '\a', 'u', '\x2', '\x2',
+ '\x283', '\x284', '\a', 'y', '\x2', '\x2', '\x284', '\x285', '\a', 'k',
+ '\x2', '\x2', '\x285', '\x286', '\a', 'v', '\x2', '\x2', '\x286', '\x287',
+ '\a', '\x65', '\x2', '\x2', '\x287', '\x288', '\a', 'j', '\x2', '\x2',
+ '\x288', '`', '\x3', '\x2', '\x2', '\x2', '\x289', '\x28A', '\a', 'u',
+ '\x2', '\x2', '\x28A', '\x28B', '\a', '{', '\x2', '\x2', '\x28B', '\x28C',
+ '\a', 'p', '\x2', '\x2', '\x28C', '\x28D', '\a', '\x65', '\x2', '\x2',
+ '\x28D', '\x28E', '\a', 'j', '\x2', '\x2', '\x28E', '\x28F', '\a', 't',
+ '\x2', '\x2', '\x28F', '\x290', '\a', 'q', '\x2', '\x2', '\x290', '\x291',
+ '\a', 'p', '\x2', '\x2', '\x291', '\x292', '\a', 'k', '\x2', '\x2', '\x292',
+ '\x293', '\a', '|', '\x2', '\x2', '\x293', '\x294', '\a', 'g', '\x2',
+ '\x2', '\x294', '\x295', '\a', '\x66', '\x2', '\x2', '\x295', '\x62',
+ '\x3', '\x2', '\x2', '\x2', '\x296', '\x297', '\a', 'v', '\x2', '\x2',
+ '\x297', '\x298', '\a', 'j', '\x2', '\x2', '\x298', '\x299', '\a', 'k',
+ '\x2', '\x2', '\x299', '\x29A', '\a', 'u', '\x2', '\x2', '\x29A', '\x64',
+ '\x3', '\x2', '\x2', '\x2', '\x29B', '\x29C', '\a', 'v', '\x2', '\x2',
+ '\x29C', '\x29D', '\a', 'j', '\x2', '\x2', '\x29D', '\x29E', '\a', 't',
+ '\x2', '\x2', '\x29E', '\x29F', '\a', 'q', '\x2', '\x2', '\x29F', '\x2A0',
+ '\a', 'y', '\x2', '\x2', '\x2A0', '\x66', '\x3', '\x2', '\x2', '\x2',
+ '\x2A1', '\x2A2', '\a', 'v', '\x2', '\x2', '\x2A2', '\x2A3', '\a', 'j',
+ '\x2', '\x2', '\x2A3', '\x2A4', '\a', 't', '\x2', '\x2', '\x2A4', '\x2A5',
+ '\a', 'q', '\x2', '\x2', '\x2A5', '\x2A6', '\a', 'y', '\x2', '\x2', '\x2A6',
+ '\x2A7', '\a', 'u', '\x2', '\x2', '\x2A7', 'h', '\x3', '\x2', '\x2', '\x2',
+ '\x2A8', '\x2A9', '\a', 'v', '\x2', '\x2', '\x2A9', '\x2AA', '\a', 'q',
+ '\x2', '\x2', '\x2AA', 'j', '\x3', '\x2', '\x2', '\x2', '\x2AB', '\x2AC',
+ '\a', 'v', '\x2', '\x2', '\x2AC', '\x2AD', '\a', 't', '\x2', '\x2', '\x2AD',
+ '\x2AE', '\a', '\x63', '\x2', '\x2', '\x2AE', '\x2AF', '\a', 'p', '\x2',
+ '\x2', '\x2AF', '\x2B0', '\a', 'u', '\x2', '\x2', '\x2B0', '\x2B1', '\a',
+ 'k', '\x2', '\x2', '\x2B1', '\x2B2', '\a', 'g', '\x2', '\x2', '\x2B2',
+ '\x2B3', '\a', 'p', '\x2', '\x2', '\x2B3', '\x2B4', '\a', 'v', '\x2',
+ '\x2', '\x2B4', 'l', '\x3', '\x2', '\x2', '\x2', '\x2B5', '\x2B6', '\a',
+ 'v', '\x2', '\x2', '\x2B6', '\x2B7', '\a', 't', '\x2', '\x2', '\x2B7',
+ '\x2B8', '\a', '\x63', '\x2', '\x2', '\x2B8', '\x2B9', '\a', 'p', '\x2',
+ '\x2', '\x2B9', '\x2BA', '\a', 'u', '\x2', '\x2', '\x2BA', '\x2BB', '\a',
+ 'k', '\x2', '\x2', '\x2BB', '\x2BC', '\a', 'v', '\x2', '\x2', '\x2BC',
+ '\x2BD', '\a', 'k', '\x2', '\x2', '\x2BD', '\x2BE', '\a', 'x', '\x2',
+ '\x2', '\x2BE', '\x2BF', '\a', 'g', '\x2', '\x2', '\x2BF', 'n', '\x3',
+ '\x2', '\x2', '\x2', '\x2C0', '\x2C1', '\a', 'v', '\x2', '\x2', '\x2C1',
+ '\x2C2', '\a', 't', '\x2', '\x2', '\x2C2', '\x2C3', '\a', '{', '\x2',
+ '\x2', '\x2C3', 'p', '\x3', '\x2', '\x2', '\x2', '\x2C4', '\x2C5', '\a',
+ 'w', '\x2', '\x2', '\x2C5', '\x2C6', '\a', 'u', '\x2', '\x2', '\x2C6',
+ '\x2C7', '\a', 'g', '\x2', '\x2', '\x2C7', '\x2C8', '\a', 'u', '\x2',
+ '\x2', '\x2C8', 'r', '\x3', '\x2', '\x2', '\x2', '\x2C9', '\x2CA', '\a',
+ 'x', '\x2', '\x2', '\x2CA', '\x2CB', '\a', 'q', '\x2', '\x2', '\x2CB',
+ '\x2CC', '\a', 'k', '\x2', '\x2', '\x2CC', '\x2CD', '\a', '\x66', '\x2',
+ '\x2', '\x2CD', 't', '\x3', '\x2', '\x2', '\x2', '\x2CE', '\x2CF', '\a',
+ 'x', '\x2', '\x2', '\x2CF', '\x2D0', '\a', 'q', '\x2', '\x2', '\x2D0',
+ '\x2D1', '\a', 'n', '\x2', '\x2', '\x2D1', '\x2D2', '\a', '\x63', '\x2',
+ '\x2', '\x2D2', '\x2D3', '\a', 'v', '\x2', '\x2', '\x2D3', '\x2D4', '\a',
+ 'k', '\x2', '\x2', '\x2D4', '\x2D5', '\a', 'n', '\x2', '\x2', '\x2D5',
+ '\x2D6', '\a', 'g', '\x2', '\x2', '\x2D6', 'v', '\x3', '\x2', '\x2', '\x2',
+ '\x2D7', '\x2D8', '\a', 'y', '\x2', '\x2', '\x2D8', '\x2D9', '\a', 'j',
+ '\x2', '\x2', '\x2D9', '\x2DA', '\a', 'k', '\x2', '\x2', '\x2DA', '\x2DB',
+ '\a', 'n', '\x2', '\x2', '\x2DB', '\x2DC', '\a', 'g', '\x2', '\x2', '\x2DC',
+ 'x', '\x3', '\x2', '\x2', '\x2', '\x2DD', '\x2DE', '\a', 'y', '\x2', '\x2',
+ '\x2DE', '\x2DF', '\a', 'k', '\x2', '\x2', '\x2DF', '\x2E0', '\a', 'v',
+ '\x2', '\x2', '\x2E0', '\x2E1', '\a', 'j', '\x2', '\x2', '\x2E1', 'z',
+ '\x3', '\x2', '\x2', '\x2', '\x2E2', '\x2E3', '\a', '\x61', '\x2', '\x2',
+ '\x2E3', '|', '\x3', '\x2', '\x2', '\x2', '\x2E4', '\x2E9', '\x5', '\x7F',
+ '@', '\x2', '\x2E5', '\x2E9', '\x5', '\x81', '\x41', '\x2', '\x2E6', '\x2E9',
+ '\x5', '\x83', '\x42', '\x2', '\x2E7', '\x2E9', '\x5', '\x85', '\x43',
+ '\x2', '\x2E8', '\x2E4', '\x3', '\x2', '\x2', '\x2', '\x2E8', '\x2E5',
+ '\x3', '\x2', '\x2', '\x2', '\x2E8', '\x2E6', '\x3', '\x2', '\x2', '\x2',
+ '\x2E8', '\x2E7', '\x3', '\x2', '\x2', '\x2', '\x2E9', '~', '\x3', '\x2',
+ '\x2', '\x2', '\x2EA', '\x2EC', '\x5', '\x89', '\x45', '\x2', '\x2EB',
+ '\x2ED', '\x5', '\x87', '\x44', '\x2', '\x2EC', '\x2EB', '\x3', '\x2',
+ '\x2', '\x2', '\x2EC', '\x2ED', '\x3', '\x2', '\x2', '\x2', '\x2ED', '\x80',
+ '\x3', '\x2', '\x2', '\x2', '\x2EE', '\x2F0', '\x5', '\x97', 'L', '\x2',
+ '\x2EF', '\x2F1', '\x5', '\x87', '\x44', '\x2', '\x2F0', '\x2EF', '\x3',
+ '\x2', '\x2', '\x2', '\x2F0', '\x2F1', '\x3', '\x2', '\x2', '\x2', '\x2F1',
+ '\x82', '\x3', '\x2', '\x2', '\x2', '\x2F2', '\x2F4', '\x5', '\xA1', 'Q',
+ '\x2', '\x2F3', '\x2F5', '\x5', '\x87', '\x44', '\x2', '\x2F4', '\x2F3',
+ '\x3', '\x2', '\x2', '\x2', '\x2F4', '\x2F5', '\x3', '\x2', '\x2', '\x2',
+ '\x2F5', '\x84', '\x3', '\x2', '\x2', '\x2', '\x2F6', '\x2F8', '\x5',
+ '\xAB', 'V', '\x2', '\x2F7', '\x2F9', '\x5', '\x87', '\x44', '\x2', '\x2F8',
+ '\x2F7', '\x3', '\x2', '\x2', '\x2', '\x2F8', '\x2F9', '\x3', '\x2', '\x2',
+ '\x2', '\x2F9', '\x86', '\x3', '\x2', '\x2', '\x2', '\x2FA', '\x2FB',
+ '\t', '\x2', '\x2', '\x2', '\x2FB', '\x88', '\x3', '\x2', '\x2', '\x2',
+ '\x2FC', '\x307', '\a', '\x32', '\x2', '\x2', '\x2FD', '\x304', '\x5',
+ '\x8F', 'H', '\x2', '\x2FE', '\x300', '\x5', '\x8B', '\x46', '\x2', '\x2FF',
+ '\x2FE', '\x3', '\x2', '\x2', '\x2', '\x2FF', '\x300', '\x3', '\x2', '\x2',
+ '\x2', '\x300', '\x305', '\x3', '\x2', '\x2', '\x2', '\x301', '\x302',
+ '\x5', '\x95', 'K', '\x2', '\x302', '\x303', '\x5', '\x8B', '\x46', '\x2',
+ '\x303', '\x305', '\x3', '\x2', '\x2', '\x2', '\x304', '\x2FF', '\x3',
+ '\x2', '\x2', '\x2', '\x304', '\x301', '\x3', '\x2', '\x2', '\x2', '\x305',
+ '\x307', '\x3', '\x2', '\x2', '\x2', '\x306', '\x2FC', '\x3', '\x2', '\x2',
+ '\x2', '\x306', '\x2FD', '\x3', '\x2', '\x2', '\x2', '\x307', '\x8A',
+ '\x3', '\x2', '\x2', '\x2', '\x308', '\x30D', '\x5', '\x8D', 'G', '\x2',
+ '\x309', '\x30B', '\x5', '\x91', 'I', '\x2', '\x30A', '\x309', '\x3',
+ '\x2', '\x2', '\x2', '\x30A', '\x30B', '\x3', '\x2', '\x2', '\x2', '\x30B',
+ '\x30C', '\x3', '\x2', '\x2', '\x2', '\x30C', '\x30E', '\x5', '\x8D',
+ 'G', '\x2', '\x30D', '\x30A', '\x3', '\x2', '\x2', '\x2', '\x30D', '\x30E',
+ '\x3', '\x2', '\x2', '\x2', '\x30E', '\x8C', '\x3', '\x2', '\x2', '\x2',
+ '\x30F', '\x312', '\a', '\x32', '\x2', '\x2', '\x310', '\x312', '\x5',
+ '\x8F', 'H', '\x2', '\x311', '\x30F', '\x3', '\x2', '\x2', '\x2', '\x311',
+ '\x310', '\x3', '\x2', '\x2', '\x2', '\x312', '\x8E', '\x3', '\x2', '\x2',
+ '\x2', '\x313', '\x314', '\t', '\x3', '\x2', '\x2', '\x314', '\x90', '\x3',
+ '\x2', '\x2', '\x2', '\x315', '\x317', '\x5', '\x93', 'J', '\x2', '\x316',
+ '\x315', '\x3', '\x2', '\x2', '\x2', '\x317', '\x318', '\x3', '\x2', '\x2',
+ '\x2', '\x318', '\x316', '\x3', '\x2', '\x2', '\x2', '\x318', '\x319',
+ '\x3', '\x2', '\x2', '\x2', '\x319', '\x92', '\x3', '\x2', '\x2', '\x2',
+ '\x31A', '\x31D', '\x5', '\x8D', 'G', '\x2', '\x31B', '\x31D', '\a', '\x61',
+ '\x2', '\x2', '\x31C', '\x31A', '\x3', '\x2', '\x2', '\x2', '\x31C', '\x31B',
+ '\x3', '\x2', '\x2', '\x2', '\x31D', '\x94', '\x3', '\x2', '\x2', '\x2',
+ '\x31E', '\x320', '\a', '\x61', '\x2', '\x2', '\x31F', '\x31E', '\x3',
+ '\x2', '\x2', '\x2', '\x320', '\x321', '\x3', '\x2', '\x2', '\x2', '\x321',
+ '\x31F', '\x3', '\x2', '\x2', '\x2', '\x321', '\x322', '\x3', '\x2', '\x2',
+ '\x2', '\x322', '\x96', '\x3', '\x2', '\x2', '\x2', '\x323', '\x324',
+ '\a', '\x32', '\x2', '\x2', '\x324', '\x325', '\t', '\x4', '\x2', '\x2',
+ '\x325', '\x326', '\x5', '\x99', 'M', '\x2', '\x326', '\x98', '\x3', '\x2',
+ '\x2', '\x2', '\x327', '\x32C', '\x5', '\x9B', 'N', '\x2', '\x328', '\x32A',
+ '\x5', '\x9D', 'O', '\x2', '\x329', '\x328', '\x3', '\x2', '\x2', '\x2',
+ '\x329', '\x32A', '\x3', '\x2', '\x2', '\x2', '\x32A', '\x32B', '\x3',
+ '\x2', '\x2', '\x2', '\x32B', '\x32D', '\x5', '\x9B', 'N', '\x2', '\x32C',
+ '\x329', '\x3', '\x2', '\x2', '\x2', '\x32C', '\x32D', '\x3', '\x2', '\x2',
+ '\x2', '\x32D', '\x9A', '\x3', '\x2', '\x2', '\x2', '\x32E', '\x32F',
+ '\t', '\x5', '\x2', '\x2', '\x32F', '\x9C', '\x3', '\x2', '\x2', '\x2',
+ '\x330', '\x332', '\x5', '\x9F', 'P', '\x2', '\x331', '\x330', '\x3',
+ '\x2', '\x2', '\x2', '\x332', '\x333', '\x3', '\x2', '\x2', '\x2', '\x333',
+ '\x331', '\x3', '\x2', '\x2', '\x2', '\x333', '\x334', '\x3', '\x2', '\x2',
+ '\x2', '\x334', '\x9E', '\x3', '\x2', '\x2', '\x2', '\x335', '\x338',
+ '\x5', '\x9B', 'N', '\x2', '\x336', '\x338', '\a', '\x61', '\x2', '\x2',
+ '\x337', '\x335', '\x3', '\x2', '\x2', '\x2', '\x337', '\x336', '\x3',
+ '\x2', '\x2', '\x2', '\x338', '\xA0', '\x3', '\x2', '\x2', '\x2', '\x339',
+ '\x33B', '\a', '\x32', '\x2', '\x2', '\x33A', '\x33C', '\x5', '\x95',
+ 'K', '\x2', '\x33B', '\x33A', '\x3', '\x2', '\x2', '\x2', '\x33B', '\x33C',
+ '\x3', '\x2', '\x2', '\x2', '\x33C', '\x33D', '\x3', '\x2', '\x2', '\x2',
+ '\x33D', '\x33E', '\x5', '\xA3', 'R', '\x2', '\x33E', '\xA2', '\x3', '\x2',
+ '\x2', '\x2', '\x33F', '\x344', '\x5', '\xA5', 'S', '\x2', '\x340', '\x342',
+ '\x5', '\xA7', 'T', '\x2', '\x341', '\x340', '\x3', '\x2', '\x2', '\x2',
+ '\x341', '\x342', '\x3', '\x2', '\x2', '\x2', '\x342', '\x343', '\x3',
+ '\x2', '\x2', '\x2', '\x343', '\x345', '\x5', '\xA5', 'S', '\x2', '\x344',
+ '\x341', '\x3', '\x2', '\x2', '\x2', '\x344', '\x345', '\x3', '\x2', '\x2',
+ '\x2', '\x345', '\xA4', '\x3', '\x2', '\x2', '\x2', '\x346', '\x347',
+ '\t', '\x6', '\x2', '\x2', '\x347', '\xA6', '\x3', '\x2', '\x2', '\x2',
+ '\x348', '\x34A', '\x5', '\xA9', 'U', '\x2', '\x349', '\x348', '\x3',
+ '\x2', '\x2', '\x2', '\x34A', '\x34B', '\x3', '\x2', '\x2', '\x2', '\x34B',
+ '\x349', '\x3', '\x2', '\x2', '\x2', '\x34B', '\x34C', '\x3', '\x2', '\x2',
+ '\x2', '\x34C', '\xA8', '\x3', '\x2', '\x2', '\x2', '\x34D', '\x350',
+ '\x5', '\xA5', 'S', '\x2', '\x34E', '\x350', '\a', '\x61', '\x2', '\x2',
+ '\x34F', '\x34D', '\x3', '\x2', '\x2', '\x2', '\x34F', '\x34E', '\x3',
+ '\x2', '\x2', '\x2', '\x350', '\xAA', '\x3', '\x2', '\x2', '\x2', '\x351',
+ '\x352', '\a', '\x32', '\x2', '\x2', '\x352', '\x353', '\t', '\a', '\x2',
+ '\x2', '\x353', '\x354', '\x5', '\xAD', 'W', '\x2', '\x354', '\xAC', '\x3',
+ '\x2', '\x2', '\x2', '\x355', '\x35A', '\x5', '\xAF', 'X', '\x2', '\x356',
+ '\x358', '\x5', '\xB1', 'Y', '\x2', '\x357', '\x356', '\x3', '\x2', '\x2',
+ '\x2', '\x357', '\x358', '\x3', '\x2', '\x2', '\x2', '\x358', '\x359',
+ '\x3', '\x2', '\x2', '\x2', '\x359', '\x35B', '\x5', '\xAF', 'X', '\x2',
+ '\x35A', '\x357', '\x3', '\x2', '\x2', '\x2', '\x35A', '\x35B', '\x3',
+ '\x2', '\x2', '\x2', '\x35B', '\xAE', '\x3', '\x2', '\x2', '\x2', '\x35C',
+ '\x35D', '\t', '\b', '\x2', '\x2', '\x35D', '\xB0', '\x3', '\x2', '\x2',
+ '\x2', '\x35E', '\x360', '\x5', '\xB3', 'Z', '\x2', '\x35F', '\x35E',
+ '\x3', '\x2', '\x2', '\x2', '\x360', '\x361', '\x3', '\x2', '\x2', '\x2',
+ '\x361', '\x35F', '\x3', '\x2', '\x2', '\x2', '\x361', '\x362', '\x3',
+ '\x2', '\x2', '\x2', '\x362', '\xB2', '\x3', '\x2', '\x2', '\x2', '\x363',
+ '\x366', '\x5', '\xAF', 'X', '\x2', '\x364', '\x366', '\a', '\x61', '\x2',
+ '\x2', '\x365', '\x363', '\x3', '\x2', '\x2', '\x2', '\x365', '\x364',
+ '\x3', '\x2', '\x2', '\x2', '\x366', '\xB4', '\x3', '\x2', '\x2', '\x2',
+ '\x367', '\x36A', '\x5', '\xB7', '\\', '\x2', '\x368', '\x36A', '\x5',
+ '\xC3', '\x62', '\x2', '\x369', '\x367', '\x3', '\x2', '\x2', '\x2', '\x369',
+ '\x368', '\x3', '\x2', '\x2', '\x2', '\x36A', '\xB6', '\x3', '\x2', '\x2',
+ '\x2', '\x36B', '\x36C', '\x5', '\x8B', '\x46', '\x2', '\x36C', '\x36E',
+ '\a', '\x30', '\x2', '\x2', '\x36D', '\x36F', '\x5', '\x8B', '\x46', '\x2',
+ '\x36E', '\x36D', '\x3', '\x2', '\x2', '\x2', '\x36E', '\x36F', '\x3',
+ '\x2', '\x2', '\x2', '\x36F', '\x371', '\x3', '\x2', '\x2', '\x2', '\x370',
+ '\x372', '\x5', '\xB9', ']', '\x2', '\x371', '\x370', '\x3', '\x2', '\x2',
+ '\x2', '\x371', '\x372', '\x3', '\x2', '\x2', '\x2', '\x372', '\x374',
+ '\x3', '\x2', '\x2', '\x2', '\x373', '\x375', '\x5', '\xC1', '\x61', '\x2',
+ '\x374', '\x373', '\x3', '\x2', '\x2', '\x2', '\x374', '\x375', '\x3',
+ '\x2', '\x2', '\x2', '\x375', '\x387', '\x3', '\x2', '\x2', '\x2', '\x376',
+ '\x377', '\a', '\x30', '\x2', '\x2', '\x377', '\x379', '\x5', '\x8B',
+ '\x46', '\x2', '\x378', '\x37A', '\x5', '\xB9', ']', '\x2', '\x379', '\x378',
+ '\x3', '\x2', '\x2', '\x2', '\x379', '\x37A', '\x3', '\x2', '\x2', '\x2',
+ '\x37A', '\x37C', '\x3', '\x2', '\x2', '\x2', '\x37B', '\x37D', '\x5',
+ '\xC1', '\x61', '\x2', '\x37C', '\x37B', '\x3', '\x2', '\x2', '\x2', '\x37C',
+ '\x37D', '\x3', '\x2', '\x2', '\x2', '\x37D', '\x387', '\x3', '\x2', '\x2',
+ '\x2', '\x37E', '\x37F', '\x5', '\x8B', '\x46', '\x2', '\x37F', '\x381',
+ '\x5', '\xB9', ']', '\x2', '\x380', '\x382', '\x5', '\xC1', '\x61', '\x2',
+ '\x381', '\x380', '\x3', '\x2', '\x2', '\x2', '\x381', '\x382', '\x3',
+ '\x2', '\x2', '\x2', '\x382', '\x387', '\x3', '\x2', '\x2', '\x2', '\x383',
+ '\x384', '\x5', '\x8B', '\x46', '\x2', '\x384', '\x385', '\x5', '\xC1',
+ '\x61', '\x2', '\x385', '\x387', '\x3', '\x2', '\x2', '\x2', '\x386',
+ '\x36B', '\x3', '\x2', '\x2', '\x2', '\x386', '\x376', '\x3', '\x2', '\x2',
+ '\x2', '\x386', '\x37E', '\x3', '\x2', '\x2', '\x2', '\x386', '\x383',
+ '\x3', '\x2', '\x2', '\x2', '\x387', '\xB8', '\x3', '\x2', '\x2', '\x2',
+ '\x388', '\x389', '\x5', '\xBB', '^', '\x2', '\x389', '\x38A', '\x5',
+ '\xBD', '_', '\x2', '\x38A', '\xBA', '\x3', '\x2', '\x2', '\x2', '\x38B',
+ '\x38C', '\t', '\t', '\x2', '\x2', '\x38C', '\xBC', '\x3', '\x2', '\x2',
+ '\x2', '\x38D', '\x38F', '\x5', '\xBF', '`', '\x2', '\x38E', '\x38D',
+ '\x3', '\x2', '\x2', '\x2', '\x38E', '\x38F', '\x3', '\x2', '\x2', '\x2',
+ '\x38F', '\x390', '\x3', '\x2', '\x2', '\x2', '\x390', '\x391', '\x5',
+ '\x8B', '\x46', '\x2', '\x391', '\xBE', '\x3', '\x2', '\x2', '\x2', '\x392',
+ '\x393', '\t', '\n', '\x2', '\x2', '\x393', '\xC0', '\x3', '\x2', '\x2',
+ '\x2', '\x394', '\x395', '\t', '\v', '\x2', '\x2', '\x395', '\xC2', '\x3',
+ '\x2', '\x2', '\x2', '\x396', '\x397', '\x5', '\xC5', '\x63', '\x2', '\x397',
+ '\x399', '\x5', '\xC7', '\x64', '\x2', '\x398', '\x39A', '\x5', '\xC1',
+ '\x61', '\x2', '\x399', '\x398', '\x3', '\x2', '\x2', '\x2', '\x399',
+ '\x39A', '\x3', '\x2', '\x2', '\x2', '\x39A', '\xC4', '\x3', '\x2', '\x2',
+ '\x2', '\x39B', '\x39D', '\x5', '\x97', 'L', '\x2', '\x39C', '\x39E',
+ '\a', '\x30', '\x2', '\x2', '\x39D', '\x39C', '\x3', '\x2', '\x2', '\x2',
+ '\x39D', '\x39E', '\x3', '\x2', '\x2', '\x2', '\x39E', '\x3A7', '\x3',
+ '\x2', '\x2', '\x2', '\x39F', '\x3A0', '\a', '\x32', '\x2', '\x2', '\x3A0',
+ '\x3A2', '\t', '\x4', '\x2', '\x2', '\x3A1', '\x3A3', '\x5', '\x99', 'M',
+ '\x2', '\x3A2', '\x3A1', '\x3', '\x2', '\x2', '\x2', '\x3A2', '\x3A3',
+ '\x3', '\x2', '\x2', '\x2', '\x3A3', '\x3A4', '\x3', '\x2', '\x2', '\x2',
+ '\x3A4', '\x3A5', '\a', '\x30', '\x2', '\x2', '\x3A5', '\x3A7', '\x5',
+ '\x99', 'M', '\x2', '\x3A6', '\x39B', '\x3', '\x2', '\x2', '\x2', '\x3A6',
+ '\x39F', '\x3', '\x2', '\x2', '\x2', '\x3A7', '\xC6', '\x3', '\x2', '\x2',
+ '\x2', '\x3A8', '\x3A9', '\x5', '\xC9', '\x65', '\x2', '\x3A9', '\x3AA',
+ '\x5', '\xBD', '_', '\x2', '\x3AA', '\xC8', '\x3', '\x2', '\x2', '\x2',
+ '\x3AB', '\x3AC', '\t', '\f', '\x2', '\x2', '\x3AC', '\xCA', '\x3', '\x2',
+ '\x2', '\x2', '\x3AD', '\x3AE', '\a', 'v', '\x2', '\x2', '\x3AE', '\x3AF',
+ '\a', 't', '\x2', '\x2', '\x3AF', '\x3B0', '\a', 'w', '\x2', '\x2', '\x3B0',
+ '\x3B7', '\a', 'g', '\x2', '\x2', '\x3B1', '\x3B2', '\a', 'h', '\x2',
+ '\x2', '\x3B2', '\x3B3', '\a', '\x63', '\x2', '\x2', '\x3B3', '\x3B4',
+ '\a', 'n', '\x2', '\x2', '\x3B4', '\x3B5', '\a', 'u', '\x2', '\x2', '\x3B5',
+ '\x3B7', '\a', 'g', '\x2', '\x2', '\x3B6', '\x3AD', '\x3', '\x2', '\x2',
+ '\x2', '\x3B6', '\x3B1', '\x3', '\x2', '\x2', '\x2', '\x3B7', '\xCC',
+ '\x3', '\x2', '\x2', '\x2', '\x3B8', '\x3B9', '\a', ')', '\x2', '\x2',
+ '\x3B9', '\x3BA', '\x5', '\xCF', 'h', '\x2', '\x3BA', '\x3BB', '\a', ')',
+ '\x2', '\x2', '\x3BB', '\x3C1', '\x3', '\x2', '\x2', '\x2', '\x3BC', '\x3BD',
+ '\a', ')', '\x2', '\x2', '\x3BD', '\x3BE', '\x5', '\xD7', 'l', '\x2',
+ '\x3BE', '\x3BF', '\a', ')', '\x2', '\x2', '\x3BF', '\x3C1', '\x3', '\x2',
+ '\x2', '\x2', '\x3C0', '\x3B8', '\x3', '\x2', '\x2', '\x2', '\x3C0', '\x3BC',
+ '\x3', '\x2', '\x2', '\x2', '\x3C1', '\xCE', '\x3', '\x2', '\x2', '\x2',
+ '\x3C2', '\x3C3', '\n', '\r', '\x2', '\x2', '\x3C3', '\xD0', '\x3', '\x2',
+ '\x2', '\x2', '\x3C4', '\x3C6', '\a', '$', '\x2', '\x2', '\x3C5', '\x3C7',
+ '\x5', '\xD3', 'j', '\x2', '\x3C6', '\x3C5', '\x3', '\x2', '\x2', '\x2',
+ '\x3C6', '\x3C7', '\x3', '\x2', '\x2', '\x2', '\x3C7', '\x3C8', '\x3',
+ '\x2', '\x2', '\x2', '\x3C8', '\x3C9', '\a', '$', '\x2', '\x2', '\x3C9',
+ '\xD2', '\x3', '\x2', '\x2', '\x2', '\x3CA', '\x3CC', '\x5', '\xD5', 'k',
+ '\x2', '\x3CB', '\x3CA', '\x3', '\x2', '\x2', '\x2', '\x3CC', '\x3CD',
+ '\x3', '\x2', '\x2', '\x2', '\x3CD', '\x3CB', '\x3', '\x2', '\x2', '\x2',
+ '\x3CD', '\x3CE', '\x3', '\x2', '\x2', '\x2', '\x3CE', '\xD4', '\x3',
+ '\x2', '\x2', '\x2', '\x3CF', '\x3D2', '\n', '\xE', '\x2', '\x2', '\x3D0',
+ '\x3D2', '\x5', '\xD7', 'l', '\x2', '\x3D1', '\x3CF', '\x3', '\x2', '\x2',
+ '\x2', '\x3D1', '\x3D0', '\x3', '\x2', '\x2', '\x2', '\x3D2', '\xD6',
+ '\x3', '\x2', '\x2', '\x2', '\x3D3', '\x3D4', '\a', '^', '\x2', '\x2',
+ '\x3D4', '\x3D8', '\t', '\xF', '\x2', '\x2', '\x3D5', '\x3D8', '\x5',
+ '\xD9', 'm', '\x2', '\x3D6', '\x3D8', '\x5', '\xDD', 'o', '\x2', '\x3D7',
+ '\x3D3', '\x3', '\x2', '\x2', '\x2', '\x3D7', '\x3D5', '\x3', '\x2', '\x2',
+ '\x2', '\x3D7', '\x3D6', '\x3', '\x2', '\x2', '\x2', '\x3D8', '\xD8',
+ '\x3', '\x2', '\x2', '\x2', '\x3D9', '\x3DA', '\a', '^', '\x2', '\x2',
+ '\x3DA', '\x3E5', '\x5', '\xA5', 'S', '\x2', '\x3DB', '\x3DC', '\a', '^',
+ '\x2', '\x2', '\x3DC', '\x3DD', '\x5', '\xA5', 'S', '\x2', '\x3DD', '\x3DE',
+ '\x5', '\xA5', 'S', '\x2', '\x3DE', '\x3E5', '\x3', '\x2', '\x2', '\x2',
+ '\x3DF', '\x3E0', '\a', '^', '\x2', '\x2', '\x3E0', '\x3E1', '\x5', '\xDB',
+ 'n', '\x2', '\x3E1', '\x3E2', '\x5', '\xA5', 'S', '\x2', '\x3E2', '\x3E3',
+ '\x5', '\xA5', 'S', '\x2', '\x3E3', '\x3E5', '\x3', '\x2', '\x2', '\x2',
+ '\x3E4', '\x3D9', '\x3', '\x2', '\x2', '\x2', '\x3E4', '\x3DB', '\x3',
+ '\x2', '\x2', '\x2', '\x3E4', '\x3DF', '\x3', '\x2', '\x2', '\x2', '\x3E5',
+ '\xDA', '\x3', '\x2', '\x2', '\x2', '\x3E6', '\x3E7', '\t', '\x10', '\x2',
+ '\x2', '\x3E7', '\xDC', '\x3', '\x2', '\x2', '\x2', '\x3E8', '\x3EA',
+ '\a', '^', '\x2', '\x2', '\x3E9', '\x3EB', '\a', 'w', '\x2', '\x2', '\x3EA',
+ '\x3E9', '\x3', '\x2', '\x2', '\x2', '\x3EB', '\x3EC', '\x3', '\x2', '\x2',
+ '\x2', '\x3EC', '\x3EA', '\x3', '\x2', '\x2', '\x2', '\x3EC', '\x3ED',
+ '\x3', '\x2', '\x2', '\x2', '\x3ED', '\x3EE', '\x3', '\x2', '\x2', '\x2',
+ '\x3EE', '\x3EF', '\x5', '\x9B', 'N', '\x2', '\x3EF', '\x3F0', '\x5',
+ '\x9B', 'N', '\x2', '\x3F0', '\x3F1', '\x5', '\x9B', 'N', '\x2', '\x3F1',
+ '\x3F2', '\x5', '\x9B', 'N', '\x2', '\x3F2', '\xDE', '\x3', '\x2', '\x2',
+ '\x2', '\x3F3', '\x3F4', '\a', 'p', '\x2', '\x2', '\x3F4', '\x3F5', '\a',
+ 'w', '\x2', '\x2', '\x3F5', '\x3F6', '\a', 'n', '\x2', '\x2', '\x3F6',
+ '\x3F7', '\a', 'n', '\x2', '\x2', '\x3F7', '\xE0', '\x3', '\x2', '\x2',
+ '\x2', '\x3F8', '\x3F9', '\a', '*', '\x2', '\x2', '\x3F9', '\xE2', '\x3',
+ '\x2', '\x2', '\x2', '\x3FA', '\x3FB', '\a', '+', '\x2', '\x2', '\x3FB',
+ '\xE4', '\x3', '\x2', '\x2', '\x2', '\x3FC', '\x3FD', '\a', '}', '\x2',
+ '\x2', '\x3FD', '\xE6', '\x3', '\x2', '\x2', '\x2', '\x3FE', '\x3FF',
+ '\a', '\x7F', '\x2', '\x2', '\x3FF', '\xE8', '\x3', '\x2', '\x2', '\x2',
+ '\x400', '\x401', '\a', ']', '\x2', '\x2', '\x401', '\xEA', '\x3', '\x2',
+ '\x2', '\x2', '\x402', '\x403', '\a', '_', '\x2', '\x2', '\x403', '\xEC',
+ '\x3', '\x2', '\x2', '\x2', '\x404', '\x405', '\a', '=', '\x2', '\x2',
+ '\x405', '\xEE', '\x3', '\x2', '\x2', '\x2', '\x406', '\x407', '\a', '.',
+ '\x2', '\x2', '\x407', '\xF0', '\x3', '\x2', '\x2', '\x2', '\x408', '\x409',
+ '\a', '\x30', '\x2', '\x2', '\x409', '\xF2', '\x3', '\x2', '\x2', '\x2',
+ '\x40A', '\x40B', '\a', '\x30', '\x2', '\x2', '\x40B', '\x40C', '\a',
+ '\x30', '\x2', '\x2', '\x40C', '\x40D', '\a', '\x30', '\x2', '\x2', '\x40D',
+ '\xF4', '\x3', '\x2', '\x2', '\x2', '\x40E', '\x40F', '\a', '\x42', '\x2',
+ '\x2', '\x40F', '\xF6', '\x3', '\x2', '\x2', '\x2', '\x410', '\x411',
+ '\a', '<', '\x2', '\x2', '\x411', '\x412', '\a', '<', '\x2', '\x2', '\x412',
+ '\xF8', '\x3', '\x2', '\x2', '\x2', '\x413', '\x414', '\a', '?', '\x2',
+ '\x2', '\x414', '\xFA', '\x3', '\x2', '\x2', '\x2', '\x415', '\x416',
+ '\a', '@', '\x2', '\x2', '\x416', '\xFC', '\x3', '\x2', '\x2', '\x2',
+ '\x417', '\x418', '\a', '>', '\x2', '\x2', '\x418', '\xFE', '\x3', '\x2',
+ '\x2', '\x2', '\x419', '\x41A', '\a', '#', '\x2', '\x2', '\x41A', '\x100',
+ '\x3', '\x2', '\x2', '\x2', '\x41B', '\x41C', '\a', '\x80', '\x2', '\x2',
+ '\x41C', '\x102', '\x3', '\x2', '\x2', '\x2', '\x41D', '\x41E', '\a',
+ '\x41', '\x2', '\x2', '\x41E', '\x104', '\x3', '\x2', '\x2', '\x2', '\x41F',
+ '\x420', '\a', '<', '\x2', '\x2', '\x420', '\x106', '\x3', '\x2', '\x2',
+ '\x2', '\x421', '\x422', '\a', '/', '\x2', '\x2', '\x422', '\x423', '\a',
+ '@', '\x2', '\x2', '\x423', '\x108', '\x3', '\x2', '\x2', '\x2', '\x424',
+ '\x425', '\a', '?', '\x2', '\x2', '\x425', '\x426', '\a', '?', '\x2',
+ '\x2', '\x426', '\x10A', '\x3', '\x2', '\x2', '\x2', '\x427', '\x428',
+ '\a', '>', '\x2', '\x2', '\x428', '\x429', '\a', '?', '\x2', '\x2', '\x429',
+ '\x10C', '\x3', '\x2', '\x2', '\x2', '\x42A', '\x42B', '\a', '@', '\x2',
+ '\x2', '\x42B', '\x42C', '\a', '?', '\x2', '\x2', '\x42C', '\x10E', '\x3',
+ '\x2', '\x2', '\x2', '\x42D', '\x42E', '\a', '#', '\x2', '\x2', '\x42E',
+ '\x42F', '\a', '?', '\x2', '\x2', '\x42F', '\x110', '\x3', '\x2', '\x2',
+ '\x2', '\x430', '\x431', '\a', '(', '\x2', '\x2', '\x431', '\x432', '\a',
+ '(', '\x2', '\x2', '\x432', '\x112', '\x3', '\x2', '\x2', '\x2', '\x433',
+ '\x434', '\a', '~', '\x2', '\x2', '\x434', '\x435', '\a', '~', '\x2',
+ '\x2', '\x435', '\x114', '\x3', '\x2', '\x2', '\x2', '\x436', '\x437',
+ '\a', '-', '\x2', '\x2', '\x437', '\x438', '\a', '-', '\x2', '\x2', '\x438',
+ '\x116', '\x3', '\x2', '\x2', '\x2', '\x439', '\x43A', '\a', '/', '\x2',
+ '\x2', '\x43A', '\x43B', '\a', '/', '\x2', '\x2', '\x43B', '\x118', '\x3',
+ '\x2', '\x2', '\x2', '\x43C', '\x43D', '\a', '-', '\x2', '\x2', '\x43D',
+ '\x11A', '\x3', '\x2', '\x2', '\x2', '\x43E', '\x43F', '\a', '/', '\x2',
+ '\x2', '\x43F', '\x11C', '\x3', '\x2', '\x2', '\x2', '\x440', '\x441',
+ '\a', ',', '\x2', '\x2', '\x441', '\x11E', '\x3', '\x2', '\x2', '\x2',
+ '\x442', '\x443', '\a', '\x31', '\x2', '\x2', '\x443', '\x120', '\x3',
+ '\x2', '\x2', '\x2', '\x444', '\x445', '\a', '(', '\x2', '\x2', '\x445',
+ '\x122', '\x3', '\x2', '\x2', '\x2', '\x446', '\x447', '\a', '~', '\x2',
+ '\x2', '\x447', '\x124', '\x3', '\x2', '\x2', '\x2', '\x448', '\x449',
+ '\a', '`', '\x2', '\x2', '\x449', '\x126', '\x3', '\x2', '\x2', '\x2',
+ '\x44A', '\x44B', '\a', '\'', '\x2', '\x2', '\x44B', '\x128', '\x3', '\x2',
+ '\x2', '\x2', '\x44C', '\x44D', '\a', '-', '\x2', '\x2', '\x44D', '\x44E',
+ '\a', '?', '\x2', '\x2', '\x44E', '\x12A', '\x3', '\x2', '\x2', '\x2',
+ '\x44F', '\x450', '\a', '/', '\x2', '\x2', '\x450', '\x451', '\a', '?',
+ '\x2', '\x2', '\x451', '\x12C', '\x3', '\x2', '\x2', '\x2', '\x452', '\x453',
+ '\a', ',', '\x2', '\x2', '\x453', '\x454', '\a', '?', '\x2', '\x2', '\x454',
+ '\x12E', '\x3', '\x2', '\x2', '\x2', '\x455', '\x456', '\a', '\x31', '\x2',
+ '\x2', '\x456', '\x457', '\a', '?', '\x2', '\x2', '\x457', '\x130', '\x3',
+ '\x2', '\x2', '\x2', '\x458', '\x459', '\a', '(', '\x2', '\x2', '\x459',
+ '\x45A', '\a', '?', '\x2', '\x2', '\x45A', '\x132', '\x3', '\x2', '\x2',
+ '\x2', '\x45B', '\x45C', '\a', '~', '\x2', '\x2', '\x45C', '\x45D', '\a',
+ '?', '\x2', '\x2', '\x45D', '\x134', '\x3', '\x2', '\x2', '\x2', '\x45E',
+ '\x45F', '\a', '`', '\x2', '\x2', '\x45F', '\x460', '\a', '?', '\x2',
+ '\x2', '\x460', '\x136', '\x3', '\x2', '\x2', '\x2', '\x461', '\x462',
+ '\a', '\'', '\x2', '\x2', '\x462', '\x463', '\a', '?', '\x2', '\x2', '\x463',
+ '\x138', '\x3', '\x2', '\x2', '\x2', '\x464', '\x465', '\a', '>', '\x2',
+ '\x2', '\x465', '\x466', '\a', '>', '\x2', '\x2', '\x466', '\x467', '\a',
+ '?', '\x2', '\x2', '\x467', '\x13A', '\x3', '\x2', '\x2', '\x2', '\x468',
+ '\x469', '\a', '@', '\x2', '\x2', '\x469', '\x46A', '\a', '@', '\x2',
+ '\x2', '\x46A', '\x46B', '\a', '?', '\x2', '\x2', '\x46B', '\x13C', '\x3',
+ '\x2', '\x2', '\x2', '\x46C', '\x46D', '\a', '@', '\x2', '\x2', '\x46D',
+ '\x46E', '\a', '@', '\x2', '\x2', '\x46E', '\x46F', '\a', '@', '\x2',
+ '\x2', '\x46F', '\x470', '\a', '?', '\x2', '\x2', '\x470', '\x13E', '\x3',
+ '\x2', '\x2', '\x2', '\x471', '\x475', '\x5', '\x141', '\xA1', '\x2',
+ '\x472', '\x474', '\x5', '\x143', '\xA2', '\x2', '\x473', '\x472', '\x3',
+ '\x2', '\x2', '\x2', '\x474', '\x477', '\x3', '\x2', '\x2', '\x2', '\x475',
+ '\x473', '\x3', '\x2', '\x2', '\x2', '\x475', '\x476', '\x3', '\x2', '\x2',
+ '\x2', '\x476', '\x140', '\x3', '\x2', '\x2', '\x2', '\x477', '\x475',
+ '\x3', '\x2', '\x2', '\x2', '\x478', '\x47F', '\t', '\x11', '\x2', '\x2',
+ '\x479', '\x47A', '\n', '\x12', '\x2', '\x2', '\x47A', '\x47F', '\x6',
+ '\xA1', '\x2', '\x2', '\x47B', '\x47C', '\t', '\x13', '\x2', '\x2', '\x47C',
+ '\x47D', '\t', '\x14', '\x2', '\x2', '\x47D', '\x47F', '\x6', '\xA1',
+ '\x3', '\x2', '\x47E', '\x478', '\x3', '\x2', '\x2', '\x2', '\x47E', '\x479',
+ '\x3', '\x2', '\x2', '\x2', '\x47E', '\x47B', '\x3', '\x2', '\x2', '\x2',
+ '\x47F', '\x142', '\x3', '\x2', '\x2', '\x2', '\x480', '\x487', '\t',
+ '\x15', '\x2', '\x2', '\x481', '\x482', '\n', '\x12', '\x2', '\x2', '\x482',
+ '\x487', '\x6', '\xA2', '\x4', '\x2', '\x483', '\x484', '\t', '\x13',
+ '\x2', '\x2', '\x484', '\x485', '\t', '\x14', '\x2', '\x2', '\x485', '\x487',
+ '\x6', '\xA2', '\x5', '\x2', '\x486', '\x480', '\x3', '\x2', '\x2', '\x2',
+ '\x486', '\x481', '\x3', '\x2', '\x2', '\x2', '\x486', '\x483', '\x3',
+ '\x2', '\x2', '\x2', '\x487', '\x144', '\x3', '\x2', '\x2', '\x2', '\x488',
+ '\x48A', '\t', '\x16', '\x2', '\x2', '\x489', '\x488', '\x3', '\x2', '\x2',
+ '\x2', '\x48A', '\x48B', '\x3', '\x2', '\x2', '\x2', '\x48B', '\x489',
+ '\x3', '\x2', '\x2', '\x2', '\x48B', '\x48C', '\x3', '\x2', '\x2', '\x2',
+ '\x48C', '\x48D', '\x3', '\x2', '\x2', '\x2', '\x48D', '\x48E', '\b',
+ '\xA3', '\x2', '\x2', '\x48E', '\x146', '\x3', '\x2', '\x2', '\x2', '\x48F',
+ '\x490', '\a', '\x31', '\x2', '\x2', '\x490', '\x491', '\a', ',', '\x2',
+ '\x2', '\x491', '\x495', '\x3', '\x2', '\x2', '\x2', '\x492', '\x494',
+ '\v', '\x2', '\x2', '\x2', '\x493', '\x492', '\x3', '\x2', '\x2', '\x2',
+ '\x494', '\x497', '\x3', '\x2', '\x2', '\x2', '\x495', '\x496', '\x3',
+ '\x2', '\x2', '\x2', '\x495', '\x493', '\x3', '\x2', '\x2', '\x2', '\x496',
+ '\x498', '\x3', '\x2', '\x2', '\x2', '\x497', '\x495', '\x3', '\x2', '\x2',
+ '\x2', '\x498', '\x499', '\a', ',', '\x2', '\x2', '\x499', '\x49A', '\a',
+ '\x31', '\x2', '\x2', '\x49A', '\x49B', '\x3', '\x2', '\x2', '\x2', '\x49B',
+ '\x49C', '\b', '\xA4', '\x2', '\x2', '\x49C', '\x148', '\x3', '\x2', '\x2',
+ '\x2', '\x49D', '\x49E', '\a', '\x31', '\x2', '\x2', '\x49E', '\x49F',
+ '\a', '\x31', '\x2', '\x2', '\x49F', '\x4A3', '\x3', '\x2', '\x2', '\x2',
+ '\x4A0', '\x4A2', '\n', '\x17', '\x2', '\x2', '\x4A1', '\x4A0', '\x3',
+ '\x2', '\x2', '\x2', '\x4A2', '\x4A5', '\x3', '\x2', '\x2', '\x2', '\x4A3',
+ '\x4A1', '\x3', '\x2', '\x2', '\x2', '\x4A3', '\x4A4', '\x3', '\x2', '\x2',
+ '\x2', '\x4A4', '\x4A6', '\x3', '\x2', '\x2', '\x2', '\x4A5', '\x4A3',
+ '\x3', '\x2', '\x2', '\x2', '\x4A6', '\x4A7', '\b', '\xA5', '\x2', '\x2',
+ '\x4A7', '\x14A', '\x3', '\x2', '\x2', '\x2', '\x39', '\x2', '\x2E8',
+ '\x2EC', '\x2F0', '\x2F4', '\x2F8', '\x2FF', '\x304', '\x306', '\x30A',
+ '\x30D', '\x311', '\x318', '\x31C', '\x321', '\x329', '\x32C', '\x333',
+ '\x337', '\x33B', '\x341', '\x344', '\x34B', '\x34F', '\x357', '\x35A',
+ '\x361', '\x365', '\x369', '\x36E', '\x371', '\x374', '\x379', '\x37C',
+ '\x381', '\x386', '\x38E', '\x399', '\x39D', '\x3A2', '\x3A6', '\x3B6',
+ '\x3C0', '\x3C6', '\x3CD', '\x3D1', '\x3D7', '\x3E4', '\x3EC', '\x475',
+ '\x47E', '\x486', '\x48B', '\x495', '\x4A3', '\x3', '\x2', '\x4', '\x2',
+ };
+
+ public static readonly ATN _ATN =
+ new ATNDeserializer().Deserialize(_serializedATN);
+
+
+}
diff --git a/Tests.Runtime.Standard/Java9/Java9Parser.cs b/Tests.Runtime.Standard/Java9/Java9Parser.cs
new file mode 100644
index 0000000..504672a
--- /dev/null
+++ b/Tests.Runtime.Standard/Java9/Java9Parser.cs
@@ -0,0 +1,22060 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// ANTLR Version: 4.7.2
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+// Generated from C:\Users\Spitz\source\repos\AntlrBug_40\AntlrConsole3\Java9Parser.g4 by ANTLR 4.7.2
+
+// Unreachable code detected
+#pragma warning disable 0162
+// The variable '...' is assigned but its value is never used
+#pragma warning disable 0219
+// Missing XML comment for publicly visible type or member '...'
+#pragma warning disable 1591
+// Ambiguous reference in cref attribute
+#pragma warning disable 419
+
+using System;
+using System.IO;
+using System.Text;
+using System.Diagnostics;
+using System.Collections.Generic;
+using Antlr4.Runtime;
+using Antlr4.Runtime.Atn;
+using Antlr4.Runtime.Misc;
+using Antlr4.Runtime.Tree;
+using DFA = Antlr4.Runtime.Dfa.DFA;
+
+[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.7.2")]
+[System.CLSCompliant(false)]
+public partial class Java9Parser : Parser {
+ protected static DFA[] decisionToDFA;
+ protected static PredictionContextCache sharedContextCache = new PredictionContextCache();
+ public const int
+ ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8,
+ CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15,
+ ENUM=16, EXPORTS=17, EXTENDS=18, FINAL=19, FINALLY=20, FLOAT=21, FOR=22,
+ IF=23, GOTO=24, IMPLEMENTS=25, IMPORT=26, INSTANCEOF=27, INT=28, INTERFACE=29,
+ LONG=30, MODULE=31, NATIVE=32, NEW=33, OPEN=34, OPENS=35, PACKAGE=36,
+ PRIVATE=37, PROTECTED=38, PROVIDES=39, PUBLIC=40, REQUIRES=41, RETURN=42,
+ SHORT=43, STATIC=44, STRICTFP=45, SUPER=46, SWITCH=47, SYNCHRONIZED=48,
+ THIS=49, THROW=50, THROWS=51, TO=52, TRANSIENT=53, TRANSITIVE=54, TRY=55,
+ USES=56, VOID=57, VOLATILE=58, WHILE=59, WITH=60, UNDER_SCORE=61, IntegerLiteral=62,
+ FloatingPointLiteral=63, BooleanLiteral=64, CharacterLiteral=65, StringLiteral=66,
+ NullLiteral=67, LPAREN=68, RPAREN=69, LBRACE=70, RBRACE=71, LBRACK=72,
+ RBRACK=73, SEMI=74, COMMA=75, DOT=76, ELLIPSIS=77, AT=78, COLONCOLON=79,
+ ASSIGN=80, GT=81, LT=82, BANG=83, TILDE=84, QUESTION=85, COLON=86, ARROW=87,
+ EQUAL=88, LE=89, GE=90, NOTEQUAL=91, AND=92, OR=93, INC=94, DEC=95, ADD=96,
+ SUB=97, MUL=98, DIV=99, BITAND=100, BITOR=101, CARET=102, MOD=103, ADD_ASSIGN=104,
+ SUB_ASSIGN=105, MUL_ASSIGN=106, DIV_ASSIGN=107, AND_ASSIGN=108, OR_ASSIGN=109,
+ XOR_ASSIGN=110, MOD_ASSIGN=111, LSHIFT_ASSIGN=112, RSHIFT_ASSIGN=113,
+ URSHIFT_ASSIGN=114, Identifier=115, WS=116, COMMENT=117, LINE_COMMENT=118;
+ public const int
+ RULE_literal = 0, RULE_primitiveType = 1, RULE_numericType = 2, RULE_integralType = 3,
+ RULE_floatingPointType = 4, RULE_referenceType = 5, RULE_classOrInterfaceType = 6,
+ RULE_classType = 7, RULE_classType_lf_classOrInterfaceType = 8, RULE_classType_lfno_classOrInterfaceType = 9,
+ RULE_interfaceType = 10, RULE_interfaceType_lf_classOrInterfaceType = 11,
+ RULE_interfaceType_lfno_classOrInterfaceType = 12, RULE_typeVariable = 13,
+ RULE_arrayType = 14, RULE_dims = 15, RULE_typeParameter = 16, RULE_typeParameterModifier = 17,
+ RULE_typeBound = 18, RULE_additionalBound = 19, RULE_typeArguments = 20,
+ RULE_typeArgumentList = 21, RULE_typeArgument = 22, RULE_wildcard = 23,
+ RULE_wildcardBounds = 24, RULE_moduleName = 25, RULE_packageName = 26,
+ RULE_typeName = 27, RULE_packageOrTypeName = 28, RULE_expressionName = 29,
+ RULE_methodName = 30, RULE_ambiguousName = 31, RULE_compilationUnit = 32,
+ RULE_ordinaryCompilation = 33, RULE_modularCompilation = 34, RULE_packageDeclaration = 35,
+ RULE_packageModifier = 36, RULE_importDeclaration = 37, RULE_singleTypeImportDeclaration = 38,
+ RULE_typeImportOnDemandDeclaration = 39, RULE_singleStaticImportDeclaration = 40,
+ RULE_staticImportOnDemandDeclaration = 41, RULE_typeDeclaration = 42,
+ RULE_moduleDeclaration = 43, RULE_moduleDirective = 44, RULE_requiresModifier = 45,
+ RULE_classDeclaration = 46, RULE_normalClassDeclaration = 47, RULE_classModifier = 48,
+ RULE_typeParameters = 49, RULE_typeParameterList = 50, RULE_superclass = 51,
+ RULE_superinterfaces = 52, RULE_interfaceTypeList = 53, RULE_classBody = 54,
+ RULE_classBodyDeclaration = 55, RULE_classMemberDeclaration = 56, RULE_fieldDeclaration = 57,
+ RULE_fieldModifier = 58, RULE_variableDeclaratorList = 59, RULE_variableDeclarator = 60,
+ RULE_variableDeclaratorId = 61, RULE_variableInitializer = 62, RULE_unannType = 63,
+ RULE_unannPrimitiveType = 64, RULE_unannReferenceType = 65, RULE_unannClassOrInterfaceType = 66,
+ RULE_unannClassType = 67, RULE_unannClassType_lf_unannClassOrInterfaceType = 68,
+ RULE_unannClassType_lfno_unannClassOrInterfaceType = 69, RULE_unannInterfaceType = 70,
+ RULE_unannInterfaceType_lf_unannClassOrInterfaceType = 71, RULE_unannInterfaceType_lfno_unannClassOrInterfaceType = 72,
+ RULE_unannTypeVariable = 73, RULE_unannArrayType = 74, RULE_methodDeclaration = 75,
+ RULE_methodModifier = 76, RULE_methodHeader = 77, RULE_result = 78, RULE_methodDeclarator = 79,
+ RULE_formalParameterList = 80, RULE_formalParameters = 81, RULE_formalParameter = 82,
+ RULE_variableModifier = 83, RULE_lastFormalParameter = 84, RULE_receiverParameter = 85,
+ RULE_throws_ = 86, RULE_exceptionTypeList = 87, RULE_exceptionType = 88,
+ RULE_methodBody = 89, RULE_instanceInitializer = 90, RULE_staticInitializer = 91,
+ RULE_constructorDeclaration = 92, RULE_constructorModifier = 93, RULE_constructorDeclarator = 94,
+ RULE_simpleTypeName = 95, RULE_constructorBody = 96, RULE_explicitConstructorInvocation = 97,
+ RULE_enumDeclaration = 98, RULE_enumBody = 99, RULE_enumConstantList = 100,
+ RULE_enumConstant = 101, RULE_enumConstantModifier = 102, RULE_enumBodyDeclarations = 103,
+ RULE_interfaceDeclaration = 104, RULE_normalInterfaceDeclaration = 105,
+ RULE_interfaceModifier = 106, RULE_extendsInterfaces = 107, RULE_interfaceBody = 108,
+ RULE_interfaceMemberDeclaration = 109, RULE_constantDeclaration = 110,
+ RULE_constantModifier = 111, RULE_interfaceMethodDeclaration = 112, RULE_interfaceMethodModifier = 113,
+ RULE_annotationTypeDeclaration = 114, RULE_annotationTypeBody = 115, RULE_annotationTypeMemberDeclaration = 116,
+ RULE_annotationTypeElementDeclaration = 117, RULE_annotationTypeElementModifier = 118,
+ RULE_defaultValue = 119, RULE_annotation = 120, RULE_normalAnnotation = 121,
+ RULE_elementValuePairList = 122, RULE_elementValuePair = 123, RULE_elementValue = 124,
+ RULE_elementValueArrayInitializer = 125, RULE_elementValueList = 126,
+ RULE_markerAnnotation = 127, RULE_singleElementAnnotation = 128, RULE_arrayInitializer = 129,
+ RULE_variableInitializerList = 130, RULE_block = 131, RULE_blockStatements = 132,
+ RULE_blockStatement = 133, RULE_localVariableDeclarationStatement = 134,
+ RULE_localVariableDeclaration = 135, RULE_statement = 136, RULE_statementNoShortIf = 137,
+ RULE_statementWithoutTrailingSubstatement = 138, RULE_emptyStatement = 139,
+ RULE_labeledStatement = 140, RULE_labeledStatementNoShortIf = 141, RULE_expressionStatement = 142,
+ RULE_statementExpression = 143, RULE_ifThenStatement = 144, RULE_ifThenElseStatement = 145,
+ RULE_ifThenElseStatementNoShortIf = 146, RULE_assertStatement = 147, RULE_switchStatement = 148,
+ RULE_switchBlock = 149, RULE_switchBlockStatementGroup = 150, RULE_switchLabels = 151,
+ RULE_switchLabel = 152, RULE_enumConstantName = 153, RULE_whileStatement = 154,
+ RULE_whileStatementNoShortIf = 155, RULE_doStatement = 156, RULE_forStatement = 157,
+ RULE_forStatementNoShortIf = 158, RULE_basicForStatement = 159, RULE_basicForStatementNoShortIf = 160,
+ RULE_forInit = 161, RULE_forUpdate = 162, RULE_statementExpressionList = 163,
+ RULE_enhancedForStatement = 164, RULE_enhancedForStatementNoShortIf = 165,
+ RULE_breakStatement = 166, RULE_continueStatement = 167, RULE_returnStatement = 168,
+ RULE_throwStatement = 169, RULE_synchronizedStatement = 170, RULE_tryStatement = 171,
+ RULE_catches = 172, RULE_catchClause = 173, RULE_catchFormalParameter = 174,
+ RULE_catchType = 175, RULE_finally_ = 176, RULE_tryWithResourcesStatement = 177,
+ RULE_resourceSpecification = 178, RULE_resourceList = 179, RULE_resource = 180,
+ RULE_variableAccess = 181, RULE_primary = 182, RULE_primaryNoNewArray = 183,
+ RULE_primaryNoNewArray_lf_arrayAccess = 184, RULE_primaryNoNewArray_lfno_arrayAccess = 185,
+ RULE_primaryNoNewArray_lf_primary = 186, RULE_primaryNoNewArray_lf_primary_lf_arrayAccess_lf_primary = 187,
+ RULE_primaryNoNewArray_lf_primary_lfno_arrayAccess_lf_primary = 188, RULE_primaryNoNewArray_lfno_primary = 189,
+ RULE_primaryNoNewArray_lfno_primary_lf_arrayAccess_lfno_primary = 190,
+ RULE_primaryNoNewArray_lfno_primary_lfno_arrayAccess_lfno_primary = 191,
+ RULE_classLiteral = 192, RULE_classInstanceCreationExpression = 193, RULE_classInstanceCreationExpression_lf_primary = 194,
+ RULE_classInstanceCreationExpression_lfno_primary = 195, RULE_typeArgumentsOrDiamond = 196,
+ RULE_fieldAccess = 197, RULE_fieldAccess_lf_primary = 198, RULE_fieldAccess_lfno_primary = 199,
+ RULE_arrayAccess = 200, RULE_arrayAccess_lf_primary = 201, RULE_arrayAccess_lfno_primary = 202,
+ RULE_methodInvocation = 203, RULE_methodInvocation_lf_primary = 204, RULE_methodInvocation_lfno_primary = 205,
+ RULE_argumentList = 206, RULE_methodReference = 207, RULE_methodReference_lf_primary = 208,
+ RULE_methodReference_lfno_primary = 209, RULE_arrayCreationExpression = 210,
+ RULE_dimExprs = 211, RULE_dimExpr = 212, RULE_constantExpression = 213,
+ RULE_expression = 214, RULE_lambdaExpression = 215, RULE_lambdaParameters = 216,
+ RULE_inferredFormalParameterList = 217, RULE_lambdaBody = 218, RULE_assignmentExpression = 219,
+ RULE_assignment = 220, RULE_leftHandSide = 221, RULE_assignmentOperator = 222,
+ RULE_conditionalExpression = 223, RULE_conditionalOrExpression = 224,
+ RULE_conditionalAndExpression = 225, RULE_inclusiveOrExpression = 226,
+ RULE_exclusiveOrExpression = 227, RULE_andExpression = 228, RULE_equalityExpression = 229,
+ RULE_relationalExpression = 230, RULE_shiftExpression = 231, RULE_additiveExpression = 232,
+ RULE_multiplicativeExpression = 233, RULE_unaryExpression = 234, RULE_preIncrementExpression = 235,
+ RULE_preDecrementExpression = 236, RULE_unaryExpressionNotPlusMinus = 237,
+ RULE_postfixExpression = 238, RULE_postIncrementExpression = 239, RULE_postIncrementExpression_lf_postfixExpression = 240,
+ RULE_postDecrementExpression = 241, RULE_postDecrementExpression_lf_postfixExpression = 242,
+ RULE_castExpression = 243, RULE_identifier = 244;
+ public static readonly string[] ruleNames = {
+ "literal", "primitiveType", "numericType", "integralType", "floatingPointType",
+ "referenceType", "classOrInterfaceType", "classType", "classType_lf_classOrInterfaceType",
+ "classType_lfno_classOrInterfaceType", "interfaceType", "interfaceType_lf_classOrInterfaceType",
+ "interfaceType_lfno_classOrInterfaceType", "typeVariable", "arrayType",
+ "dims", "typeParameter", "typeParameterModifier", "typeBound", "additionalBound",
+ "typeArguments", "typeArgumentList", "typeArgument", "wildcard", "wildcardBounds",
+ "moduleName", "packageName", "typeName", "packageOrTypeName", "expressionName",
+ "methodName", "ambiguousName", "compilationUnit", "ordinaryCompilation",
+ "modularCompilation", "packageDeclaration", "packageModifier", "importDeclaration",
+ "singleTypeImportDeclaration", "typeImportOnDemandDeclaration", "singleStaticImportDeclaration",
+ "staticImportOnDemandDeclaration", "typeDeclaration", "moduleDeclaration",
+ "moduleDirective", "requiresModifier", "classDeclaration", "normalClassDeclaration",
+ "classModifier", "typeParameters", "typeParameterList", "superclass",
+ "superinterfaces", "interfaceTypeList", "classBody", "classBodyDeclaration",
+ "classMemberDeclaration", "fieldDeclaration", "fieldModifier", "variableDeclaratorList",
+ "variableDeclarator", "variableDeclaratorId", "variableInitializer", "unannType",
+ "unannPrimitiveType", "unannReferenceType", "unannClassOrInterfaceType",
+ "unannClassType", "unannClassType_lf_unannClassOrInterfaceType", "unannClassType_lfno_unannClassOrInterfaceType",
+ "unannInterfaceType", "unannInterfaceType_lf_unannClassOrInterfaceType",
+ "unannInterfaceType_lfno_unannClassOrInterfaceType", "unannTypeVariable",
+ "unannArrayType", "methodDeclaration", "methodModifier", "methodHeader",
+ "result", "methodDeclarator", "formalParameterList", "formalParameters",
+ "formalParameter", "variableModifier", "lastFormalParameter", "receiverParameter",
+ "throws_", "exceptionTypeList", "exceptionType", "methodBody", "instanceInitializer",
+ "staticInitializer", "constructorDeclaration", "constructorModifier",
+ "constructorDeclarator", "simpleTypeName", "constructorBody", "explicitConstructorInvocation",
+ "enumDeclaration", "enumBody", "enumConstantList", "enumConstant", "enumConstantModifier",
+ "enumBodyDeclarations", "interfaceDeclaration", "normalInterfaceDeclaration",
+ "interfaceModifier", "extendsInterfaces", "interfaceBody", "interfaceMemberDeclaration",
+ "constantDeclaration", "constantModifier", "interfaceMethodDeclaration",
+ "interfaceMethodModifier", "annotationTypeDeclaration", "annotationTypeBody",
+ "annotationTypeMemberDeclaration", "annotationTypeElementDeclaration",
+ "annotationTypeElementModifier", "defaultValue", "annotation", "normalAnnotation",
+ "elementValuePairList", "elementValuePair", "elementValue", "elementValueArrayInitializer",
+ "elementValueList", "markerAnnotation", "singleElementAnnotation", "arrayInitializer",
+ "variableInitializerList", "block", "blockStatements", "blockStatement",
+ "localVariableDeclarationStatement", "localVariableDeclaration", "statement",
+ "statementNoShortIf", "statementWithoutTrailingSubstatement", "emptyStatement",
+ "labeledStatement", "labeledStatementNoShortIf", "expressionStatement",
+ "statementExpression", "ifThenStatement", "ifThenElseStatement", "ifThenElseStatementNoShortIf",
+ "assertStatement", "switchStatement", "switchBlock", "switchBlockStatementGroup",
+ "switchLabels", "switchLabel", "enumConstantName", "whileStatement", "whileStatementNoShortIf",
+ "doStatement", "forStatement", "forStatementNoShortIf", "basicForStatement",
+ "basicForStatementNoShortIf", "forInit", "forUpdate", "statementExpressionList",
+ "enhancedForStatement", "enhancedForStatementNoShortIf", "breakStatement",
+ "continueStatement", "returnStatement", "throwStatement", "synchronizedStatement",
+ "tryStatement", "catches", "catchClause", "catchFormalParameter", "catchType",
+ "finally_", "tryWithResourcesStatement", "resourceSpecification", "resourceList",
+ "resource", "variableAccess", "primary", "primaryNoNewArray", "primaryNoNewArray_lf_arrayAccess",
+ "primaryNoNewArray_lfno_arrayAccess", "primaryNoNewArray_lf_primary",
+ "primaryNoNewArray_lf_primary_lf_arrayAccess_lf_primary", "primaryNoNewArray_lf_primary_lfno_arrayAccess_lf_primary",
+ "primaryNoNewArray_lfno_primary", "primaryNoNewArray_lfno_primary_lf_arrayAccess_lfno_primary",
+ "primaryNoNewArray_lfno_primary_lfno_arrayAccess_lfno_primary", "classLiteral",
+ "classInstanceCreationExpression", "classInstanceCreationExpression_lf_primary",
+ "classInstanceCreationExpression_lfno_primary", "typeArgumentsOrDiamond",
+ "fieldAccess", "fieldAccess_lf_primary", "fieldAccess_lfno_primary", "arrayAccess",
+ "arrayAccess_lf_primary", "arrayAccess_lfno_primary", "methodInvocation",
+ "methodInvocation_lf_primary", "methodInvocation_lfno_primary", "argumentList",
+ "methodReference", "methodReference_lf_primary", "methodReference_lfno_primary",
+ "arrayCreationExpression", "dimExprs", "dimExpr", "constantExpression",
+ "expression", "lambdaExpression", "lambdaParameters", "inferredFormalParameterList",
+ "lambdaBody", "assignmentExpression", "assignment", "leftHandSide", "assignmentOperator",
+ "conditionalExpression", "conditionalOrExpression", "conditionalAndExpression",
+ "inclusiveOrExpression", "exclusiveOrExpression", "andExpression", "equalityExpression",
+ "relationalExpression", "shiftExpression", "additiveExpression", "multiplicativeExpression",
+ "unaryExpression", "preIncrementExpression", "preDecrementExpression",
+ "unaryExpressionNotPlusMinus", "postfixExpression", "postIncrementExpression",
+ "postIncrementExpression_lf_postfixExpression", "postDecrementExpression",
+ "postDecrementExpression_lf_postfixExpression", "castExpression", "identifier"
+ };
+
+ private static readonly string[] _LiteralNames = {
+ null, "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'", "'case'",
+ "'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'",
+ "'do'", "'double'", "'else'", "'enum'", "'exports'", "'extends'", "'final'",
+ "'finally'", "'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'",
+ "'instanceof'", "'int'", "'interface'", "'long'", "'module'", "'native'",
+ "'new'", "'open'", "'opens'", "'package'", "'private'", "'protected'",
+ "'provides'", "'public'", "'requires'", "'return'", "'short'", "'static'",
+ "'strictfp'", "'super'", "'switch'", "'synchronized'", "'this'", "'throw'",
+ "'throws'", "'to'", "'transient'", "'transitive'", "'try'", "'uses'",
+ "'void'", "'volatile'", "'while'", "'with'", "'_'", null, null, null,
+ null, null, "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'",
+ "','", "'.'", "'...'", "'@'", "'::'", "'='", "'>'", "'<'", "'!'", "'~'",
+ "'?'", "':'", "'->'", "'=='", "'<='", "'>='", "'!='", "'&&'", "'||'",
+ "'++'", "'--'", "'+'", "'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'",
+ "'+='", "'-='", "'*='", "'/='", "'&='", "'|='", "'^='", "'%='", "'<<='",
+ "'>>='", "'>>>='"
+ };
+ private static readonly string[] _SymbolicNames = {
+ null, "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH",
+ "CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE",
+ "ENUM", "EXPORTS", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF",
+ "GOTO", "IMPLEMENTS", "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG",
+ "MODULE", "NATIVE", "NEW", "OPEN", "OPENS", "PACKAGE", "PRIVATE", "PROTECTED",
+ "PROVIDES", "PUBLIC", "REQUIRES", "RETURN", "SHORT", "STATIC", "STRICTFP",
+ "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TO", "TRANSIENT",
+ "TRANSITIVE", "TRY", "USES", "VOID", "VOLATILE", "WHILE", "WITH", "UNDER_SCORE",
+ "IntegerLiteral", "FloatingPointLiteral", "BooleanLiteral", "CharacterLiteral",
+ "StringLiteral", "NullLiteral", "LPAREN", "RPAREN", "LBRACE", "RBRACE",
+ "LBRACK", "RBRACK", "SEMI", "COMMA", "DOT", "ELLIPSIS", "AT", "COLONCOLON",
+ "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", "COLON", "ARROW", "EQUAL",
+ "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", "SUB", "MUL",
+ "DIV", "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", "SUB_ASSIGN",
+ "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN",
+ "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "Identifier", "WS",
+ "COMMENT", "LINE_COMMENT"
+ };
+ public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames);
+
+ [NotNull]
+ public override IVocabulary Vocabulary
+ {
+ get
+ {
+ return DefaultVocabulary;
+ }
+ }
+
+ public override string GrammarFileName { get { return "Java9Parser.g4"; } }
+
+ public override string[] RuleNames { get { return ruleNames; } }
+
+ public override string SerializedAtn { get { return new string(_serializedATN); } }
+
+ static Java9Parser() {
+ decisionToDFA = new DFA[_ATN.NumberOfDecisions];
+ for (int i = 0; i < _ATN.NumberOfDecisions; i++) {
+ decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i);
+ }
+ }
+
+ public Java9Parser(ITokenStream input) : this(input, Console.Out, Console.Error) { }
+
+ public Java9Parser(ITokenStream input, TextWriter output, TextWriter errorOutput)
+ : base(input, output, errorOutput)
+ {
+ Interpreter = new ParserATNSimulator(this, _ATN, decisionToDFA, sharedContextCache);
+ }
+
+ public partial class LiteralContext : ParserRuleContext {
+ public ITerminalNode IntegerLiteral() { return GetToken(Java9Parser.IntegerLiteral, 0); }
+ public ITerminalNode FloatingPointLiteral() { return GetToken(Java9Parser.FloatingPointLiteral, 0); }
+ public ITerminalNode BooleanLiteral() { return GetToken(Java9Parser.BooleanLiteral, 0); }
+ public ITerminalNode CharacterLiteral() { return GetToken(Java9Parser.CharacterLiteral, 0); }
+ public ITerminalNode StringLiteral() { return GetToken(Java9Parser.StringLiteral, 0); }
+ public ITerminalNode NullLiteral() { return GetToken(Java9Parser.NullLiteral, 0); }
+ public LiteralContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_literal; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterLiteral(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitLiteral(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitLiteral(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public LiteralContext literal() {
+ LiteralContext _localctx = new LiteralContext(Context, State);
+ EnterRule(_localctx, 0, RULE_literal);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 490;
+ _la = TokenStream.LA(1);
+ if ( !(((((_la - 62)) & ~0x3f) == 0 && ((1L << (_la - 62)) & ((1L << (IntegerLiteral - 62)) | (1L << (FloatingPointLiteral - 62)) | (1L << (BooleanLiteral - 62)) | (1L << (CharacterLiteral - 62)) | (1L << (StringLiteral - 62)) | (1L << (NullLiteral - 62)))) != 0)) ) {
+ ErrorHandler.RecoverInline(this);
+ }
+ else {
+ ErrorHandler.ReportMatch(this);
+ Consume();
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class PrimitiveTypeContext : ParserRuleContext {
+ public NumericTypeContext numericType() {
+ return GetRuleContext(0);
+ }
+ public AnnotationContext[] annotation() {
+ return GetRuleContexts();
+ }
+ public AnnotationContext annotation(int i) {
+ return GetRuleContext(i);
+ }
+ public ITerminalNode BOOLEAN() { return GetToken(Java9Parser.BOOLEAN, 0); }
+ public PrimitiveTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_primitiveType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterPrimitiveType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitPrimitiveType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitPrimitiveType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public PrimitiveTypeContext primitiveType() {
+ PrimitiveTypeContext _localctx = new PrimitiveTypeContext(Context, State);
+ EnterRule(_localctx, 2, RULE_primitiveType);
+ int _la;
+ try {
+ State = 506;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,2,Context) ) {
+ case 1:
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 495;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 492; annotation();
+ }
+ }
+ State = 497;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 498; numericType();
+ }
+ break;
+ case 2:
+ EnterOuterAlt(_localctx, 2);
+ {
+ State = 502;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 499; annotation();
+ }
+ }
+ State = 504;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 505; Match(BOOLEAN);
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class NumericTypeContext : ParserRuleContext {
+ public IntegralTypeContext integralType() {
+ return GetRuleContext(0);
+ }
+ public FloatingPointTypeContext floatingPointType() {
+ return GetRuleContext(0);
+ }
+ public NumericTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_numericType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterNumericType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitNumericType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitNumericType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public NumericTypeContext numericType() {
+ NumericTypeContext _localctx = new NumericTypeContext(Context, State);
+ EnterRule(_localctx, 4, RULE_numericType);
+ try {
+ State = 510;
+ ErrorHandler.Sync(this);
+ switch (TokenStream.LA(1)) {
+ case BYTE:
+ case CHAR:
+ case INT:
+ case LONG:
+ case SHORT:
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 508; integralType();
+ }
+ break;
+ case DOUBLE:
+ case FLOAT:
+ EnterOuterAlt(_localctx, 2);
+ {
+ State = 509; floatingPointType();
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class IntegralTypeContext : ParserRuleContext {
+ public ITerminalNode BYTE() { return GetToken(Java9Parser.BYTE, 0); }
+ public ITerminalNode SHORT() { return GetToken(Java9Parser.SHORT, 0); }
+ public ITerminalNode INT() { return GetToken(Java9Parser.INT, 0); }
+ public ITerminalNode LONG() { return GetToken(Java9Parser.LONG, 0); }
+ public ITerminalNode CHAR() { return GetToken(Java9Parser.CHAR, 0); }
+ public IntegralTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_integralType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterIntegralType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitIntegralType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitIntegralType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public IntegralTypeContext integralType() {
+ IntegralTypeContext _localctx = new IntegralTypeContext(Context, State);
+ EnterRule(_localctx, 6, RULE_integralType);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 512;
+ _la = TokenStream.LA(1);
+ if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BYTE) | (1L << CHAR) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0)) ) {
+ ErrorHandler.RecoverInline(this);
+ }
+ else {
+ ErrorHandler.ReportMatch(this);
+ Consume();
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class FloatingPointTypeContext : ParserRuleContext {
+ public ITerminalNode FLOAT() { return GetToken(Java9Parser.FLOAT, 0); }
+ public ITerminalNode DOUBLE() { return GetToken(Java9Parser.DOUBLE, 0); }
+ public FloatingPointTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_floatingPointType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterFloatingPointType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitFloatingPointType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitFloatingPointType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public FloatingPointTypeContext floatingPointType() {
+ FloatingPointTypeContext _localctx = new FloatingPointTypeContext(Context, State);
+ EnterRule(_localctx, 8, RULE_floatingPointType);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 514;
+ _la = TokenStream.LA(1);
+ if ( !(_la==DOUBLE || _la==FLOAT) ) {
+ ErrorHandler.RecoverInline(this);
+ }
+ else {
+ ErrorHandler.ReportMatch(this);
+ Consume();
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class ReferenceTypeContext : ParserRuleContext {
+ public ClassOrInterfaceTypeContext classOrInterfaceType() {
+ return GetRuleContext(0);
+ }
+ public TypeVariableContext typeVariable() {
+ return GetRuleContext(0);
+ }
+ public ArrayTypeContext arrayType() {
+ return GetRuleContext(0);
+ }
+ public ReferenceTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_referenceType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterReferenceType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitReferenceType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitReferenceType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public ReferenceTypeContext referenceType() {
+ ReferenceTypeContext _localctx = new ReferenceTypeContext(Context, State);
+ EnterRule(_localctx, 10, RULE_referenceType);
+ try {
+ State = 519;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,4,Context) ) {
+ case 1:
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 516; classOrInterfaceType();
+ }
+ break;
+ case 2:
+ EnterOuterAlt(_localctx, 2);
+ {
+ State = 517; typeVariable();
+ }
+ break;
+ case 3:
+ EnterOuterAlt(_localctx, 3);
+ {
+ State = 518; arrayType();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class ClassOrInterfaceTypeContext : ParserRuleContext {
+ public ClassType_lfno_classOrInterfaceTypeContext classType_lfno_classOrInterfaceType() {
+ return GetRuleContext(0);
+ }
+ public InterfaceType_lfno_classOrInterfaceTypeContext interfaceType_lfno_classOrInterfaceType() {
+ return GetRuleContext(0);
+ }
+ public ClassType_lf_classOrInterfaceTypeContext[] classType_lf_classOrInterfaceType() {
+ return GetRuleContexts();
+ }
+ public ClassType_lf_classOrInterfaceTypeContext classType_lf_classOrInterfaceType(int i) {
+ return GetRuleContext(i);
+ }
+ public InterfaceType_lf_classOrInterfaceTypeContext[] interfaceType_lf_classOrInterfaceType() {
+ return GetRuleContexts();
+ }
+ public InterfaceType_lf_classOrInterfaceTypeContext interfaceType_lf_classOrInterfaceType(int i) {
+ return GetRuleContext(i);
+ }
+ public ClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_classOrInterfaceType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterClassOrInterfaceType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitClassOrInterfaceType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitClassOrInterfaceType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public ClassOrInterfaceTypeContext classOrInterfaceType() {
+ ClassOrInterfaceTypeContext _localctx = new ClassOrInterfaceTypeContext(Context, State);
+ EnterRule(_localctx, 12, RULE_classOrInterfaceType);
+ try {
+ int _alt;
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 523;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,5,Context) ) {
+ case 1:
+ {
+ State = 521; classType_lfno_classOrInterfaceType();
+ }
+ break;
+ case 2:
+ {
+ State = 522; interfaceType_lfno_classOrInterfaceType();
+ }
+ break;
+ }
+ State = 529;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,7,Context);
+ while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ {
+ State = 527;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,6,Context) ) {
+ case 1:
+ {
+ State = 525; classType_lf_classOrInterfaceType();
+ }
+ break;
+ case 2:
+ {
+ State = 526; interfaceType_lf_classOrInterfaceType();
+ }
+ break;
+ }
+ }
+ }
+ State = 531;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,7,Context);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class ClassTypeContext : ParserRuleContext {
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public AnnotationContext[] annotation() {
+ return GetRuleContexts();
+ }
+ public AnnotationContext annotation(int i) {
+ return GetRuleContext(i);
+ }
+ public TypeArgumentsContext typeArguments() {
+ return GetRuleContext(0);
+ }
+ public ClassOrInterfaceTypeContext classOrInterfaceType() {
+ return GetRuleContext(0);
+ }
+ public ITerminalNode DOT() { return GetToken(Java9Parser.DOT, 0); }
+ public ClassTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_classType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterClassType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitClassType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitClassType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public ClassTypeContext classType() {
+ ClassTypeContext _localctx = new ClassTypeContext(Context, State);
+ EnterRule(_localctx, 14, RULE_classType);
+ int _la;
+ try {
+ State = 554;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,12,Context) ) {
+ case 1:
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 535;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 532; annotation();
+ }
+ }
+ State = 537;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 538; identifier();
+ State = 540;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ if (_la==LT) {
+ {
+ State = 539; typeArguments();
+ }
+ }
+
+ }
+ break;
+ case 2:
+ EnterOuterAlt(_localctx, 2);
+ {
+ State = 542; classOrInterfaceType();
+ State = 543; Match(DOT);
+ State = 547;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 544; annotation();
+ }
+ }
+ State = 549;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 550; identifier();
+ State = 552;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ if (_la==LT) {
+ {
+ State = 551; typeArguments();
+ }
+ }
+
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class ClassType_lf_classOrInterfaceTypeContext : ParserRuleContext {
+ public ITerminalNode DOT() { return GetToken(Java9Parser.DOT, 0); }
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public AnnotationContext[] annotation() {
+ return GetRuleContexts();
+ }
+ public AnnotationContext annotation(int i) {
+ return GetRuleContext(i);
+ }
+ public TypeArgumentsContext typeArguments() {
+ return GetRuleContext(0);
+ }
+ public ClassType_lf_classOrInterfaceTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_classType_lf_classOrInterfaceType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterClassType_lf_classOrInterfaceType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitClassType_lf_classOrInterfaceType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitClassType_lf_classOrInterfaceType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public ClassType_lf_classOrInterfaceTypeContext classType_lf_classOrInterfaceType() {
+ ClassType_lf_classOrInterfaceTypeContext _localctx = new ClassType_lf_classOrInterfaceTypeContext(Context, State);
+ EnterRule(_localctx, 16, RULE_classType_lf_classOrInterfaceType);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 556; Match(DOT);
+ State = 560;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 557; annotation();
+ }
+ }
+ State = 562;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 563; identifier();
+ State = 565;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) {
+ case 1:
+ {
+ State = 564; typeArguments();
+ }
+ break;
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class ClassType_lfno_classOrInterfaceTypeContext : ParserRuleContext {
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public AnnotationContext[] annotation() {
+ return GetRuleContexts();
+ }
+ public AnnotationContext annotation(int i) {
+ return GetRuleContext(i);
+ }
+ public TypeArgumentsContext typeArguments() {
+ return GetRuleContext(0);
+ }
+ public ClassType_lfno_classOrInterfaceTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_classType_lfno_classOrInterfaceType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterClassType_lfno_classOrInterfaceType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitClassType_lfno_classOrInterfaceType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitClassType_lfno_classOrInterfaceType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public ClassType_lfno_classOrInterfaceTypeContext classType_lfno_classOrInterfaceType() {
+ ClassType_lfno_classOrInterfaceTypeContext _localctx = new ClassType_lfno_classOrInterfaceTypeContext(Context, State);
+ EnterRule(_localctx, 18, RULE_classType_lfno_classOrInterfaceType);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 570;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 567; annotation();
+ }
+ }
+ State = 572;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 573; identifier();
+ State = 575;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,16,Context) ) {
+ case 1:
+ {
+ State = 574; typeArguments();
+ }
+ break;
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class InterfaceTypeContext : ParserRuleContext {
+ public ClassTypeContext classType() {
+ return GetRuleContext(0);
+ }
+ public InterfaceTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_interfaceType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterInterfaceType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitInterfaceType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitInterfaceType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public InterfaceTypeContext interfaceType() {
+ InterfaceTypeContext _localctx = new InterfaceTypeContext(Context, State);
+ EnterRule(_localctx, 20, RULE_interfaceType);
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 577; classType();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class InterfaceType_lf_classOrInterfaceTypeContext : ParserRuleContext {
+ public ClassType_lf_classOrInterfaceTypeContext classType_lf_classOrInterfaceType() {
+ return GetRuleContext(0);
+ }
+ public InterfaceType_lf_classOrInterfaceTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_interfaceType_lf_classOrInterfaceType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterInterfaceType_lf_classOrInterfaceType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitInterfaceType_lf_classOrInterfaceType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitInterfaceType_lf_classOrInterfaceType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public InterfaceType_lf_classOrInterfaceTypeContext interfaceType_lf_classOrInterfaceType() {
+ InterfaceType_lf_classOrInterfaceTypeContext _localctx = new InterfaceType_lf_classOrInterfaceTypeContext(Context, State);
+ EnterRule(_localctx, 22, RULE_interfaceType_lf_classOrInterfaceType);
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 579; classType_lf_classOrInterfaceType();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class InterfaceType_lfno_classOrInterfaceTypeContext : ParserRuleContext {
+ public ClassType_lfno_classOrInterfaceTypeContext classType_lfno_classOrInterfaceType() {
+ return GetRuleContext(0);
+ }
+ public InterfaceType_lfno_classOrInterfaceTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_interfaceType_lfno_classOrInterfaceType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterInterfaceType_lfno_classOrInterfaceType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitInterfaceType_lfno_classOrInterfaceType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitInterfaceType_lfno_classOrInterfaceType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public InterfaceType_lfno_classOrInterfaceTypeContext interfaceType_lfno_classOrInterfaceType() {
+ InterfaceType_lfno_classOrInterfaceTypeContext _localctx = new InterfaceType_lfno_classOrInterfaceTypeContext(Context, State);
+ EnterRule(_localctx, 24, RULE_interfaceType_lfno_classOrInterfaceType);
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 581; classType_lfno_classOrInterfaceType();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class TypeVariableContext : ParserRuleContext {
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public AnnotationContext[] annotation() {
+ return GetRuleContexts();
+ }
+ public AnnotationContext annotation(int i) {
+ return GetRuleContext(i);
+ }
+ public TypeVariableContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_typeVariable; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterTypeVariable(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitTypeVariable(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitTypeVariable(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public TypeVariableContext typeVariable() {
+ TypeVariableContext _localctx = new TypeVariableContext(Context, State);
+ EnterRule(_localctx, 26, RULE_typeVariable);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 586;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 583; annotation();
+ }
+ }
+ State = 588;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 589; identifier();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class ArrayTypeContext : ParserRuleContext {
+ public PrimitiveTypeContext primitiveType() {
+ return GetRuleContext(0);
+ }
+ public DimsContext dims() {
+ return GetRuleContext(0);
+ }
+ public ClassOrInterfaceTypeContext classOrInterfaceType() {
+ return GetRuleContext(0);
+ }
+ public TypeVariableContext typeVariable() {
+ return GetRuleContext(0);
+ }
+ public ArrayTypeContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_arrayType; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterArrayType(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitArrayType(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitArrayType(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public ArrayTypeContext arrayType() {
+ ArrayTypeContext _localctx = new ArrayTypeContext(Context, State);
+ EnterRule(_localctx, 28, RULE_arrayType);
+ try {
+ State = 600;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,18,Context) ) {
+ case 1:
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 591; primitiveType();
+ State = 592; dims();
+ }
+ break;
+ case 2:
+ EnterOuterAlt(_localctx, 2);
+ {
+ State = 594; classOrInterfaceType();
+ State = 595; dims();
+ }
+ break;
+ case 3:
+ EnterOuterAlt(_localctx, 3);
+ {
+ State = 597; typeVariable();
+ State = 598; dims();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class DimsContext : ParserRuleContext {
+ public ITerminalNode[] LBRACK() { return GetTokens(Java9Parser.LBRACK); }
+ public ITerminalNode LBRACK(int i) {
+ return GetToken(Java9Parser.LBRACK, i);
+ }
+ public ITerminalNode[] RBRACK() { return GetTokens(Java9Parser.RBRACK); }
+ public ITerminalNode RBRACK(int i) {
+ return GetToken(Java9Parser.RBRACK, i);
+ }
+ public AnnotationContext[] annotation() {
+ return GetRuleContexts();
+ }
+ public AnnotationContext annotation(int i) {
+ return GetRuleContext(i);
+ }
+ public DimsContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_dims; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterDims(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitDims(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitDims(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public DimsContext dims() {
+ DimsContext _localctx = new DimsContext(Context, State);
+ EnterRule(_localctx, 30, RULE_dims);
+ int _la;
+ try {
+ int _alt;
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 605;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 602; annotation();
+ }
+ }
+ State = 607;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 608; Match(LBRACK);
+ State = 609; Match(RBRACK);
+ State = 620;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,21,Context);
+ while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ {
+ {
+ State = 613;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 610; annotation();
+ }
+ }
+ State = 615;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 616; Match(LBRACK);
+ State = 617; Match(RBRACK);
+ }
+ }
+ }
+ State = 622;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,21,Context);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class TypeParameterContext : ParserRuleContext {
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public TypeParameterModifierContext[] typeParameterModifier() {
+ return GetRuleContexts();
+ }
+ public TypeParameterModifierContext typeParameterModifier(int i) {
+ return GetRuleContext(i);
+ }
+ public TypeBoundContext typeBound() {
+ return GetRuleContext(0);
+ }
+ public TypeParameterContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_typeParameter; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterTypeParameter(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitTypeParameter(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitTypeParameter(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public TypeParameterContext typeParameter() {
+ TypeParameterContext _localctx = new TypeParameterContext(Context, State);
+ EnterRule(_localctx, 32, RULE_typeParameter);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 626;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 623; typeParameterModifier();
+ }
+ }
+ State = 628;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 629; identifier();
+ State = 631;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ if (_la==EXTENDS) {
+ {
+ State = 630; typeBound();
+ }
+ }
+
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class TypeParameterModifierContext : ParserRuleContext {
+ public AnnotationContext annotation() {
+ return GetRuleContext(0);
+ }
+ public TypeParameterModifierContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_typeParameterModifier; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterTypeParameterModifier(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitTypeParameterModifier(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitTypeParameterModifier(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public TypeParameterModifierContext typeParameterModifier() {
+ TypeParameterModifierContext _localctx = new TypeParameterModifierContext(Context, State);
+ EnterRule(_localctx, 34, RULE_typeParameterModifier);
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 633; annotation();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class TypeBoundContext : ParserRuleContext {
+ public ITerminalNode EXTENDS() { return GetToken(Java9Parser.EXTENDS, 0); }
+ public TypeVariableContext typeVariable() {
+ return GetRuleContext(0);
+ }
+ public ClassOrInterfaceTypeContext classOrInterfaceType() {
+ return GetRuleContext(0);
+ }
+ public AdditionalBoundContext[] additionalBound() {
+ return GetRuleContexts();
+ }
+ public AdditionalBoundContext additionalBound(int i) {
+ return GetRuleContext(i);
+ }
+ public TypeBoundContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_typeBound; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterTypeBound(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitTypeBound(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitTypeBound(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public TypeBoundContext typeBound() {
+ TypeBoundContext _localctx = new TypeBoundContext(Context, State);
+ EnterRule(_localctx, 36, RULE_typeBound);
+ int _la;
+ try {
+ State = 645;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,25,Context) ) {
+ case 1:
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 635; Match(EXTENDS);
+ State = 636; typeVariable();
+ }
+ break;
+ case 2:
+ EnterOuterAlt(_localctx, 2);
+ {
+ State = 637; Match(EXTENDS);
+ State = 638; classOrInterfaceType();
+ State = 642;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==BITAND) {
+ {
+ {
+ State = 639; additionalBound();
+ }
+ }
+ State = 644;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class AdditionalBoundContext : ParserRuleContext {
+ public ITerminalNode BITAND() { return GetToken(Java9Parser.BITAND, 0); }
+ public InterfaceTypeContext interfaceType() {
+ return GetRuleContext(0);
+ }
+ public AdditionalBoundContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_additionalBound; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterAdditionalBound(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitAdditionalBound(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitAdditionalBound(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public AdditionalBoundContext additionalBound() {
+ AdditionalBoundContext _localctx = new AdditionalBoundContext(Context, State);
+ EnterRule(_localctx, 38, RULE_additionalBound);
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 647; Match(BITAND);
+ State = 648; interfaceType();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class TypeArgumentsContext : ParserRuleContext {
+ public ITerminalNode LT() { return GetToken(Java9Parser.LT, 0); }
+ public TypeArgumentListContext typeArgumentList() {
+ return GetRuleContext(0);
+ }
+ public ITerminalNode GT() { return GetToken(Java9Parser.GT, 0); }
+ public TypeArgumentsContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_typeArguments; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterTypeArguments(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitTypeArguments(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitTypeArguments(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public TypeArgumentsContext typeArguments() {
+ TypeArgumentsContext _localctx = new TypeArgumentsContext(Context, State);
+ EnterRule(_localctx, 40, RULE_typeArguments);
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 650; Match(LT);
+ State = 651; typeArgumentList();
+ State = 652; Match(GT);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class TypeArgumentListContext : ParserRuleContext {
+ public TypeArgumentContext[] typeArgument() {
+ return GetRuleContexts();
+ }
+ public TypeArgumentContext typeArgument(int i) {
+ return GetRuleContext(i);
+ }
+ public ITerminalNode[] COMMA() { return GetTokens(Java9Parser.COMMA); }
+ public ITerminalNode COMMA(int i) {
+ return GetToken(Java9Parser.COMMA, i);
+ }
+ public TypeArgumentListContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_typeArgumentList; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterTypeArgumentList(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitTypeArgumentList(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitTypeArgumentList(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public TypeArgumentListContext typeArgumentList() {
+ TypeArgumentListContext _localctx = new TypeArgumentListContext(Context, State);
+ EnterRule(_localctx, 42, RULE_typeArgumentList);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 654; typeArgument();
+ State = 659;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==COMMA) {
+ {
+ {
+ State = 655; Match(COMMA);
+ State = 656; typeArgument();
+ }
+ }
+ State = 661;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class TypeArgumentContext : ParserRuleContext {
+ public ReferenceTypeContext referenceType() {
+ return GetRuleContext(0);
+ }
+ public WildcardContext wildcard() {
+ return GetRuleContext(0);
+ }
+ public TypeArgumentContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_typeArgument; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterTypeArgument(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitTypeArgument(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitTypeArgument(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public TypeArgumentContext typeArgument() {
+ TypeArgumentContext _localctx = new TypeArgumentContext(Context, State);
+ EnterRule(_localctx, 44, RULE_typeArgument);
+ try {
+ State = 664;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,27,Context) ) {
+ case 1:
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 662; referenceType();
+ }
+ break;
+ case 2:
+ EnterOuterAlt(_localctx, 2);
+ {
+ State = 663; wildcard();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class WildcardContext : ParserRuleContext {
+ public ITerminalNode QUESTION() { return GetToken(Java9Parser.QUESTION, 0); }
+ public AnnotationContext[] annotation() {
+ return GetRuleContexts();
+ }
+ public AnnotationContext annotation(int i) {
+ return GetRuleContext(i);
+ }
+ public WildcardBoundsContext wildcardBounds() {
+ return GetRuleContext(0);
+ }
+ public WildcardContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_wildcard; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterWildcard(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitWildcard(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitWildcard(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public WildcardContext wildcard() {
+ WildcardContext _localctx = new WildcardContext(Context, State);
+ EnterRule(_localctx, 46, RULE_wildcard);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 669;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 666; annotation();
+ }
+ }
+ State = 671;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 672; Match(QUESTION);
+ State = 674;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ if (_la==EXTENDS || _la==SUPER) {
+ {
+ State = 673; wildcardBounds();
+ }
+ }
+
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class WildcardBoundsContext : ParserRuleContext {
+ public ITerminalNode EXTENDS() { return GetToken(Java9Parser.EXTENDS, 0); }
+ public ReferenceTypeContext referenceType() {
+ return GetRuleContext(0);
+ }
+ public ITerminalNode SUPER() { return GetToken(Java9Parser.SUPER, 0); }
+ public WildcardBoundsContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_wildcardBounds; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterWildcardBounds(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitWildcardBounds(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitWildcardBounds(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public WildcardBoundsContext wildcardBounds() {
+ WildcardBoundsContext _localctx = new WildcardBoundsContext(Context, State);
+ EnterRule(_localctx, 48, RULE_wildcardBounds);
+ try {
+ State = 680;
+ ErrorHandler.Sync(this);
+ switch (TokenStream.LA(1)) {
+ case EXTENDS:
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 676; Match(EXTENDS);
+ State = 677; referenceType();
+ }
+ break;
+ case SUPER:
+ EnterOuterAlt(_localctx, 2);
+ {
+ State = 678; Match(SUPER);
+ State = 679; referenceType();
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class ModuleNameContext : ParserRuleContext {
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public ModuleNameContext moduleName() {
+ return GetRuleContext(0);
+ }
+ public ITerminalNode DOT() { return GetToken(Java9Parser.DOT, 0); }
+ public ModuleNameContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_moduleName; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterModuleName(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitModuleName(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitModuleName(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public ModuleNameContext moduleName() {
+ return moduleName(0);
+ }
+
+ private ModuleNameContext moduleName(int _p) {
+ ParserRuleContext _parentctx = Context;
+ int _parentState = State;
+ ModuleNameContext _localctx = new ModuleNameContext(Context, _parentState);
+ ModuleNameContext _prevctx = _localctx;
+ int _startState = 50;
+ EnterRecursionRule(_localctx, 50, RULE_moduleName, _p);
+ try {
+ int _alt;
+ EnterOuterAlt(_localctx, 1);
+ {
+ {
+ State = 683; identifier();
+ }
+ Context.Stop = TokenStream.LT(-1);
+ State = 690;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,31,Context);
+ while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ if ( ParseListeners!=null )
+ TriggerExitRuleEvent();
+ _prevctx = _localctx;
+ {
+ {
+ _localctx = new ModuleNameContext(_parentctx, _parentState);
+ PushNewRecursionContext(_localctx, _startState, RULE_moduleName);
+ State = 685;
+ if (!(Precpred(Context, 1))) throw new FailedPredicateException(this, "Precpred(Context, 1)");
+ State = 686; Match(DOT);
+ State = 687; identifier();
+ }
+ }
+ }
+ State = 692;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,31,Context);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ UnrollRecursionContexts(_parentctx);
+ }
+ return _localctx;
+ }
+
+ public partial class PackageNameContext : ParserRuleContext {
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public PackageNameContext packageName() {
+ return GetRuleContext(0);
+ }
+ public ITerminalNode DOT() { return GetToken(Java9Parser.DOT, 0); }
+ public PackageNameContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_packageName; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterPackageName(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitPackageName(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitPackageName(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public PackageNameContext packageName() {
+ return packageName(0);
+ }
+
+ private PackageNameContext packageName(int _p) {
+ ParserRuleContext _parentctx = Context;
+ int _parentState = State;
+ PackageNameContext _localctx = new PackageNameContext(Context, _parentState);
+ PackageNameContext _prevctx = _localctx;
+ int _startState = 52;
+ EnterRecursionRule(_localctx, 52, RULE_packageName, _p);
+ try {
+ int _alt;
+ EnterOuterAlt(_localctx, 1);
+ {
+ {
+ State = 694; identifier();
+ }
+ Context.Stop = TokenStream.LT(-1);
+ State = 701;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,32,Context);
+ while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ if ( ParseListeners!=null )
+ TriggerExitRuleEvent();
+ _prevctx = _localctx;
+ {
+ {
+ _localctx = new PackageNameContext(_parentctx, _parentState);
+ PushNewRecursionContext(_localctx, _startState, RULE_packageName);
+ State = 696;
+ if (!(Precpred(Context, 1))) throw new FailedPredicateException(this, "Precpred(Context, 1)");
+ State = 697; Match(DOT);
+ State = 698; identifier();
+ }
+ }
+ }
+ State = 703;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,32,Context);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ UnrollRecursionContexts(_parentctx);
+ }
+ return _localctx;
+ }
+
+ public partial class TypeNameContext : ParserRuleContext {
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public PackageOrTypeNameContext packageOrTypeName() {
+ return GetRuleContext(0);
+ }
+ public ITerminalNode DOT() { return GetToken(Java9Parser.DOT, 0); }
+ public TypeNameContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_typeName; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterTypeName(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitTypeName(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitTypeName(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public TypeNameContext typeName() {
+ TypeNameContext _localctx = new TypeNameContext(Context, State);
+ EnterRule(_localctx, 54, RULE_typeName);
+ try {
+ State = 709;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,33,Context) ) {
+ case 1:
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 704; identifier();
+ }
+ break;
+ case 2:
+ EnterOuterAlt(_localctx, 2);
+ {
+ State = 705; packageOrTypeName(0);
+ State = 706; Match(DOT);
+ State = 707; identifier();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class PackageOrTypeNameContext : ParserRuleContext {
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public PackageOrTypeNameContext packageOrTypeName() {
+ return GetRuleContext(0);
+ }
+ public ITerminalNode DOT() { return GetToken(Java9Parser.DOT, 0); }
+ public PackageOrTypeNameContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_packageOrTypeName; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterPackageOrTypeName(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitPackageOrTypeName(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitPackageOrTypeName(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public PackageOrTypeNameContext packageOrTypeName() {
+ return packageOrTypeName(0);
+ }
+
+ private PackageOrTypeNameContext packageOrTypeName(int _p) {
+ ParserRuleContext _parentctx = Context;
+ int _parentState = State;
+ PackageOrTypeNameContext _localctx = new PackageOrTypeNameContext(Context, _parentState);
+ PackageOrTypeNameContext _prevctx = _localctx;
+ int _startState = 56;
+ EnterRecursionRule(_localctx, 56, RULE_packageOrTypeName, _p);
+ try {
+ int _alt;
+ EnterOuterAlt(_localctx, 1);
+ {
+ {
+ State = 712; identifier();
+ }
+ Context.Stop = TokenStream.LT(-1);
+ State = 719;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,34,Context);
+ while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ if ( ParseListeners!=null )
+ TriggerExitRuleEvent();
+ _prevctx = _localctx;
+ {
+ {
+ _localctx = new PackageOrTypeNameContext(_parentctx, _parentState);
+ PushNewRecursionContext(_localctx, _startState, RULE_packageOrTypeName);
+ State = 714;
+ if (!(Precpred(Context, 1))) throw new FailedPredicateException(this, "Precpred(Context, 1)");
+ State = 715; Match(DOT);
+ State = 716; identifier();
+ }
+ }
+ }
+ State = 721;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,34,Context);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ UnrollRecursionContexts(_parentctx);
+ }
+ return _localctx;
+ }
+
+ public partial class ExpressionNameContext : ParserRuleContext {
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public AmbiguousNameContext ambiguousName() {
+ return GetRuleContext(0);
+ }
+ public ITerminalNode DOT() { return GetToken(Java9Parser.DOT, 0); }
+ public ExpressionNameContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_expressionName; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterExpressionName(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitExpressionName(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitExpressionName(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public ExpressionNameContext expressionName() {
+ ExpressionNameContext _localctx = new ExpressionNameContext(Context, State);
+ EnterRule(_localctx, 58, RULE_expressionName);
+ try {
+ State = 727;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,35,Context) ) {
+ case 1:
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 722; identifier();
+ }
+ break;
+ case 2:
+ EnterOuterAlt(_localctx, 2);
+ {
+ State = 723; ambiguousName(0);
+ State = 724; Match(DOT);
+ State = 725; identifier();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class MethodNameContext : ParserRuleContext {
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public MethodNameContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_methodName; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterMethodName(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitMethodName(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitMethodName(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public MethodNameContext methodName() {
+ MethodNameContext _localctx = new MethodNameContext(Context, State);
+ EnterRule(_localctx, 60, RULE_methodName);
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 729; identifier();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class AmbiguousNameContext : ParserRuleContext {
+ public IdentifierContext identifier() {
+ return GetRuleContext(0);
+ }
+ public AmbiguousNameContext ambiguousName() {
+ return GetRuleContext(0);
+ }
+ public ITerminalNode DOT() { return GetToken(Java9Parser.DOT, 0); }
+ public AmbiguousNameContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_ambiguousName; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterAmbiguousName(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitAmbiguousName(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitAmbiguousName(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public AmbiguousNameContext ambiguousName() {
+ return ambiguousName(0);
+ }
+
+ private AmbiguousNameContext ambiguousName(int _p) {
+ ParserRuleContext _parentctx = Context;
+ int _parentState = State;
+ AmbiguousNameContext _localctx = new AmbiguousNameContext(Context, _parentState);
+ AmbiguousNameContext _prevctx = _localctx;
+ int _startState = 62;
+ EnterRecursionRule(_localctx, 62, RULE_ambiguousName, _p);
+ try {
+ int _alt;
+ EnterOuterAlt(_localctx, 1);
+ {
+ {
+ State = 732; identifier();
+ }
+ Context.Stop = TokenStream.LT(-1);
+ State = 739;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,36,Context);
+ while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ if ( ParseListeners!=null )
+ TriggerExitRuleEvent();
+ _prevctx = _localctx;
+ {
+ {
+ _localctx = new AmbiguousNameContext(_parentctx, _parentState);
+ PushNewRecursionContext(_localctx, _startState, RULE_ambiguousName);
+ State = 734;
+ if (!(Precpred(Context, 1))) throw new FailedPredicateException(this, "Precpred(Context, 1)");
+ State = 735; Match(DOT);
+ State = 736; identifier();
+ }
+ }
+ }
+ State = 741;
+ ErrorHandler.Sync(this);
+ _alt = Interpreter.AdaptivePredict(TokenStream,36,Context);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ UnrollRecursionContexts(_parentctx);
+ }
+ return _localctx;
+ }
+
+ public partial class CompilationUnitContext : ParserRuleContext {
+ public OrdinaryCompilationContext ordinaryCompilation() {
+ return GetRuleContext(0);
+ }
+ public ModularCompilationContext modularCompilation() {
+ return GetRuleContext(0);
+ }
+ public CompilationUnitContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_compilationUnit; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterCompilationUnit(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitCompilationUnit(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitCompilationUnit(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public CompilationUnitContext compilationUnit() {
+ CompilationUnitContext _localctx = new CompilationUnitContext(Context, State);
+ EnterRule(_localctx, 64, RULE_compilationUnit);
+ try {
+ State = 744;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,37,Context) ) {
+ case 1:
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 742; ordinaryCompilation();
+ }
+ break;
+ case 2:
+ EnterOuterAlt(_localctx, 2);
+ {
+ State = 743; modularCompilation();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class OrdinaryCompilationContext : ParserRuleContext {
+ public ITerminalNode Eof() { return GetToken(Java9Parser.Eof, 0); }
+ public PackageDeclarationContext packageDeclaration() {
+ return GetRuleContext(0);
+ }
+ public ImportDeclarationContext[] importDeclaration() {
+ return GetRuleContexts();
+ }
+ public ImportDeclarationContext importDeclaration(int i) {
+ return GetRuleContext(i);
+ }
+ public TypeDeclarationContext[] typeDeclaration() {
+ return GetRuleContexts();
+ }
+ public TypeDeclarationContext typeDeclaration(int i) {
+ return GetRuleContext(i);
+ }
+ public OrdinaryCompilationContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_ordinaryCompilation; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterOrdinaryCompilation(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitOrdinaryCompilation(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitOrdinaryCompilation(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public OrdinaryCompilationContext ordinaryCompilation() {
+ OrdinaryCompilationContext _localctx = new OrdinaryCompilationContext(Context, State);
+ EnterRule(_localctx, 66, RULE_ordinaryCompilation);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 747;
+ ErrorHandler.Sync(this);
+ switch ( Interpreter.AdaptivePredict(TokenStream,38,Context) ) {
+ case 1:
+ {
+ State = 746; packageDeclaration();
+ }
+ break;
+ }
+ State = 752;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==IMPORT) {
+ {
+ {
+ State = 749; importDeclaration();
+ }
+ }
+ State = 754;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 758;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << CLASS) | (1L << ENUM) | (1L << FINAL) | (1L << INTERFACE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==SEMI || _la==AT) {
+ {
+ {
+ State = 755; typeDeclaration();
+ }
+ }
+ State = 760;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 761; Match(Eof);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class ModularCompilationContext : ParserRuleContext {
+ public ModuleDeclarationContext moduleDeclaration() {
+ return GetRuleContext(0);
+ }
+ public ImportDeclarationContext[] importDeclaration() {
+ return GetRuleContexts();
+ }
+ public ImportDeclarationContext importDeclaration(int i) {
+ return GetRuleContext(i);
+ }
+ public ModularCompilationContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_modularCompilation; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterModularCompilation(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitModularCompilation(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitModularCompilation(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public ModularCompilationContext modularCompilation() {
+ ModularCompilationContext _localctx = new ModularCompilationContext(Context, State);
+ EnterRule(_localctx, 68, RULE_modularCompilation);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 766;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==IMPORT) {
+ {
+ {
+ State = 763; importDeclaration();
+ }
+ }
+ State = 768;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 769; moduleDeclaration();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class PackageDeclarationContext : ParserRuleContext {
+ public ITerminalNode PACKAGE() { return GetToken(Java9Parser.PACKAGE, 0); }
+ public PackageNameContext packageName() {
+ return GetRuleContext(0);
+ }
+ public ITerminalNode SEMI() { return GetToken(Java9Parser.SEMI, 0); }
+ public PackageModifierContext[] packageModifier() {
+ return GetRuleContexts();
+ }
+ public PackageModifierContext packageModifier(int i) {
+ return GetRuleContext(i);
+ }
+ public PackageDeclarationContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_packageDeclaration; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterPackageDeclaration(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitPackageDeclaration(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor typedVisitor = visitor as IJava9ParserVisitor;
+ if (typedVisitor != null) return typedVisitor.VisitPackageDeclaration(this);
+ else return visitor.VisitChildren(this);
+ }
+ }
+
+ [RuleVersion(0)]
+ public PackageDeclarationContext packageDeclaration() {
+ PackageDeclarationContext _localctx = new PackageDeclarationContext(Context, State);
+ EnterRule(_localctx, 70, RULE_packageDeclaration);
+ int _la;
+ try {
+ EnterOuterAlt(_localctx, 1);
+ {
+ State = 774;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ while (_la==AT) {
+ {
+ {
+ State = 771; packageModifier();
+ }
+ }
+ State = 776;
+ ErrorHandler.Sync(this);
+ _la = TokenStream.LA(1);
+ }
+ State = 777; Match(PACKAGE);
+ State = 778; packageName(0);
+ State = 779; Match(SEMI);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ ErrorHandler.ReportError(this, re);
+ ErrorHandler.Recover(this, re);
+ }
+ finally {
+ ExitRule();
+ }
+ return _localctx;
+ }
+
+ public partial class PackageModifierContext : ParserRuleContext {
+ public AnnotationContext annotation() {
+ return GetRuleContext(0);
+ }
+ public PackageModifierContext(ParserRuleContext parent, int invokingState)
+ : base(parent, invokingState)
+ {
+ }
+ public override int RuleIndex { get { return RULE_packageModifier; } }
+ public override void EnterRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.EnterPackageModifier(this);
+ }
+ public override void ExitRule(IParseTreeListener listener) {
+ IJava9ParserListener typedListener = listener as IJava9ParserListener;
+ if (typedListener != null) typedListener.ExitPackageModifier(this);
+ }
+ public override TResult Accept(IParseTreeVisitor visitor) {
+ IJava9ParserVisitor