Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/upc
diff options
context:
space:
mode:
authorChris Recoskie2007-04-27 02:03:40 +0000
committerChris Recoskie2007-04-27 02:03:40 +0000
commit53b7411eebfb8d97987991447dd10aff0796039a (patch)
tree932a3ef2c3c0223bc02ff1dd5380a37e7e0056c1 /upc
parent5a24d7c682d57adf80e1fde43bf0d02d90fc53a8 (diff)
downloadorg.eclipse.cdt-53b7411eebfb8d97987991447dd10aff0796039a.tar.gz
org.eclipse.cdt-53b7411eebfb8d97987991447dd10aff0796039a.tar.xz
org.eclipse.cdt-53b7411eebfb8d97987991447dd10aff0796039a.zip
RESOLVED - bug 183848: add parser for Unified Parallel C
https://bugs.eclipse.org/bugs/show_bug.cgi?id=183848 Patch from Mike Kucera
Diffstat (limited to 'upc')
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/.classpath7
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/.project34
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/META-INF/MANIFEST.MF16
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/about.html24
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/build.properties7
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/plugin.properties4
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/plugin.xml26
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCASTNodeFactory.java83
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCKeywordMap.java103
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCParserAction.java304
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java55
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTCompositeTypeSpecifier.java18
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTDeclSpecifier.java58
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTElaboratedTypeSpecifier.java18
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTEnumerationSpecifier.java18
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTForallStatement.java59
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTKeywordExpression.java28
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTLayoutQualifier.java33
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSimpleDeclSpecifier.java18
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSizeofExpression.java29
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSynchronizationStatement.java40
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypedefNameSpecifier.java18
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.g252
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.java1698
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParserprs.java2025
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParsersym.java254
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTCompositeTypeSpecifier.java78
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTElaboratedTypeSpecifier.java73
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTEnumerationSpecifier.java75
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTForallStatement.java78
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTKeywordExpression.java55
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTLayoutQualifier.java56
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSimpleDeclSpecifier.java71
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSizeofExpression.java38
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSynchronizationStatement.java64
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypedefNameSpecifier.java73
36 files changed, 5890 insertions, 0 deletions
diff --git a/upc/org.eclipse.cdt.core.parser.upc/.classpath b/upc/org.eclipse.cdt.core.parser.upc/.classpath
new file mode 100644
index 00000000000..751c8f2e504
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/upc/org.eclipse.cdt.core.parser.upc/.project b/upc/org.eclipse.cdt.core.parser.upc/.project
new file mode 100644
index 00000000000..0697e2bcbf5
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.cdt.core.parser.upc</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>net.sourceforge.metrics.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>net.sourceforge.metrics.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/upc/org.eclipse.cdt.core.parser.upc/META-INF/MANIFEST.MF b/upc/org.eclipse.cdt.core.parser.upc/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..5a5e2635ef9
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.1
+Bundle-SymbolicName: org.eclipse.cdt.core.parser.upc;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-ClassPath: .
+Require-Bundle: org.eclipse.cdt.core,
+ net.sourceforge.lpg.lpgjavaruntime;bundle-version="1.1.0";visibility:=reexport,
+ org.eclipse.core.runtime,
+ org.eclipse.cdt.core.parser.c99
+Export-Package: org.eclipse.cdt.core.dom.upc,
+ org.eclipse.cdt.core.dom.upc.ast,
+ org.eclipse.cdt.internal.core.dom.parser.upc;x-internal:=true,
+ org.eclipse.cdt.internal.core.dom.parser.upc.ast;x-internal:=true
+Bundle-Localization: plugin
+Bundle-Vendor: %Bundle-Vendor.0
diff --git a/upc/org.eclipse.cdt.core.parser.upc/about.html b/upc/org.eclipse.cdt.core.parser.upc/about.html
new file mode 100644
index 00000000000..9b669c2fd0c
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/about.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
+
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>February 8, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/upc/org.eclipse.cdt.core.parser.upc/build.properties b/upc/org.eclipse.cdt.core.parser.upc/build.properties
new file mode 100644
index 00000000000..ae22b3b40a0
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
diff --git a/upc/org.eclipse.cdt.core.parser.upc/plugin.properties b/upc/org.eclipse.cdt.core.parser.upc/plugin.properties
new file mode 100644
index 00000000000..54d815de691
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/plugin.properties
@@ -0,0 +1,4 @@
+# properties file for org.eclipse.cdt.core.parser.c99
+Bundle-Name.0 = C99 Parser Plug-in
+Bundle-Vendor.0 = Eclipse.org
+Bundle-Name.1 = C99 Parser Plug-in \ No newline at end of file
diff --git a/upc/org.eclipse.cdt.core.parser.upc/plugin.xml b/upc/org.eclipse.cdt.core.parser.upc/plugin.xml
new file mode 100644
index 00000000000..d7145fcf911
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+
+ <extension point="org.eclipse.core.runtime.contentTypes">
+ <content-type id="upcSource" name="%upcSourceName"
+ base-type="org.eclipse.cdt.core.cSource"
+ file-extensions="upc"
+ priority="high"/>
+ </extension>
+
+ <extension point="org.eclipse.cdt.core.language">
+ <language
+ class="org.eclipse.cdt.core.dom.upc.UPCLanguage"
+ id="upc"
+ name="UPC">
+ <contentType id="org.eclipse.cdt.core.parser.upc.upcSource"/>
+ </language>
+ <pdomLinkageFactory
+ class="org.eclipse.cdt.internal.core.pdom.dom.c.PDOMCLinkageFactory"
+ id="upc"/>
+ </extension>
+
+
+</plugin>
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCASTNodeFactory.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCASTNodeFactory.java
new file mode 100644
index 00000000000..a68aa347e25
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCASTNodeFactory.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.parser.upc;
+
+import org.eclipse.cdt.core.dom.ast.c.ICASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.c.ICASTElaboratedTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.c.ICASTEnumerationSpecifier;
+import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.c.ICASTTypedefNameSpecifier;
+import org.eclipse.cdt.core.dom.parser.c99.C99ASTNodeFactory;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTForallStatement;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTKeywordExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSizeofExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSynchronizationStatement;
+import org.eclipse.cdt.internal.core.dom.parser.upc.ast.UPCASTCompositeTypeSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.upc.ast.UPCASTElaboratedTypeSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.upc.ast.UPCASTEnumerationSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.upc.ast.UPCASTForallStatement;
+import org.eclipse.cdt.internal.core.dom.parser.upc.ast.UPCASTKeywordExpression;
+import org.eclipse.cdt.internal.core.dom.parser.upc.ast.UPCASTSimpleDeclSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.upc.ast.UPCASTSizeofExpression;
+import org.eclipse.cdt.internal.core.dom.parser.upc.ast.UPCASTSynchronizationStatement;
+import org.eclipse.cdt.internal.core.dom.parser.upc.ast.UPCASTTypedefNameSpecifier;
+
+
+/**
+ * Creates AST nodes that are specific to the UPC parser.
+ *
+ * The methods in ASTNodeFactory that build nodes for declaration
+ * specifiers are overridden here to replace thos nodes with the UPC nodes for
+ * declaration specifiers. These UPC specific nodes add support
+ * for 'strict', 'relaxed' and 'shared'.
+ */
+public class UPCASTNodeFactory extends C99ASTNodeFactory {
+
+ public IUPCASTKeywordExpression newKeywordExpression() {
+ return new UPCASTKeywordExpression();
+ }
+
+ public IUPCASTSizeofExpression newSizeofExpression() {
+ return new UPCASTSizeofExpression();
+ }
+
+ public IUPCASTSynchronizationStatement newSyncronizationStatment() {
+ return new UPCASTSynchronizationStatement();
+ }
+
+ public IUPCASTForallStatement newForallStatement() {
+ return new UPCASTForallStatement();
+ }
+
+ /**
+ * Override to return UPC version of decl specifier.
+ */
+ public ICASTSimpleDeclSpecifier newCSimpleDeclSpecifier() {
+ return new UPCASTSimpleDeclSpecifier();
+ }
+
+ public ICASTCompositeTypeSpecifier newCCompositeTypeSpecifier() {
+ return new UPCASTCompositeTypeSpecifier();
+ }
+
+ public ICASTElaboratedTypeSpecifier newCElaboratedTypeSpecifier() {
+ return new UPCASTElaboratedTypeSpecifier();
+ }
+
+ public ICASTEnumerationSpecifier newCEnumerationSpecifier() {
+ return new UPCASTEnumerationSpecifier();
+ }
+
+ public ICASTTypedefNameSpecifier newCTypedefNameSpecifier() {
+ return new UPCASTTypedefNameSpecifier();
+ }
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCKeywordMap.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCKeywordMap.java
new file mode 100644
index 00000000000..56502b8d788
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCKeywordMap.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.parser.upc;
+
+import org.eclipse.cdt.core.dom.parser.c99.C99KeywordMap;
+import org.eclipse.cdt.internal.core.dom.parser.upc.UPCParsersym;
+
+
+/**
+ * Provides UPC specific keywords in addition to the C99 keywords.
+ *
+ * Keyword token mappings from the superclass must be overridden.
+ *
+ * @author Mike Kucera
+ */
+public class UPCKeywordMap extends C99KeywordMap {
+
+
+ public static final String
+ MYTHREAD = "MYTHREAD",//$NON-NLS-1$
+ THREADS = "THREADS",//$NON-NLS-1$
+ UPC_MAX_BLOCKSIZE = "UPC",//$NON-NLS-1$
+ relaxed = "relaxed",//$NON-NLS-1$
+ shared = "shared",//$NON-NLS-1$
+ strict = "strict",//$NON-NLS-1$
+ upc_barrier = "upc_barrier",//$NON-NLS-1$
+ upc_localsizeof = "upc_localsizeof",//$NON-NLS-1$
+ upc_blocksizeof = "upc_blocksizeof",//$NON-NLS-1$
+ upc_elemsizeof = "upc_elemsizeof",//$NON-NLS-1$
+ upc_notify = "upc_notify",//$NON-NLS-1$
+ upc_fence = "upc_fence",//$NON-NLS-1$
+ upc_wait = "upc_wait",//$NON-NLS-1$
+ upc_forall = "upc_forall";//$NON-NLS-1$
+
+
+ public UPCKeywordMap() {
+ putKeyword(MYTHREAD, UPCParsersym.TK_MYTHREAD);
+ putKeyword(THREADS, UPCParsersym.TK_THREADS);
+ putKeyword(UPC_MAX_BLOCKSIZE, UPCParsersym.TK_UPC_MAX_BLOCKSIZE);
+ putKeyword(relaxed, UPCParsersym.TK_relaxed);
+ putKeyword(shared, UPCParsersym.TK_shared);
+ putKeyword(strict, UPCParsersym.TK_strict);
+ putKeyword(upc_barrier, UPCParsersym.TK_upc_barrier);
+ putKeyword(upc_localsizeof, UPCParsersym.TK_upc_localsizeof);
+ putKeyword(upc_blocksizeof, UPCParsersym.TK_upc_blocksizeof);
+ putKeyword(upc_elemsizeof, UPCParsersym.TK_upc_elemsizeof);
+ putKeyword(upc_notify, UPCParsersym.TK_upc_notify);
+ putKeyword(upc_fence, UPCParsersym.TK_upc_fence);
+ putKeyword(upc_wait, UPCParsersym.TK_upc_wait);
+ putKeyword(upc_forall, UPCParsersym.TK_upc_forall);
+
+ // The keyword token mappings from the superclass must be overridden.
+ // This is because LPG generates totally different values for token
+ // kinds every time you genereate a parser.
+ putKeyword(AUTO, UPCParsersym.TK_auto);
+ putKeyword(BREAK, UPCParsersym.TK_break);
+ putKeyword(CASE, UPCParsersym.TK_case);
+ putKeyword(CHAR, UPCParsersym.TK_char);
+ putKeyword(CONST, UPCParsersym.TK_const);
+ putKeyword(CONTINUE, UPCParsersym.TK_continue);
+ putKeyword(DEFAULT, UPCParsersym.TK_default);
+ putKeyword(DO, UPCParsersym.TK_do);
+ putKeyword(DOUBLE, UPCParsersym.TK_double);
+ putKeyword(ELSE, UPCParsersym.TK_else);
+ putKeyword(ENUM, UPCParsersym.TK_enum);
+ putKeyword(EXTERN, UPCParsersym.TK_extern);
+ putKeyword(FLOAT, UPCParsersym.TK_float);
+ putKeyword(FOR, UPCParsersym.TK_for);
+ putKeyword(GOTO, UPCParsersym.TK_goto);
+ putKeyword(IF, UPCParsersym.TK_if);
+ putKeyword(INLINE, UPCParsersym.TK_inline);
+ putKeyword(INT, UPCParsersym.TK_int);
+ putKeyword(LONG, UPCParsersym.TK_long);
+ putKeyword(REGISTER, UPCParsersym.TK_register);
+ putKeyword(RESTRICT, UPCParsersym.TK_restrict);
+ putKeyword(RETURN, UPCParsersym.TK_return);
+ putKeyword(SHORT, UPCParsersym.TK_short);
+ putKeyword(SIGNED, UPCParsersym.TK_signed);
+ putKeyword(SIZEOF, UPCParsersym.TK_sizeof);
+ putKeyword(STATIC, UPCParsersym.TK_static);
+ putKeyword(STRUCT, UPCParsersym.TK_struct);
+ putKeyword(SWITCH, UPCParsersym.TK_switch);
+ putKeyword(TYPEDEF, UPCParsersym.TK_typedef);
+ putKeyword(UNION, UPCParsersym.TK_union);
+ putKeyword(UNSIGNED, UPCParsersym.TK_unsigned);
+ putKeyword(VOID, UPCParsersym.TK_void);
+ putKeyword(VOLATILE, UPCParsersym.TK_volatile);
+ putKeyword(WHILE, UPCParsersym.TK_while);
+ putKeyword(_BOOL, UPCParsersym.TK__Bool);
+ putKeyword(_COMPLEX, UPCParsersym.TK__Complex);
+ putKeyword(_IMAGINARY, UPCParsersym.TK__Imaginary);
+ }
+
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCParserAction.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCParserAction.java
new file mode 100644
index 00000000000..772a4135730
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCParserAction.java
@@ -0,0 +1,304 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.parser.upc;
+
+import lpg.lpgjavaruntime.IToken;
+
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.ast.c.ICASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.c99.IASTNodeFactory;
+import org.eclipse.cdt.core.dom.c99.IParserActionTokenProvider;
+import org.eclipse.cdt.core.dom.parser.c99.ASTStack;
+import org.eclipse.cdt.core.dom.parser.c99.C99ParserAction;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTForallStatement;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTKeywordExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSizeofExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSynchronizationStatement;
+import org.eclipse.cdt.internal.core.dom.parser.upc.UPCParsersym;
+
+
+/**
+ * Extension to the C99ParserAction that adds support fot building
+ * an AST with UPC specific nodes.
+ */
+public class UPCParserAction extends C99ParserAction {
+
+ private final UPCASTNodeFactory nodeFactory;
+ private final ASTStack astStack;
+
+
+ public UPCParserAction(IParserActionTokenProvider parser, String[] orderedTerminalSymbols) {
+ super(parser, orderedTerminalSymbols);
+ this.astStack = super.getASTStack();
+ this.nodeFactory = (UPCASTNodeFactory) super.getNodeFactory();
+ }
+
+
+ /**
+ * Adds support for UPC specific nodes.
+ * Some of the methods in UPCASTNodeFactory are overrides
+ * and are called up in C99ParserAction.
+ */
+ protected IASTNodeFactory createNodeFactory() {
+ return new UPCASTNodeFactory();
+ }
+
+
+ /**************************************************************************************
+ * Semantic actions
+ **************************************************************************************/
+
+
+ /**
+ * constant ::= 'MYTHREAD' | 'THREADS' | 'UPC_MAX_BLOCKSIZE'
+ */
+ public void consumeKeywordExpression(int keywordKind) {
+ IUPCASTKeywordExpression expr = nodeFactory.newKeywordExpression();
+ expr.setKeywordKind(keywordKind);
+ setOffsetAndLength(expr);
+ astStack.push(expr);
+ }
+
+
+ /**
+ * unary_expression ::= 'upc_localsizeof' unary_expression
+ * | 'upc_blocksizeof' unary_expression
+ * | 'upc_elemsizeof' unary_expression
+ */
+ public void consumeExpressionUpcSizeofOperator(int sizeofOp) {
+ IUPCASTSizeofExpression expr = nodeFactory.newSizeofExpression();
+ expr.setUPCSizeofOperator(sizeofOp);
+
+ IASTExpression operand = (IASTExpression) astStack.pop();
+ expr.setOperand(operand);
+ operand.setParent(expr);
+ operand.setPropertyInParent(IASTUnaryExpression.OPERAND);
+
+ setOffsetAndLength(expr);
+ astStack.push(expr);
+ }
+
+
+ /**
+ * unary_expression ::= 'upc_localsizeof' '(' type_name ')'
+ * | 'upc_blocksizeof' '(' type_name ')'
+ * | 'upc_elemsizeof' '(' type_name ')'
+ */
+ public void consumeExpressionUpcSizeofTypeName(int sizeofOp) {
+ IASTTypeId typeId = (IASTTypeId) astStack.pop();
+ IASTTypeIdExpression expr = nodeFactory.newTypeIdExpression();
+
+ expr.setTypeId(typeId);
+ typeId.setParent(expr);
+ typeId.setPropertyInParent(IASTTypeIdExpression.TYPE_ID);
+ setOffsetAndLength(expr);
+
+ astStack.push(expr);
+ consumeExpressionUpcSizeofOperator(sizeofOp);
+ }
+
+
+ /**
+ * synchronization_statement ::= 'upc_notify' expression ';'
+ * | 'upc_notify' ';'
+ * | 'upc_wait' expression ';'
+ * | 'upc_wait' ';'
+ * | 'upc_barrier' expression ';'
+ * | 'upc_barrier' ';'
+ * | 'upc_fence' ';'
+ */
+ public void consumeStatementSynchronizationStatement(int statementKind, boolean hasBarrierExpr) {
+ IUPCASTSynchronizationStatement statement = nodeFactory.newSyncronizationStatment();
+ statement.setStatementKind(statementKind);
+
+ if(hasBarrierExpr) {
+ IASTExpression barrierExpression = (IASTExpression) astStack.pop();
+ statement.setBarrierExpression(barrierExpression);
+ barrierExpression.setParent(statement);
+ barrierExpression.setPropertyInParent(IUPCASTSynchronizationStatement.BARRIER_EXPRESSION);
+ }
+
+ setOffsetAndLength(statement);
+ astStack.push(statement);
+ }
+
+
+ /**
+ * iteration_statement
+ * ::= 'upc_forall' '(' expression ';' expression ';' expression ';' affinity ')' statement
+ * | 'upc_forall' '(' declaration expression ';' expression ';' affinity ')' statement
+ */
+ public void consumeStatementUPCForallLoop(boolean hasExpr1, boolean hasExpr2, boolean hasExpr3, boolean hasAffinity) {
+ IUPCASTForallStatement forStat = nodeFactory.newForallStatement();
+
+ IASTStatement body = (IASTStatement) astStack.pop();
+ forStat.setBody(body);
+ body.setParent(forStat);
+ body.setPropertyInParent(IUPCASTForallStatement.BODY);
+
+ if(hasAffinity) {
+ Object o = astStack.pop();
+ if(o instanceof IASTExpression) {
+ IASTExpression expr = (IASTExpression)o;
+ forStat.setAffinityExpression(expr);
+ expr.setParent(forStat);
+ expr.setPropertyInParent(IUPCASTForallStatement.AFFINITY);
+ }
+ if(o instanceof IToken) {
+ IToken token = (IToken) o;
+ assert token.getKind() == UPCParsersym.TK_continue;
+ forStat.setAffinityContinue(true);
+ }
+ }
+
+ if(hasExpr3) {
+ IASTExpression expr = (IASTExpression) astStack.pop();
+ forStat.setIterationExpression(expr);
+ expr.setParent(forStat);
+ expr.setPropertyInParent(IUPCASTForallStatement.ITERATION);
+ }
+
+ if(hasExpr2) {
+ IASTExpression expr = (IASTExpression) astStack.pop();
+ forStat.setConditionExpression(expr);
+ expr.setParent(forStat);
+ expr.setPropertyInParent(IUPCASTForallStatement.CONDITION);
+ }
+
+ if(hasExpr1) { // may be an expression or a declaration
+ IASTNode node = (IASTNode) astStack.pop();
+
+ if(node instanceof IASTExpression) {
+ IASTExpressionStatement stat = nodeFactory.newExpressionStatement();
+ IASTExpression expr = (IASTExpression)node;
+ stat.setExpression(expr);
+ expr.setParent(stat);
+ expr.setPropertyInParent(IASTExpressionStatement.EXPFRESSION);
+
+ forStat.setInitializerStatement(stat);
+ stat.setParent(forStat);
+ stat.setPropertyInParent(IUPCASTForallStatement.INITIALIZER);
+ }
+ else if(node instanceof IASTDeclaration) {
+ IASTDeclarationStatement stat = nodeFactory.newDeclarationStatement();
+ IASTDeclaration declaration = (IASTDeclaration)node;
+ stat.setDeclaration(declaration);
+ declaration.setParent(stat);
+ declaration.setPropertyInParent(IASTDeclarationStatement.DECLARATION);
+
+ forStat.setInitializerStatement(stat);
+ stat.setParent(forStat);
+ stat.setPropertyInParent(IUPCASTForallStatement.INITIALIZER);
+ }
+ }
+ else {
+ forStat.setInitializerStatement(nodeFactory.newNullStatement());
+ }
+
+ setOffsetAndLength(forStat);
+ astStack.push(forStat);
+ }
+
+
+ /**
+ * Temporary object used during the parsing of UPC declaration specifiers.
+ * Stored temporarily on the astStack, but does not become part of the AST.
+ * Makes parsing of layout qualifiers easier.
+ *
+ * @author Mike
+ */
+ private static class UPCParserActionLayoutQualifier {
+ public boolean hasStar = false;
+ public IASTExpression expression = null;
+ }
+
+
+ /**
+ * layout_qualifier ::= '[' constant_expression ']'
+ * | '[' '*' ']'
+ * | '[' ']'
+ */
+ public void consumeLayoutQualifier(boolean hasExpression, boolean hasStar) {
+ UPCParserActionLayoutQualifier layoutQualifier = new UPCParserActionLayoutQualifier();
+ layoutQualifier.hasStar = hasStar;
+ if(hasExpression) {
+ layoutQualifier.expression = (IASTExpression) astStack.pop();
+ }
+ astStack.push(layoutQualifier);
+ }
+
+
+
+ /**
+ * Overrides setSpecifier to add support for temporary layout qualifier nodes.
+ */
+ protected void setSpecifier(ICASTDeclSpecifier declSpec, Object o) {
+ if(o instanceof IToken)
+ setTokenSpecifier((IUPCASTDeclSpecifier)declSpec, (IToken)o);
+ else
+ setLayoutQualifier((IUPCASTDeclSpecifier)declSpec, (UPCParserActionLayoutQualifier) o);
+ }
+
+
+ /**
+ * Support for new declaration specifier keywords.
+ *
+ * 'shared' without [] is handled here
+ * 'shared' with [] is handled in setLayoutQualifier().
+ */
+ protected void setTokenSpecifier(IUPCASTDeclSpecifier node, IToken token) {
+ switch(token.getKind()) {
+ case UPCParsersym.TK_relaxed:
+ node.setReferenceType(IUPCASTDeclSpecifier.rt_relaxed);
+ break;
+ case UPCParsersym.TK_strict:
+ node.setReferenceType(IUPCASTDeclSpecifier.rt_strict);
+ break;
+ case UPCParsersym.TK_shared:
+ node.setSharedQualifier(IUPCASTDeclSpecifier.sh_shared_default_block_size);
+ break;
+ default:
+ super.setSpecifier(node, token);
+ }
+ }
+
+
+ /**
+ * Handles layout qualifiers with block size specified.
+ */
+ protected void setLayoutQualifier(IUPCASTDeclSpecifier node, UPCParserActionLayoutQualifier layoutQualifier) {
+ if(layoutQualifier.hasStar) {
+ node.setSharedQualifier(IUPCASTDeclSpecifier.sh_shared_pure_allocation);
+ }
+ else if(layoutQualifier.expression != null) {
+ node.setSharedQualifier(IUPCASTDeclSpecifier.sh_shared_constant_expression);
+ IASTExpression expr = layoutQualifier.expression;
+ node.setBlockSizeExpression(expr);
+ expr.setParent(node);
+ expr.setPropertyInParent(IUPCASTDeclSpecifier.BLOCK_SIZE_EXPRESSION);
+ }
+ else {
+ node.setSharedQualifier(IUPCASTDeclSpecifier.sh_shared_indefinite_allocation);
+ }
+ }
+
+}
+
+
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java
new file mode 100644
index 00000000000..8dc6e144695
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc;
+
+import org.eclipse.cdt.core.dom.c99.C99Language;
+import org.eclipse.cdt.core.dom.c99.IParser;
+import org.eclipse.cdt.core.dom.parser.c99.C99KeywordMap;
+import org.eclipse.cdt.core.dom.parser.upc.UPCKeywordMap;
+import org.eclipse.cdt.internal.core.dom.parser.upc.UPCParser;
+
+
+/**
+ * Implementation of the ILanguage extension point, adds UPC as a language to CDT.
+ *
+ * Just hooks into C99Language and provides UPC specifier parser and keyword map.
+ *
+ * @author Mike Kucera
+ */
+public class UPCLanguage extends C99Language {
+
+ // TODO: this should probably go somewhere else
+ public static final String PLUGIN_ID = "org.eclipse.cdt.core.parser.c99"; //$NON-NLS-1$
+ public static final String ID = PLUGIN_ID + ".upc"; //$NON-NLS-1$
+
+ private static UPCKeywordMap keywordMap = new UPCKeywordMap();
+
+
+
+ public String getId() {
+ return ID;
+ }
+
+ public String getName() {
+ // TODO: this has to be read from a message bundle
+ return "UPC";//$NON-NLS-1$
+ }
+
+
+ protected IParser getParser() {
+ return new UPCParser();
+ }
+
+ public C99KeywordMap getKeywordMap() {
+ return keywordMap;
+ }
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTCompositeTypeSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTCompositeTypeSpecifier.java
new file mode 100644
index 00000000000..c6c1976a0a3
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTCompositeTypeSpecifier.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.c.ICASTCompositeTypeSpecifier;
+
+public interface IUPCASTCompositeTypeSpecifier extends
+ IUPCASTDeclSpecifier, ICASTCompositeTypeSpecifier {
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTDeclSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTDeclSpecifier.java
new file mode 100644
index 00000000000..f93a2af328b
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTDeclSpecifier.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.c.ICASTDeclSpecifier;
+
+public interface IUPCASTDeclSpecifier extends ICASTDeclSpecifier {
+
+ public static final ASTNodeProperty BLOCK_SIZE_EXPRESSION = new ASTNodeProperty(
+ "IUPCASTDeclSpecifier.BLOCK_SIZE_EXPRESSION - IUPCASTDeclSpecifier block size expression"); //$NON-NLS-1
+
+
+ public static final int rt_unspecified = 0;
+
+ public static final int rt_strict = 1;
+
+ public static final int rt_relaxed = 2;
+
+
+
+ public static final int sh_not_shared = 0;
+
+ public static final int sh_shared_default_block_size = 1;
+
+ public static final int sh_shared_pure_allocation = 2;
+
+ public static final int sh_shared_indefinite_allocation = 3;
+
+ public static final int sh_shared_constant_expression = 4;
+
+
+
+ public int getReferenceType();
+
+ public void setReferenceType(int referenceType);
+
+
+
+ public int getSharedQualifier();
+
+ public void setSharedQualifier(int shared);
+
+
+
+ public IASTExpression getBlockSizeExpression();
+
+ public void setBlockSizeExpression(IASTExpression expr);
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTElaboratedTypeSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTElaboratedTypeSpecifier.java
new file mode 100644
index 00000000000..a4fa878a3ad
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTElaboratedTypeSpecifier.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.c.ICASTElaboratedTypeSpecifier;
+
+public interface IUPCASTElaboratedTypeSpecifier extends IUPCASTDeclSpecifier,
+ ICASTElaboratedTypeSpecifier {
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTEnumerationSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTEnumerationSpecifier.java
new file mode 100644
index 00000000000..86335227ac0
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTEnumerationSpecifier.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.c.ICASTEnumerationSpecifier;
+
+public interface IUPCASTEnumerationSpecifier extends IUPCASTDeclSpecifier,
+ ICASTEnumerationSpecifier {
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTForallStatement.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTForallStatement.java
new file mode 100644
index 00000000000..8254a93456f
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTForallStatement.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTForStatement;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+
+public interface IUPCASTForallStatement extends IASTForStatement {
+
+ public static final ASTNodeProperty CONDITION = new ASTNodeProperty(
+ "IUPCASTForallStatement.CONDITION - IASTExpression condition of IUPCASTForallStatement"); //$NON-NLS-1$
+
+ public static final ASTNodeProperty ITERATION = new ASTNodeProperty(
+ "IUPCASTForallStatement.ITERATION - IASTExpression iteration of IUPCASTForallStatement"); //$NON-NLS-1$
+
+ public static final ASTNodeProperty BODY = new ASTNodeProperty(
+ "IUPCASTForallStatement.BODY - IASTStatement body of IUPCASTForallStatement"); //$NON-NLS-1$
+
+ public static final ASTNodeProperty INITIALIZER = new ASTNodeProperty(
+ "IUPCASTForallStatement.INITIALIZER - initializer for IUPCASTForallStatement"); //$NON-NLS-1$
+
+ public static final ASTNodeProperty AFFINITY = new ASTNodeProperty(
+ "IUPCASTForallStatement.AFFINITY - IASTExpression affinity for IUPCASTForallStatement"); //$NON-NLS-1$
+
+
+ public IASTStatement getInitializerStatement();
+
+ public void setInitializerStatement( IASTStatement statement );
+
+ public IASTExpression getConditionExpression();
+
+ public void setConditionExpression(IASTExpression condition);
+
+ public IASTExpression getIterationExpression();
+
+ public void setIterationExpression(IASTExpression iterator);
+
+ public IASTExpression getAffinityExpresiion();
+
+ public void setAffinityExpression(IASTExpression affinity);
+
+ public boolean isAffinityContinue();
+
+ public void setAffinityContinue(boolean affinityContinue);
+
+ public IASTStatement getBody();
+
+ public void setBody(IASTStatement statement);
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTKeywordExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTKeywordExpression.java
new file mode 100644
index 00000000000..5ef9c3da333
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTKeywordExpression.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+
+public interface IUPCASTKeywordExpression extends IASTExpression {
+
+ public static final int kw_threads = 1;
+
+ public static final int kw_mythread = 2;
+
+ public static final int kw_upc_max_block_size = 3;
+
+
+ public int getKeywordKind();
+
+ public void setKeywordKind(int kind);
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTLayoutQualifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTLayoutQualifier.java
new file mode 100644
index 00000000000..49a61e49f57
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTLayoutQualifier.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+
+
+public interface IUPCASTLayoutQualifier {
+
+
+ public boolean isIndefiniteBlockAllocation();
+
+ public void setIndefiniteBlockAllocation(boolean allocation);
+
+
+ public boolean isPureBlockAllocation();
+
+ public void setPureBlockAllocation(boolean allocation);
+
+
+ public IASTExpression getBlockSizeExpression();
+
+ public void setBlockSizeExpression(IASTExpression expr);
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSimpleDeclSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSimpleDeclSpecifier.java
new file mode 100644
index 00000000000..c2a347341d0
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSimpleDeclSpecifier.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
+
+public interface IUPCASTSimpleDeclSpecifier extends IUPCASTDeclSpecifier,
+ ICASTSimpleDeclSpecifier {
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSizeofExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSizeofExpression.java
new file mode 100644
index 00000000000..3fb0902a29d
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSizeofExpression.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+
+public interface IUPCASTSizeofExpression extends IASTUnaryExpression {
+
+ public final int op_sizeof = 0;
+
+ public final int op_upc_localsizeof = 1;
+
+ public final int op_upc_blocksizeof = 2;
+
+ public final int op_upc_elemsizeof = 3;
+
+ public void setUPCSizeofOperator(int upcSizeofOperator);
+
+ public int getUPCSizeofOperator();
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSynchronizationStatement.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSynchronizationStatement.java
new file mode 100644
index 00000000000..2c388c991da
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTSynchronizationStatement.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+
+public interface IUPCASTSynchronizationStatement extends IASTStatement {
+
+
+ public static final ASTNodeProperty BARRIER_EXPRESSION = new ASTNodeProperty(
+ "IUPCASTSynchronizationStatement.BARRIER_EXPRESSION - IASTExpression barrier for IUPCASTSynchronizationStatement"); //$NON-NLS-1$
+
+
+ public final int st_upc_notify = 1;
+
+ public final int st_upc_wait = 2;
+
+ public final int st_upc_barrier = 3;
+
+ public final int st_upc_fence = 4;
+
+
+ public IASTExpression getBarrierExpression();
+
+ public void setBarrierExpression(IASTExpression expr);
+
+ public int getStatementKind();
+
+ public void setStatementKind(int kind);
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypedefNameSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypedefNameSpecifier.java
new file mode 100644
index 00000000000..5c571380b00
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/ast/IUPCASTTypedefNameSpecifier.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.dom.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.c.ICASTTypedefNameSpecifier;
+
+public interface IUPCASTTypedefNameSpecifier extends IUPCASTDeclSpecifier,
+ ICASTTypedefNameSpecifier {
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.g b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.g
new file mode 100644
index 00000000000..86b8375bc00
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.g
@@ -0,0 +1,252 @@
+-----------------------------------------------------------------------------------
+-- Copyright (c) 2006, 2007 IBM Corporation and others.
+-- All rights reserved. This program and the accompanying materials
+-- are made available under the terms of the Eclipse Public License v1.0
+-- which accompanies this distribution, and is available at
+-- http://www.eclipse.org/legal/epl-v10.html
+--
+-- Contributors:
+-- IBM Corporation - initial API and implementation
+-----------------------------------------------------------------------------------
+
+%options la=2
+%options package=org.eclipse.cdt.internal.core.dom.parser.upc
+%options template=btParserTemplateD.g
+%options import_terminals=D:\workspaces\cdt-head2\org.eclipse.cdt.core.parser.c99\src\org\eclipse\cdt\internal\core\dom\parser\c99\C99Lexer.g
+
+
+-- Unified Parallel C (UPC) is an extension of C99
+$Import
+D:\workspaces\cdt-head2\org.eclipse.cdt.core.parser.c99\src\org\eclipse\cdt\internal\core\dom\parser\c99\C99Parser.g
+$End
+
+$Globals
+/.
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTKeywordExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSizeofExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSynchronizationStatement;
+import org.eclipse.cdt.internal.core.dom.parser.c99.C99Lexer;
+import org.eclipse.cdt.internal.core.dom.parser.c99.C99Parsersym;
+import org.eclipse.cdt.core.dom.parser.upc.UPCKeywordMap;
+import org.eclipse.cdt.core.dom.parser.upc.UPCParserAction;
+./
+$End
+
+$Define
+ $action_class /. UPCParserAction ./
+ $keyword_map_class /. UPCKeywordMap ./
+$End
+
+
+$Terminals -- Additional keywords defined by UPC
+ MYTHREAD
+ THREADS
+ UPC_MAX_BLOCKSIZE
+ relaxed
+ shared
+ strict
+ upc_barrier
+ upc_localsizeof
+ upc_blocksizeof
+ upc_elemsizeof
+ upc_notify
+ upc_fence
+ upc_wait
+ upc_forall
+$End
+
+
+
+$Rules -- UPC grammar extensions to C99
+
+-----------------------------------------------------------------------------------
+-- Expressions
+-----------------------------------------------------------------------------------
+
+-- also need to be a pre-defined macro
+-- THREADS and UPC_MAX_BLOCKSIZE are macros, but I want to be able to recognize
+-- them in the AST, how do I do this? (getRawSignature() to get the source code and then string compare to THREADS?)
+-- just use the paths and symbols dialog to add them, good for testing they can be added later by a upc toolchain
+
+-- map them to integers in the UPCKeywordMap
+-- override consumeExpressionConstant(IASTLiteralExpression.lk_integer_constant), call toString() onthe token
+-- and check if its THREADS or UPC_MAX_BLOCKSIZE and create appropriate AST node
+
+-- but then the value would be lost, its no good, they need to be builtin macros
+
+constant
+ ::= 'MYTHREAD'
+ /.$ba consumeKeywordExpression(IUPCASTKeywordExpression.kw_mythread); $ea./
+ | 'THREADS'
+ /.$ba consumeKeywordExpression(IUPCASTKeywordExpression.kw_threads); $ea./
+ | 'UPC_MAX_BLOCKSIZE'
+ /.$ba consumeKeywordExpression(IUPCASTKeywordExpression.kw_upc_max_block_size); $ea./
+
+
+-- causes ambiguities because of no type information, solution is SGLR
+unary_expression
+ ::= 'upc_localsizeof' unary_expression
+ /.$ba consumeExpressionUpcSizeofOperator(IUPCASTSizeofExpression.op_upc_localsizeof); $ea./
+ | 'upc_localsizeof' '(' type_name ')'
+ /.$ba consumeExpressionUpcSizeofTypeName(IUPCASTSizeofExpression.op_upc_localsizeof); $ea./
+ | 'upc_blocksizeof' unary_expression
+ /.$ba consumeExpressionUpcSizeofOperator(IUPCASTSizeofExpression.op_upc_blocksizeof); $ea./
+ | 'upc_blocksizeof' '(' type_name ')'
+ /.$ba consumeExpressionUpcSizeofTypeName(IUPCASTSizeofExpression.op_upc_blocksizeof); $ea./
+ | 'upc_elemsizeof' unary_expression
+ /.$ba consumeExpressionUpcSizeofOperator(IUPCASTSizeofExpression.op_upc_elemsizeof); $ea./
+ | 'upc_elemsizeof' '(' type_name ')'
+ /.$ba consumeExpressionUpcSizeofTypeName(IUPCASTSizeofExpression.op_upc_elemsizeof); $ea./
+
+
+-----------------------------------------------------------------------------------
+-- Declarations
+-----------------------------------------------------------------------------------
+
+
+type_qualifier
+ ::= shared_type_qualifier
+ | reference_type_qualifier
+
+-- causes ambiguities in parameter declarations, inherant in grammar
+-- for example: int foo(int shared []);
+-- does the [] bind to shared or is it shared with infinite block size array?
+-- TODO: probably just resolved in the same way as dangling else
+
+shared_type_qualifier
+ ::= 'shared' layout_qualifier -- don't consume anything, the presense of the
+ -- layout_qualifier will determine that 'shared' token was encountered
+ | 'shared' /.$ba consumeToken(); $ea./
+
+reference_type_qualifier
+ ::= 'relaxed' /.$ba consumeToken(); $ea./
+ | 'strict' /.$ba consumeToken(); $ea./
+
+layout_qualifier
+ ::= '[' constant_expression ']'
+ /.$ba consumeLayoutQualifier(true, false); $ea./
+ | '[' '*' ']'
+ /.$ba consumeLayoutQualifier(false, true); $ea./
+ | '[' ']'
+ /.$ba consumeLayoutQualifier(false, false); $ea./
+
+
+
+-----------------------------------------------------------------------------------
+-- Statements
+-----------------------------------------------------------------------------------
+
+statement
+ ::= synchronization_statement
+
+synchronization_statement
+ ::= 'upc_notify' expression ';'
+ /.$ba consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_notify, true); $ea./
+ | 'upc_notify' ';'
+ /.$ba consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_notify, false); $ea./
+ | 'upc_wait' expression ';'
+ /.$ba consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_wait, true); $ea./
+ | 'upc_wait' ';'
+ /.$ba consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_wait, false); $ea./
+ | 'upc_barrier' expression ';'
+ /.$ba consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_barrier, true); $ea./
+ | 'upc_barrier' ';'
+ /.$ba consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_barrier, false); $ea./
+ | 'upc_fence' ';'
+ /.$ba consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_fence, false); $ea./
+
+
+iteration_statement
+ ::= 'upc_forall' '(' expression ';' expression ';' expression ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, true, true, true); $ea./
+
+ | 'upc_forall' '(' expression ';' expression ';' expression ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, true, true, false); $ea./
+
+ | 'upc_forall' '(' expression ';' expression ';' ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, true, false, true); $ea./
+
+ | 'upc_forall' '(' expression ';' expression ';' ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, true, false, false); $ea./
+
+ | 'upc_forall' '(' expression ';' ';' expression ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, false, true, true); $ea./
+
+ | 'upc_forall' '(' expression ';' ';' expression ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, false, true, false); $ea./
+
+ | 'upc_forall' '(' expression ';' ';' ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, false, false, true); $ea./
+
+ | 'upc_forall' '(' expression ';' ';' ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, false, false, false); $ea./
+
+ | 'upc_forall' '(' ';' expression ';' expression ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(false, true, true, true); $ea./
+
+ | 'upc_forall' '(' ';' expression ';' expression ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(false, true, true, false); $ea./
+
+ | 'upc_forall' '(' ';' expression ';' ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(false, true, false, true); $ea./
+
+ | 'upc_forall' '(' ';' expression ';' ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(false, true, false, false); $ea./
+
+ | 'upc_forall' '(' ';' ';' expression ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(false, false, true, true); $ea./
+
+ | 'upc_forall' '(' ';' ';' expression ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(false, false, true, false); $ea./
+
+ | 'upc_forall' '(' ';' ';' ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(false, false, false, true); $ea./
+
+ | 'upc_forall' '(' ';' ';' ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(false, false, false, false); $ea./
+
+ | 'upc_forall' '(' declaration expression ';' expression ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, true, true, true); $ea./
+
+ | 'upc_forall' '(' declaration expression ';' expression ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, true, true, false); $ea./
+
+ | 'upc_forall' '(' declaration expression ';' ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, true, false, true); $ea./
+
+ | 'upc_forall' '(' declaration expression ';' ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, true, false, false); $ea./
+
+ | 'upc_forall' '(' declaration ';' expression ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, false, true, true); $ea./
+
+ | 'upc_forall' '(' declaration ';' expression ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, false, true, false); $ea./
+
+ | 'upc_forall' '(' declaration ';' ';' affinity ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, false, false, true); $ea./
+
+ | 'upc_forall' '(' declaration ';' ';' ')' statement
+ /.$ba consumeStatementUPCForallLoop(true, false, false, false); $ea./
+
+affinity
+ ::= expression
+ | 'continue'
+ /.$ba consumeToken(); $ea./
+
+$End
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.java
new file mode 100644
index 00000000000..4a78b456a8b
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParser.java
@@ -0,0 +1,1698 @@
+/*******************************************************************************
+* Copyright (c) 2006, 2007 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* IBM Corporation - initial API and implementation
+*********************************************************************************/
+
+// This file was generated by LPG
+
+package org.eclipse.cdt.internal.core.dom.parser.upc;
+
+import lpg.lpgjavaruntime.*;
+
+import java.util.*;
+
+import org.eclipse.cdt.core.dom.ast.*;
+import org.eclipse.cdt.core.dom.c99.IParserActionTokenProvider;
+import org.eclipse.cdt.core.dom.c99.IParser;
+import org.eclipse.cdt.core.dom.c99.IParseResult;
+import org.eclipse.cdt.core.dom.parser.c99.C99ParseResult;
+import org.eclipse.cdt.core.dom.parser.c99.C99ParserAction;
+import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
+import org.eclipse.cdt.core.dom.c99.IKeywordMap;
+import org.eclipse.cdt.core.dom.parser.c99.C99KeywordMap;
+
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTKeywordExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSizeofExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSynchronizationStatement;
+import org.eclipse.cdt.internal.core.dom.parser.c99.C99Lexer;
+import org.eclipse.cdt.internal.core.dom.parser.c99.C99Parsersym;
+import org.eclipse.cdt.core.dom.parser.upc.UPCKeywordMap;
+import org.eclipse.cdt.core.dom.parser.upc.UPCParserAction;
+
+public class UPCParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
+{
+ private static ParseTable prs = new UPCParserprs();
+ private BacktrackingParser btParser;
+
+ public BacktrackingParser getParser() { return btParser; }
+ private void setResult(Object object) { btParser.setSym1(object); }
+ public Object getRhsSym(int i) { return btParser.getSym(i); }
+
+ public int getRhsTokenIndex(int i) { return btParser.getToken(i); }
+ public IToken getRhsIToken(int i) { return super.getIToken(getRhsTokenIndex(i)); }
+
+ public int getRhsFirstTokenIndex(int i) { return btParser.getFirstToken(i); }
+ public IToken getRhsFirstIToken(int i) { return super.getIToken(getRhsFirstTokenIndex(i)); }
+
+ public int getRhsLastTokenIndex(int i) { return btParser.getLastToken(i); }
+ public IToken getRhsLastIToken(int i) { return super.getIToken(getRhsLastTokenIndex(i)); }
+
+ public int getLeftSpan() { return btParser.getFirstToken(); }
+ public IToken getLeftIToken() { return super.getIToken(getLeftSpan()); }
+
+ public int getRightSpan() { return btParser.getLastToken(); }
+ public IToken getRightIToken() { return super.getIToken(getRightSpan()); }
+
+ public int getRhsErrorTokenIndex(int i)
+ {
+ int index = btParser.getToken(i);
+ IToken err = super.getIToken(index);
+ return (err instanceof ErrorToken ? index : 0);
+ }
+ public ErrorToken getRhsErrorIToken(int i)
+ {
+ int index = btParser.getToken(i);
+ IToken err = super.getIToken(index);
+ return (ErrorToken) (err instanceof ErrorToken ? err : null);
+ }
+
+ public UPCParser(LexStream lexStream)
+ {
+ super(lexStream);
+
+ try
+ {
+ super.remapTerminalSymbols(orderedTerminalSymbols(), UPCParserprs.EOFT_SYMBOL);
+ }
+ catch(NullExportedSymbolsException e) {
+ }
+ catch(NullTerminalSymbolsException e) {
+ }
+ catch(UnimplementedTerminalsException e)
+ {
+ java.util.ArrayList unimplemented_symbols = e.getSymbols();
+ System.out.println("The Lexer will not scan the following token(s):");//$NON-NLS-1$
+ for (int i = 0; i < unimplemented_symbols.size(); i++)
+ {
+ Integer id = (Integer) unimplemented_symbols.get(i);
+ System.out.println(" " + UPCParsersym.orderedTerminalSymbols[id.intValue()]); //$NON-NLS-1$
+ }
+ System.out.println();
+ }
+ catch(UndefinedEofSymbolException e)
+ {
+ throw new Error(new UndefinedEofSymbolException
+ ("The Lexer does not implement the Eof symbol " +//$NON-NLS-1$
+ UPCParsersym.orderedTerminalSymbols[UPCParserprs.EOFT_SYMBOL]));
+ }
+ }
+
+ public String[] orderedTerminalSymbols() { return UPCParsersym.orderedTerminalSymbols; }
+ public String getTokenKindName(int kind) { return UPCParsersym.orderedTerminalSymbols[kind]; }
+ public int getEOFTokenKind() { return UPCParserprs.EOFT_SYMBOL; }
+ public PrsStream getParseStream() { return (PrsStream) this; }
+
+ //
+ // Report error message for given error_token.
+ //
+ public final void reportErrorTokenMessage(int error_token, String msg)
+ {
+ int firsttok = super.getFirstErrorToken(error_token),
+ lasttok = super.getLastErrorToken(error_token);
+ String location = super.getFileName() + ':' +//$NON-NLS-1$
+ (firsttok > lasttok
+ ? (super.getEndLine(lasttok) + ":" + super.getEndColumn(lasttok))//$NON-NLS-1$
+ : (super.getLine(error_token) + ":" +//$NON-NLS-1$
+ super.getColumn(error_token) + ":" +//$NON-NLS-1$
+ super.getEndLine(error_token) + ":" +//$NON-NLS-1$
+ super.getEndColumn(error_token)))
+ + ": ";//$NON-NLS-1$
+ super.reportError((firsttok > lasttok ? ParseErrorCodes.INSERTION_CODE : ParseErrorCodes.SUBSTITUTION_CODE), location, msg);
+ }
+
+ public Object parser()
+ {
+ return parser(null, 0);
+ }
+
+ public Object parser(Monitor monitor)
+ {
+ return parser(monitor, 0);
+ }
+
+ public Object parser(int error_repair_count)
+ {
+ return parser(null, error_repair_count);
+ }
+
+ public Object parser(Monitor monitor, int error_repair_count)
+ {
+ try
+ {
+ btParser = new BacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+ }
+ catch (NotBacktrackParseTableException e)
+ {
+ throw new Error(new NotBacktrackParseTableException
+ ("Regenerate UPCParserprs.java with -BACKTRACK option"));//$NON-NLS-1$
+ }
+ catch (BadParseSymFileException e)
+ {
+ throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- UPCParsersym.java"));//$NON-NLS-1$
+ }
+
+ try
+ {
+ return (Object) btParser.parse(error_repair_count);
+ }
+ catch (BadParseException e)
+ {
+ reset(e.error_token); // point to error token
+ DiagnoseParser diagnoseParser = new DiagnoseParser(this, prs);
+ diagnoseParser.diagnose(e.error_token);
+ }
+
+ return null;
+ }
+
+
+private UPCParserAction action = new UPCParserAction (this, UPCParserprs.orderedTerminalSymbols);
+private IKeywordMap keywordMap = new UPCKeywordMap ();
+private List commentTokens = new ArrayList();
+
+public UPCParser() { // constructor
+ this(new C99Lexer() {
+ // used by mapKind() to map C99 token kinds to the token kinds of a parser that extends this one
+ public String[] orderedExportedSymbols() {
+ return C99Parsersym.orderedTerminalSymbols;
+ }
+ });
+}
+
+public void addToken(IToken token) {
+ int newKind = mapKind(token.getKind());
+ if(newKind == UPCParserprs.TK_identifier) {
+ Integer keywordKind = keywordMap.getKeywordKind(token.toString());
+ if(keywordKind != null) {
+ newKind = keywordKind.intValue();
+ }
+ }
+ token.setKind(newKind);
+ super.addToken(token);
+}
+
+public void addCommentToken(IToken token) {
+ commentTokens.add(token);
+}
+
+public List getCommentTokens() {
+ return commentTokens;
+}
+
+public IParseResult parse() {
+ // this has to be done, or... kaboom!
+ setStreamLength(getSize());
+ // do the actual parsing, -1 means full error handling
+ parser(null, -1);
+
+ IASTTranslationUnit tu = action.getAST();
+ boolean encounteredError = action.encounteredError();
+ IASTCompletionNode compNode = action.getASTCompletionNode();
+
+ return new C99ParseResult(tu, compNode, encounteredError);
+}
+
+
+// implements IParserActionTokenProvider.getEOFToken()
+public IToken getEOFToken() {
+ List tokens = getTokens();
+ IToken eof = (IToken) tokens.get(tokens.size() - 1);
+ return eof;
+}
+
+
+// implements IParserActionTokenProvider.getRuleTokenCount()
+public int getRuleTokenCount() {
+ return (getRightSpan() - getLeftSpan()) + 1;
+}
+
+public List getRuleTokens() {
+ return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
+}
+
+
+ public void ruleAction(int ruleNumber)
+ {
+ switch (ruleNumber)
+ {
+
+ //
+ // Rule 1: <openscope> ::= $Empty
+ //
+ case 1: { action.beforeConsume(); action. openASTScope(); break;
+ }
+
+ //
+ // Rule 12: constant ::= integer
+ //
+ case 12: { action.beforeConsume(); action. consumeExpressionConstant(IASTLiteralExpression.lk_integer_constant); break;
+ }
+
+ //
+ // Rule 13: constant ::= floating
+ //
+ case 13: { action.beforeConsume(); action. consumeExpressionConstant(IASTLiteralExpression.lk_float_constant); break;
+ }
+
+ //
+ // Rule 14: constant ::= charconst
+ //
+ case 14: { action.beforeConsume(); action. consumeExpressionConstant(IASTLiteralExpression.lk_char_constant); break;
+ }
+
+ //
+ // Rule 15: constant ::= stringlit
+ //
+ case 15: { action.beforeConsume(); action. consumeExpressionConstant(IASTLiteralExpression.lk_string_literal); break;
+ }
+
+ //
+ // Rule 17: primary_expression ::= ident
+ //
+ case 17: { action.beforeConsume(); action. consumeExpressionID(); break;
+ }
+
+ //
+ // Rule 18: primary_expression ::= ( expression )
+ //
+ case 18: { action.beforeConsume(); action. consumeExpressionBracketed(); break;
+ }
+
+ //
+ // Rule 20: postfix_expression ::= postfix_expression [ expression ]
+ //
+ case 20: { action.beforeConsume(); action. consumeExpressionArraySubscript(); break;
+ }
+
+ //
+ // Rule 21: postfix_expression ::= postfix_expression ( )
+ //
+ case 21: { action.beforeConsume(); action. consumeExpressionFunctionCall(false); break;
+ }
+
+ //
+ // Rule 22: postfix_expression ::= postfix_expression ( argument_expression_list )
+ //
+ case 22: { action.beforeConsume(); action. consumeExpressionFunctionCall(true); break;
+ }
+
+ //
+ // Rule 23: postfix_expression ::= postfix_expression . ident
+ //
+ case 23: { action.beforeConsume(); action. consumeExpressionFieldReference(false); break;
+ }
+
+ //
+ // Rule 24: postfix_expression ::= postfix_expression -> ident
+ //
+ case 24: { action.beforeConsume(); action. consumeExpressionFieldReference(true); break;
+ }
+
+ //
+ // Rule 25: postfix_expression ::= postfix_expression ++
+ //
+ case 25: { action.beforeConsume(); action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
+ }
+
+ //
+ // Rule 26: postfix_expression ::= postfix_expression --
+ //
+ case 26: { action.beforeConsume(); action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
+ }
+
+ //
+ // Rule 27: postfix_expression ::= ( type_name ) { <openscope> initializer_list }
+ //
+ case 27: { action.beforeConsume(); action. consumeExpressionTypeIdInitializer(); break;
+ }
+
+ //
+ // Rule 28: postfix_expression ::= ( type_name ) { <openscope> initializer_list , }
+ //
+ case 28: { action.beforeConsume(); action. consumeExpressionTypeIdInitializer(); break;
+ }
+
+ //
+ // Rule 29: argument_expression_list ::= assignment_expression
+ //
+ case 29: { action.beforeConsume(); action. consumeExpressionList(true); break;
+ }
+
+ //
+ // Rule 30: argument_expression_list ::= argument_expression_list , assignment_expression
+ //
+ case 30: { action.beforeConsume(); action. consumeExpressionList(false); break;
+ }
+
+ //
+ // Rule 32: unary_expression ::= ++ unary_expression
+ //
+ case 32: { action.beforeConsume(); action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr); break;
+ }
+
+ //
+ // Rule 33: unary_expression ::= -- unary_expression
+ //
+ case 33: { action.beforeConsume(); action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr); break;
+ }
+
+ //
+ // Rule 34: unary_expression ::= & cast_expression
+ //
+ case 34: { action.beforeConsume(); action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper); break;
+ }
+
+ //
+ // Rule 35: unary_expression ::= * cast_expression
+ //
+ case 35: { action.beforeConsume(); action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_star); break;
+ }
+
+ //
+ // Rule 36: unary_expression ::= + cast_expression
+ //
+ case 36: { action.beforeConsume(); action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus); break;
+ }
+
+ //
+ // Rule 37: unary_expression ::= - cast_expression
+ //
+ case 37: { action.beforeConsume(); action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus); break;
+ }
+
+ //
+ // Rule 38: unary_expression ::= ~ cast_expression
+ //
+ case 38: { action.beforeConsume(); action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde); break;
+ }
+
+ //
+ // Rule 39: unary_expression ::= ! cast_expression
+ //
+ case 39: { action.beforeConsume(); action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_not); break;
+ }
+
+ //
+ // Rule 40: unary_expression ::= sizeof unary_expression
+ //
+ case 40: { action.beforeConsume(); action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof); break;
+ }
+
+ //
+ // Rule 41: unary_expression ::= sizeof ( type_name )
+ //
+ case 41: { action.beforeConsume(); action. consumeExpressionUnarySizeofTypeName(); break;
+ }
+
+ //
+ // Rule 43: cast_expression ::= ( type_name ) cast_expression
+ //
+ case 43: { action.beforeConsume(); action. consumeExpressionCast(); break;
+ }
+
+ //
+ // Rule 45: multiplicative_expression ::= multiplicative_expression * cast_expression
+ //
+ case 45: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiply); break;
+ }
+
+ //
+ // Rule 46: multiplicative_expression ::= multiplicative_expression / cast_expression
+ //
+ case 46: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_divide); break;
+ }
+
+ //
+ // Rule 47: multiplicative_expression ::= multiplicative_expression % cast_expression
+ //
+ case 47: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_modulo); break;
+ }
+
+ //
+ // Rule 49: additive_expression ::= additive_expression + multiplicative_expression
+ //
+ case 49: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_plus); break;
+ }
+
+ //
+ // Rule 50: additive_expression ::= additive_expression - multiplicative_expression
+ //
+ case 50: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_minus); break;
+ }
+
+ //
+ // Rule 52: shift_expression ::= shift_expression << additive_expression
+ //
+ case 52: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeft); break;
+ }
+
+ //
+ // Rule 53: shift_expression ::= shift_expression >> additive_expression
+ //
+ case 53: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRight); break;
+ }
+
+ //
+ // Rule 55: relational_expression ::= relational_expression < shift_expression
+ //
+ case 55: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessThan); break;
+ }
+
+ //
+ // Rule 56: relational_expression ::= relational_expression > shift_expression
+ //
+ case 56: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterThan); break;
+ }
+
+ //
+ // Rule 57: relational_expression ::= relational_expression <= shift_expression
+ //
+ case 57: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessEqual); break;
+ }
+
+ //
+ // Rule 58: relational_expression ::= relational_expression >= shift_expression
+ //
+ case 58: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterEqual); break;
+ }
+
+ //
+ // Rule 60: equality_expression ::= equality_expression == relational_expression
+ //
+ case 60: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_equals); break;
+ }
+
+ //
+ // Rule 61: equality_expression ::= equality_expression != relational_expression
+ //
+ case 61: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_notequals); break;
+ }
+
+ //
+ // Rule 63: AND_expression ::= AND_expression & equality_expression
+ //
+ case 63: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAnd); break;
+ }
+
+ //
+ // Rule 65: exclusive_OR_expression ::= exclusive_OR_expression ^ AND_expression
+ //
+ case 65: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXor); break;
+ }
+
+ //
+ // Rule 67: inclusive_OR_expression ::= inclusive_OR_expression | exclusive_OR_expression
+ //
+ case 67: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOr); break;
+ }
+
+ //
+ // Rule 69: logical_AND_expression ::= logical_AND_expression && inclusive_OR_expression
+ //
+ case 69: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalAnd); break;
+ }
+
+ //
+ // Rule 71: logical_OR_expression ::= logical_OR_expression || logical_AND_expression
+ //
+ case 71: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalOr); break;
+ }
+
+ //
+ // Rule 73: conditional_expression ::= logical_OR_expression ? expression : conditional_expression
+ //
+ case 73: { action.beforeConsume(); action. consumeExpressionConditional(); break;
+ }
+
+ //
+ // Rule 75: assignment_expression ::= unary_expression = assignment_expression
+ //
+ case 75: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break;
+ }
+
+ //
+ // Rule 76: assignment_expression ::= unary_expression *= assignment_expression
+ //
+ case 76: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiplyAssign); break;
+ }
+
+ //
+ // Rule 77: assignment_expression ::= unary_expression /= assignment_expression
+ //
+ case 77: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_divideAssign); break;
+ }
+
+ //
+ // Rule 78: assignment_expression ::= unary_expression %= assignment_expression
+ //
+ case 78: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_moduloAssign); break;
+ }
+
+ //
+ // Rule 79: assignment_expression ::= unary_expression += assignment_expression
+ //
+ case 79: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_plusAssign); break;
+ }
+
+ //
+ // Rule 80: assignment_expression ::= unary_expression -= assignment_expression
+ //
+ case 80: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_minusAssign); break;
+ }
+
+ //
+ // Rule 81: assignment_expression ::= unary_expression <<= assignment_expression
+ //
+ case 81: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeftAssign); break;
+ }
+
+ //
+ // Rule 82: assignment_expression ::= unary_expression >>= assignment_expression
+ //
+ case 82: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRightAssign); break;
+ }
+
+ //
+ // Rule 83: assignment_expression ::= unary_expression &= assignment_expression
+ //
+ case 83: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAndAssign); break;
+ }
+
+ //
+ // Rule 84: assignment_expression ::= unary_expression ^= assignment_expression
+ //
+ case 84: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXorAssign); break;
+ }
+
+ //
+ // Rule 85: assignment_expression ::= unary_expression |= assignment_expression
+ //
+ case 85: { action.beforeConsume(); action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOrAssign); break;
+ }
+
+ //
+ // Rule 86: expression_in_statement ::= expression_list
+ //
+ case 86: { action.beforeConsume(); action. consumeExpression(); break;
+ }
+
+ //
+ // Rule 87: expression ::= expression_list
+ //
+ case 87: { action.beforeConsume(); action. consumeExpression(); break;
+ }
+
+ //
+ // Rule 88: expression_list ::= assignment_expression
+ //
+ case 88: { action.beforeConsume(); action. consumeExpressionList(true); break;
+ }
+
+ //
+ // Rule 89: expression_list ::= expression_list , assignment_expression
+ //
+ case 89: { action.beforeConsume(); action. consumeExpressionList(false); break;
+ }
+
+ //
+ // Rule 97: statement ::= ERROR_TOKEN
+ //
+ case 97: { action.beforeConsume(); action. consumeStatementProblem(); break;
+ }
+
+ //
+ // Rule 98: labeled_statement ::= label_identifier : statement
+ //
+ case 98: { action.beforeConsume(); action. consumeStatementLabeled(); break;
+ }
+
+ //
+ // Rule 99: labeled_statement ::= case constant_expression : statement
+ //
+ case 99: { action.beforeConsume(); action. consumeStatementCase(); break;
+ }
+
+ //
+ // Rule 100: labeled_statement ::= default : statement
+ //
+ case 100: { action.beforeConsume(); action. consumeStatementDefault(); break;
+ }
+
+ //
+ // Rule 101: label_identifier ::= identifier
+ //
+ case 101: { action.beforeConsume(); action. consumeName(); break;
+ }
+
+ //
+ // Rule 102: compound_statement ::= { }
+ //
+ case 102: { action.beforeConsume(); action. consumeStatementEmptyCompoundStatement(); break;
+ }
+
+ //
+ // Rule 103: compound_statement ::= { <openscope> block_item_list }
+ //
+ case 103: { action.beforeConsume(); action. consumeStatementCompoundStatement(); break;
+ }
+
+ //
+ // Rule 107: block_item ::= declaration
+ //
+ case 107: { action.beforeConsume(); action. consumeStatementDeclaration(); break;
+ }
+
+ //
+ // Rule 108: expression_statement ::= ;
+ //
+ case 108: { action.beforeConsume(); action. consumeStatementNull(); break;
+ }
+
+ //
+ // Rule 109: expression_statement ::= expression_in_statement ;
+ //
+ case 109: { action.beforeConsume(); action. consumeStatementExpression(); break;
+ }
+
+ //
+ // Rule 110: selection_statement ::= if ( expression ) statement
+ //
+ case 110: { action.beforeConsume(); action. consumeStatementIfThen(); break;
+ }
+
+ //
+ // Rule 111: selection_statement ::= if ( expression ) statement else statement
+ //
+ case 111: { action.beforeConsume(); action. consumeStatementIfThenElse(); break;
+ }
+
+ //
+ // Rule 112: selection_statement ::= switch ( expression ) statement
+ //
+ case 112: { action.beforeConsume(); action. consumeStatementSwitch(); break;
+ }
+
+ //
+ // Rule 113: iteration_statement ::= do statement while ( expression ) ;
+ //
+ case 113: { action.beforeConsume(); action. consumeStatementDoLoop(); break;
+ }
+
+ //
+ // Rule 114: iteration_statement ::= while ( expression ) statement
+ //
+ case 114: { action.beforeConsume(); action. consumeStatementWhileLoop(); break;
+ }
+
+ //
+ // Rule 115: iteration_statement ::= for ( expression ; expression ; expression ) statement
+ //
+ case 115: { action.beforeConsume(); action. consumeStatementForLoop(true, true, true); break;
+ }
+
+ //
+ // Rule 116: iteration_statement ::= for ( expression ; expression ; ) statement
+ //
+ case 116: { action.beforeConsume(); action. consumeStatementForLoop(true, true, false); break;
+ }
+
+ //
+ // Rule 117: iteration_statement ::= for ( expression ; ; expression ) statement
+ //
+ case 117: { action.beforeConsume(); action. consumeStatementForLoop(true, false, true); break;
+ }
+
+ //
+ // Rule 118: iteration_statement ::= for ( expression ; ; ) statement
+ //
+ case 118: { action.beforeConsume(); action. consumeStatementForLoop(true, false, false); break;
+ }
+
+ //
+ // Rule 119: iteration_statement ::= for ( ; expression ; expression ) statement
+ //
+ case 119: { action.beforeConsume(); action. consumeStatementForLoop(false, true, true); break;
+ }
+
+ //
+ // Rule 120: iteration_statement ::= for ( ; expression ; ) statement
+ //
+ case 120: { action.beforeConsume(); action. consumeStatementForLoop(false, true, false); break;
+ }
+
+ //
+ // Rule 121: iteration_statement ::= for ( ; ; expression ) statement
+ //
+ case 121: { action.beforeConsume(); action. consumeStatementForLoop(false, false, true); break;
+ }
+
+ //
+ // Rule 122: iteration_statement ::= for ( ; ; ) statement
+ //
+ case 122: { action.beforeConsume(); action. consumeStatementForLoop(false, false, false); break;
+ }
+
+ //
+ // Rule 123: iteration_statement ::= for ( declaration expression ; expression ) statement
+ //
+ case 123: { action.beforeConsume(); action. consumeStatementForLoop(true, true, true); break;
+ }
+
+ //
+ // Rule 124: iteration_statement ::= for ( declaration expression ; ) statement
+ //
+ case 124: { action.beforeConsume(); action. consumeStatementForLoop(true, true, false); break;
+ }
+
+ //
+ // Rule 125: iteration_statement ::= for ( declaration ; expression ) statement
+ //
+ case 125: { action.beforeConsume(); action. consumeStatementForLoop(true, false, true); break;
+ }
+
+ //
+ // Rule 126: iteration_statement ::= for ( declaration ; ) statement
+ //
+ case 126: { action.beforeConsume(); action. consumeStatementForLoop(true, false, false); break;
+ }
+
+ //
+ // Rule 127: jump_statement ::= goto goto_identifier ;
+ //
+ case 127: { action.beforeConsume(); action. consumeStatementGoto(); break;
+ }
+
+ //
+ // Rule 128: jump_statement ::= continue ;
+ //
+ case 128: { action.beforeConsume(); action. consumeStatementContinue(); break;
+ }
+
+ //
+ // Rule 129: jump_statement ::= break ;
+ //
+ case 129: { action.beforeConsume(); action. consumeStatementBreak(); break;
+ }
+
+ //
+ // Rule 130: jump_statement ::= return ;
+ //
+ case 130: { action.beforeConsume(); action. consumeStatementReturn(false); break;
+ }
+
+ //
+ // Rule 131: jump_statement ::= return expression ;
+ //
+ case 131: { action.beforeConsume(); action. consumeStatementReturn(true); break;
+ }
+
+ //
+ // Rule 132: goto_identifier ::= identifier
+ //
+ case 132: { action.beforeConsume(); action. consumeName(); break;
+ }
+
+ //
+ // Rule 133: declaration ::= declaration_specifiers ;
+ //
+ case 133: { action.beforeConsume(); action. consumeDeclaration(false); break;
+ }
+
+ //
+ // Rule 134: declaration ::= declaration_specifiers <openscope> init_declarator_list ;
+ //
+ case 134: { action.beforeConsume(); action. consumeDeclaration(true); break;
+ }
+
+ //
+ // Rule 135: declaration_specifiers ::= <openscope> simple_declaration_specifiers
+ //
+ case 135: { action.beforeConsume(); action. consumeDeclarationSpecifiersSimple(); break;
+ }
+
+ //
+ // Rule 136: declaration_specifiers ::= <openscope> struct_or_union_declaration_specifiers
+ //
+ case 136: { action.beforeConsume(); action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 137: declaration_specifiers ::= <openscope> enum_declaration_specifiers
+ //
+ case 137: { action.beforeConsume(); action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 138: declaration_specifiers ::= <openscope> typdef_name_declaration_specifiers
+ //
+ case 138: { action.beforeConsume(); action. consumeDeclarationSpecifiersTypedefName(); break;
+ }
+
+ //
+ // Rule 165: init_declarator ::= declarator = initializer
+ //
+ case 165: { action.beforeConsume(); action. consumeDeclaratorWithInitializer(); break;
+ }
+
+ //
+ // Rule 166: storage_class_specifier ::= typedef
+ //
+ case 166: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 167: storage_class_specifier ::= extern
+ //
+ case 167: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 168: storage_class_specifier ::= static
+ //
+ case 168: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 169: storage_class_specifier ::= auto
+ //
+ case 169: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 170: storage_class_specifier ::= register
+ //
+ case 170: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 171: type_specifier ::= void
+ //
+ case 171: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 172: type_specifier ::= char
+ //
+ case 172: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 173: type_specifier ::= short
+ //
+ case 173: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 174: type_specifier ::= int
+ //
+ case 174: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 175: type_specifier ::= long
+ //
+ case 175: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 176: type_specifier ::= float
+ //
+ case 176: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 177: type_specifier ::= double
+ //
+ case 177: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 178: type_specifier ::= signed
+ //
+ case 178: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 179: type_specifier ::= unsigned
+ //
+ case 179: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 180: type_specifier ::= _Bool
+ //
+ case 180: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 181: type_specifier ::= _Complex
+ //
+ case 181: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 182: type_specifier ::= _Imaginary
+ //
+ case 182: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 183: typedef_name ::= ident
+ //
+ case 183: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 184: struct_or_union_specifier ::= struct { <openscope> struct_declaration_list_opt }
+ //
+ case 184: { action.beforeConsume(); action. consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 185: struct_or_union_specifier ::= union { <openscope> struct_declaration_list_opt }
+ //
+ case 185: { action.beforeConsume(); action. consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 186: struct_or_union_specifier ::= struct struct_or_union_identifier { <openscope> struct_declaration_list_opt }
+ //
+ case 186: { action.beforeConsume(); action. consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 187: struct_or_union_specifier ::= union struct_or_union_identifier { <openscope> struct_declaration_list_opt }
+ //
+ case 187: { action.beforeConsume(); action. consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 188: struct_or_union_specifier ::= struct struct_or_union_identifier
+ //
+ case 188: { action.beforeConsume(); action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 189: struct_or_union_specifier ::= union struct_or_union_identifier
+ //
+ case 189: { action.beforeConsume(); action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 190: struct_or_union_identifier ::= identifier
+ //
+ case 190: { action.beforeConsume(); action. consumeName(); break;
+ }
+
+ //
+ // Rule 195: struct_declaration ::= specifier_qualifier_list <openscope> struct_declarator_list ;
+ //
+ case 195: { action.beforeConsume(); action. consumeStructDeclaration(true); break;
+ }
+
+ //
+ // Rule 196: struct_declaration ::= specifier_qualifier_list ;
+ //
+ case 196: { action.beforeConsume(); action. consumeStructDeclaration(false); break;
+ }
+
+ //
+ // Rule 201: struct_declarator ::= : constant_expression
+ //
+ case 201: { action.beforeConsume(); action. consumeStructBitField(false); break;
+ }
+
+ //
+ // Rule 202: struct_declarator ::= declarator : constant_expression
+ //
+ case 202: { action.beforeConsume(); action. consumeStructBitField(true); break;
+ }
+
+ //
+ // Rule 203: enum_identifier ::= identifier
+ //
+ case 203: { action.beforeConsume(); action. consumeName(); break;
+ }
+
+ //
+ // Rule 204: enum_specifier ::= enum { <openscope> enumerator_list_opt }
+ //
+ case 204: { action.beforeConsume(); action. consumeTypeSpecifierEnumeration(false); break;
+ }
+
+ //
+ // Rule 205: enum_specifier ::= enum enum_identifier { <openscope> enumerator_list_opt }
+ //
+ case 205: { action.beforeConsume(); action. consumeTypeSpecifierEnumeration(true); break;
+ }
+
+ //
+ // Rule 206: enum_specifier ::= enum { <openscope> enumerator_list_opt , }
+ //
+ case 206: { action.beforeConsume(); action. consumeTypeSpecifierEnumeration(false); break;
+ }
+
+ //
+ // Rule 207: enum_specifier ::= enum enum_identifier { <openscope> enumerator_list_opt , }
+ //
+ case 207: { action.beforeConsume(); action. consumeTypeSpecifierEnumeration(true); break;
+ }
+
+ //
+ // Rule 208: enum_specifier ::= enum enum_identifier
+ //
+ case 208: { action.beforeConsume(); action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
+ }
+
+ //
+ // Rule 213: enumerator ::= enum_identifier
+ //
+ case 213: { action.beforeConsume(); action. consumeEnumerator(false); break;
+ }
+
+ //
+ // Rule 214: enumerator ::= enum_identifier = constant_expression
+ //
+ case 214: { action.beforeConsume(); action. consumeEnumerator(true); break;
+ }
+
+ //
+ // Rule 215: type_qualifier ::= const
+ //
+ case 215: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 216: type_qualifier ::= restrict
+ //
+ case 216: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 217: type_qualifier ::= volatile
+ //
+ case 217: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 218: function_specifier ::= inline
+ //
+ case 218: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 220: declarator ::= <openscope> pointer direct_declarator
+ //
+ case 220: { action.beforeConsume(); action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 221: direct_declarator ::= identifier
+ //
+ case 221: { action.beforeConsume(); action. consumeDirectDeclaratorIdentifier(); break;
+ }
+
+ //
+ // Rule 222: direct_declarator ::= ( declarator )
+ //
+ case 222: { action.beforeConsume(); action. consumeDirectDeclaratorBracketed(); break;
+ }
+
+ //
+ // Rule 225: array_direct_declarator ::= direct_declarator array_modifier
+ //
+ case 225: { action.beforeConsume(); action. consumeDirectDeclaratorArrayDeclarator(); break;
+ }
+
+ //
+ // Rule 226: function_direct_declarator ::= direct_declarator ( <openscope> parameter_type_list )
+ //
+ case 226: { action.beforeConsume(); action. consumeDirectDeclaratorFunctionDeclarator(true); break;
+ }
+
+ //
+ // Rule 227: function_direct_declarator ::= direct_declarator ( )
+ //
+ case 227: { action.beforeConsume(); action. consumeDirectDeclaratorFunctionDeclarator(false); break;
+ }
+
+ //
+ // Rule 229: function_declarator ::= <openscope> pointer function_direct_declarator
+ //
+ case 229: { action.beforeConsume(); action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 230: knr_direct_declarator ::= direct_declarator ( <openscope> identifier_list )
+ //
+ case 230: { action.beforeConsume(); action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
+ }
+
+ //
+ // Rule 232: knr_function_declarator ::= <openscope> pointer knr_direct_declarator
+ //
+ case 232: { action.beforeConsume(); action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 233: array_modifier ::= [ ]
+ //
+ case 233: { action.beforeConsume(); action. consumeDirectDeclaratorArrayModifier(false); break;
+ }
+
+ //
+ // Rule 234: array_modifier ::= [ <openscope> type_qualifier_list ]
+ //
+ case 234: { action.beforeConsume(); action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
+ }
+
+ //
+ // Rule 235: array_modifier ::= [ assignment_expression ]
+ //
+ case 235: { action.beforeConsume(); action. consumeDirectDeclaratorArrayModifier(true ); break;
+ }
+
+ //
+ // Rule 236: array_modifier ::= [ <openscope> type_qualifier_list assignment_expression ]
+ //
+ case 236: { action.beforeConsume(); action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true ); break;
+ }
+
+ //
+ // Rule 237: array_modifier ::= [ static assignment_expression ]
+ //
+ case 237: { action.beforeConsume(); action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true ); break;
+ }
+
+ //
+ // Rule 238: array_modifier ::= [ static <openscope> type_qualifier_list assignment_expression ]
+ //
+ case 238: { action.beforeConsume(); action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true ); break;
+ }
+
+ //
+ // Rule 239: array_modifier ::= [ <openscope> type_qualifier_list static assignment_expression ]
+ //
+ case 239: { action.beforeConsume(); action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true ); break;
+ }
+
+ //
+ // Rule 240: array_modifier ::= [ * ]
+ //
+ case 240: { action.beforeConsume(); action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
+ }
+
+ //
+ // Rule 241: array_modifier ::= [ <openscope> type_qualifier_list * ]
+ //
+ case 241: { action.beforeConsume(); action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
+ }
+
+ //
+ // Rule 242: pointer ::= *
+ //
+ case 242: { action.beforeConsume(); action. consumePointer(); break;
+ }
+
+ //
+ // Rule 243: pointer ::= pointer *
+ //
+ case 243: { action.beforeConsume(); action. consumePointer(); break;
+ }
+
+ //
+ // Rule 244: pointer ::= * <openscope> type_qualifier_list
+ //
+ case 244: { action.beforeConsume(); action. consumePointerTypeQualifierList(); break;
+ }
+
+ //
+ // Rule 245: pointer ::= pointer * <openscope> type_qualifier_list
+ //
+ case 245: { action.beforeConsume(); action. consumePointerTypeQualifierList(); break;
+ }
+
+ //
+ // Rule 253: parameter_declaration ::= declaration_specifiers init_declarator
+ //
+ case 253: { action.beforeConsume(); action. consumeParameterDeclaration(true); break;
+ }
+
+ //
+ // Rule 254: parameter_declaration ::= declaration_specifiers
+ //
+ case 254: { action.beforeConsume(); action. consumeParameterDeclaration(false); break;
+ }
+
+ //
+ // Rule 255: parameter_declaration ::= declaration_specifiers abstract_declarator
+ //
+ case 255: { action.beforeConsume(); action. consumeParameterDeclaration(true); break;
+ }
+
+ //
+ // Rule 256: identifier_list ::= identifier
+ //
+ case 256: { action.beforeConsume(); action. consumeName(); break;
+ }
+
+ //
+ // Rule 257: identifier_list ::= identifier_list , identifier
+ //
+ case 257: { action.beforeConsume(); action. consumeName(); break;
+ }
+
+ //
+ // Rule 258: type_name ::= specifier_qualifier_list
+ //
+ case 258: { action.beforeConsume(); action. consumeTypeId(false); break;
+ }
+
+ //
+ // Rule 259: type_name ::= specifier_qualifier_list abstract_declarator
+ //
+ case 259: { action.beforeConsume(); action. consumeTypeId(true); break;
+ }
+
+ //
+ // Rule 260: abstract_declarator ::= <openscope> pointer
+ //
+ case 260: { action.beforeConsume(); action. consumeDeclaratorWithPointer(false); break;
+ }
+
+ //
+ // Rule 262: abstract_declarator ::= <openscope> pointer direct_abstract_declarator
+ //
+ case 262: { action.beforeConsume(); action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 263: direct_abstract_declarator ::= ( abstract_declarator )
+ //
+ case 263: { action.beforeConsume(); action. consumeDirectDeclaratorBracketed(); break;
+ }
+
+ //
+ // Rule 264: direct_abstract_declarator ::= array_modifier
+ //
+ case 264: { action.beforeConsume(); action. consumeAbstractDeclaratorArrayModifier(false); break;
+ }
+
+ //
+ // Rule 265: direct_abstract_declarator ::= direct_abstract_declarator array_modifier
+ //
+ case 265: { action.beforeConsume(); action. consumeAbstractDeclaratorArrayModifier(true); break;
+ }
+
+ //
+ // Rule 266: direct_abstract_declarator ::= ( )
+ //
+ case 266: { action.beforeConsume(); action. consumeAbstractDeclaratorFunctionDeclarator(false, false); break;
+ }
+
+ //
+ // Rule 267: direct_abstract_declarator ::= direct_abstract_declarator ( )
+ //
+ case 267: { action.beforeConsume(); action. consumeAbstractDeclaratorFunctionDeclarator(true, false); break;
+ }
+
+ //
+ // Rule 268: direct_abstract_declarator ::= ( <openscope> parameter_type_list )
+ //
+ case 268: { action.beforeConsume(); action. consumeAbstractDeclaratorFunctionDeclarator(false, true); break;
+ }
+
+ //
+ // Rule 269: direct_abstract_declarator ::= direct_abstract_declarator ( <openscope> parameter_type_list )
+ //
+ case 269: { action.beforeConsume(); action. consumeAbstractDeclaratorFunctionDeclarator(true, true); break;
+ }
+
+ //
+ // Rule 270: initializer ::= assignment_expression
+ //
+ case 270: { action.beforeConsume(); action. consumeInitializer(); break;
+ }
+
+ //
+ // Rule 271: initializer ::= { <openscope> initializer_list }
+ //
+ case 271: { action.beforeConsume(); action. consumeInitializerList(); break;
+ }
+
+ //
+ // Rule 272: initializer ::= { <openscope> initializer_list , }
+ //
+ case 272: { action.beforeConsume(); action. consumeInitializerList(); break;
+ }
+
+ //
+ // Rule 277: designated_initializer ::= <openscope> designation initializer
+ //
+ case 277: { action.beforeConsume(); action. consumeInitializerDesignated(); break;
+ }
+
+ //
+ // Rule 281: designator ::= [ constant_expression ]
+ //
+ case 281: { action.beforeConsume(); action. consumeDesignatorArrayDesignator(); break;
+ }
+
+ //
+ // Rule 282: designator ::= . identifier
+ //
+ case 282: { action.beforeConsume(); action. consumeDesignatorFieldDesignator(); break;
+ }
+
+ //
+ // Rule 283: translation_unit ::= external_declaration_list
+ //
+ case 283: { action.beforeConsume(); action. consumeTranslationUnit(); break;
+ }
+
+ //
+ // Rule 284: translation_unit ::= $Empty
+ //
+ case 284: { action.beforeConsume(); action. consumeTranslationUnit(); break;
+ }
+
+ //
+ // Rule 289: external_declaration ::= ;
+ //
+ case 289: { action.beforeConsume(); action. consumeDeclarationEmpty(); break;
+ }
+
+ //
+ // Rule 290: external_declaration ::= ERROR_TOKEN
+ //
+ case 290: { action.beforeConsume(); action. consumeDeclarationProblem(); break;
+ }
+
+ //
+ // Rule 291: function_definition ::= declaration_specifiers <openscope> function_declarator compound_statement
+ //
+ case 291: { action.beforeConsume(); action. consumeFunctionDefinition(); break;
+ }
+
+ //
+ // Rule 292: function_definition ::= declaration_specifiers <openscope> knr_function_declarator <openscope> declaration_list compound_statement
+ //
+ case 292: { action.beforeConsume(); action. consumeFunctionDefinitionKnR(); break;
+ }
+
+ //
+ // Rule 295: constant ::= MYTHREAD
+ //
+ case 295: { action.beforeConsume(); action. consumeKeywordExpression(IUPCASTKeywordExpression.kw_mythread); break;
+ }
+
+ //
+ // Rule 296: constant ::= THREADS
+ //
+ case 296: { action.beforeConsume(); action. consumeKeywordExpression(IUPCASTKeywordExpression.kw_threads); break;
+ }
+
+ //
+ // Rule 297: constant ::= UPC_MAX_BLOCKSIZE
+ //
+ case 297: { action.beforeConsume(); action. consumeKeywordExpression(IUPCASTKeywordExpression.kw_upc_max_block_size); break;
+ }
+
+ //
+ // Rule 298: unary_expression ::= upc_localsizeof unary_expression
+ //
+ case 298: { action.beforeConsume(); action. consumeExpressionUpcSizeofOperator(IUPCASTSizeofExpression.op_upc_localsizeof); break;
+ }
+
+ //
+ // Rule 299: unary_expression ::= upc_localsizeof ( type_name )
+ //
+ case 299: { action.beforeConsume(); action. consumeExpressionUpcSizeofTypeName(IUPCASTSizeofExpression.op_upc_localsizeof); break;
+ }
+
+ //
+ // Rule 300: unary_expression ::= upc_blocksizeof unary_expression
+ //
+ case 300: { action.beforeConsume(); action. consumeExpressionUpcSizeofOperator(IUPCASTSizeofExpression.op_upc_blocksizeof); break;
+ }
+
+ //
+ // Rule 301: unary_expression ::= upc_blocksizeof ( type_name )
+ //
+ case 301: { action.beforeConsume(); action. consumeExpressionUpcSizeofTypeName(IUPCASTSizeofExpression.op_upc_blocksizeof); break;
+ }
+
+ //
+ // Rule 302: unary_expression ::= upc_elemsizeof unary_expression
+ //
+ case 302: { action.beforeConsume(); action. consumeExpressionUpcSizeofOperator(IUPCASTSizeofExpression.op_upc_elemsizeof); break;
+ }
+
+ //
+ // Rule 303: unary_expression ::= upc_elemsizeof ( type_name )
+ //
+ case 303: { action.beforeConsume(); action. consumeExpressionUpcSizeofTypeName(IUPCASTSizeofExpression.op_upc_elemsizeof); break;
+ }
+
+ //
+ // Rule 307: shared_type_qualifier ::= shared
+ //
+ case 307: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 308: reference_type_qualifier ::= relaxed
+ //
+ case 308: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 309: reference_type_qualifier ::= strict
+ //
+ case 309: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+ //
+ // Rule 310: layout_qualifier ::= [ constant_expression ]
+ //
+ case 310: { action.beforeConsume(); action. consumeLayoutQualifier(true, false); break;
+ }
+
+ //
+ // Rule 311: layout_qualifier ::= [ * ]
+ //
+ case 311: { action.beforeConsume(); action. consumeLayoutQualifier(false, true); break;
+ }
+
+ //
+ // Rule 312: layout_qualifier ::= [ ]
+ //
+ case 312: { action.beforeConsume(); action. consumeLayoutQualifier(false, false); break;
+ }
+
+ //
+ // Rule 314: synchronization_statement ::= upc_notify expression ;
+ //
+ case 314: { action.beforeConsume(); action. consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_notify, true); break;
+ }
+
+ //
+ // Rule 315: synchronization_statement ::= upc_notify ;
+ //
+ case 315: { action.beforeConsume(); action. consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_notify, false); break;
+ }
+
+ //
+ // Rule 316: synchronization_statement ::= upc_wait expression ;
+ //
+ case 316: { action.beforeConsume(); action. consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_wait, true); break;
+ }
+
+ //
+ // Rule 317: synchronization_statement ::= upc_wait ;
+ //
+ case 317: { action.beforeConsume(); action. consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_wait, false); break;
+ }
+
+ //
+ // Rule 318: synchronization_statement ::= upc_barrier expression ;
+ //
+ case 318: { action.beforeConsume(); action. consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_barrier, true); break;
+ }
+
+ //
+ // Rule 319: synchronization_statement ::= upc_barrier ;
+ //
+ case 319: { action.beforeConsume(); action. consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_barrier, false); break;
+ }
+
+ //
+ // Rule 320: synchronization_statement ::= upc_fence ;
+ //
+ case 320: { action.beforeConsume(); action. consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_fence, false); break;
+ }
+
+ //
+ // Rule 321: iteration_statement ::= upc_forall ( expression ; expression ; expression ; affinity ) statement
+ //
+ case 321: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, true, true, true); break;
+ }
+
+ //
+ // Rule 322: iteration_statement ::= upc_forall ( expression ; expression ; expression ; ) statement
+ //
+ case 322: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, true, true, false); break;
+ }
+
+ //
+ // Rule 323: iteration_statement ::= upc_forall ( expression ; expression ; ; affinity ) statement
+ //
+ case 323: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, true, false, true); break;
+ }
+
+ //
+ // Rule 324: iteration_statement ::= upc_forall ( expression ; expression ; ; ) statement
+ //
+ case 324: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, true, false, false); break;
+ }
+
+ //
+ // Rule 325: iteration_statement ::= upc_forall ( expression ; ; expression ; affinity ) statement
+ //
+ case 325: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, false, true, true); break;
+ }
+
+ //
+ // Rule 326: iteration_statement ::= upc_forall ( expression ; ; expression ; ) statement
+ //
+ case 326: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, false, true, false); break;
+ }
+
+ //
+ // Rule 327: iteration_statement ::= upc_forall ( expression ; ; ; affinity ) statement
+ //
+ case 327: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, false, false, true); break;
+ }
+
+ //
+ // Rule 328: iteration_statement ::= upc_forall ( expression ; ; ; ) statement
+ //
+ case 328: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, false, false, false); break;
+ }
+
+ //
+ // Rule 329: iteration_statement ::= upc_forall ( ; expression ; expression ; affinity ) statement
+ //
+ case 329: { action.beforeConsume(); action. consumeStatementUPCForallLoop(false, true, true, true); break;
+ }
+
+ //
+ // Rule 330: iteration_statement ::= upc_forall ( ; expression ; expression ; ) statement
+ //
+ case 330: { action.beforeConsume(); action. consumeStatementUPCForallLoop(false, true, true, false); break;
+ }
+
+ //
+ // Rule 331: iteration_statement ::= upc_forall ( ; expression ; ; affinity ) statement
+ //
+ case 331: { action.beforeConsume(); action. consumeStatementUPCForallLoop(false, true, false, true); break;
+ }
+
+ //
+ // Rule 332: iteration_statement ::= upc_forall ( ; expression ; ; ) statement
+ //
+ case 332: { action.beforeConsume(); action. consumeStatementUPCForallLoop(false, true, false, false); break;
+ }
+
+ //
+ // Rule 333: iteration_statement ::= upc_forall ( ; ; expression ; affinity ) statement
+ //
+ case 333: { action.beforeConsume(); action. consumeStatementUPCForallLoop(false, false, true, true); break;
+ }
+
+ //
+ // Rule 334: iteration_statement ::= upc_forall ( ; ; expression ; ) statement
+ //
+ case 334: { action.beforeConsume(); action. consumeStatementUPCForallLoop(false, false, true, false); break;
+ }
+
+ //
+ // Rule 335: iteration_statement ::= upc_forall ( ; ; ; affinity ) statement
+ //
+ case 335: { action.beforeConsume(); action. consumeStatementUPCForallLoop(false, false, false, true); break;
+ }
+
+ //
+ // Rule 336: iteration_statement ::= upc_forall ( ; ; ; ) statement
+ //
+ case 336: { action.beforeConsume(); action. consumeStatementUPCForallLoop(false, false, false, false); break;
+ }
+
+ //
+ // Rule 337: iteration_statement ::= upc_forall ( declaration expression ; expression ; affinity ) statement
+ //
+ case 337: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, true, true, true); break;
+ }
+
+ //
+ // Rule 338: iteration_statement ::= upc_forall ( declaration expression ; expression ; ) statement
+ //
+ case 338: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, true, true, false); break;
+ }
+
+ //
+ // Rule 339: iteration_statement ::= upc_forall ( declaration expression ; ; affinity ) statement
+ //
+ case 339: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, true, false, true); break;
+ }
+
+ //
+ // Rule 340: iteration_statement ::= upc_forall ( declaration expression ; ; ) statement
+ //
+ case 340: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, true, false, false); break;
+ }
+
+ //
+ // Rule 341: iteration_statement ::= upc_forall ( declaration ; expression ; affinity ) statement
+ //
+ case 341: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, false, true, true); break;
+ }
+
+ //
+ // Rule 342: iteration_statement ::= upc_forall ( declaration ; expression ; ) statement
+ //
+ case 342: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, false, true, false); break;
+ }
+
+ //
+ // Rule 343: iteration_statement ::= upc_forall ( declaration ; ; affinity ) statement
+ //
+ case 343: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, false, false, true); break;
+ }
+
+ //
+ // Rule 344: iteration_statement ::= upc_forall ( declaration ; ; ) statement
+ //
+ case 344: { action.beforeConsume(); action. consumeStatementUPCForallLoop(true, false, false, false); break;
+ }
+
+ //
+ // Rule 346: affinity ::= continue
+ //
+ case 346: { action.beforeConsume(); action. consumeToken(); break;
+ }
+
+
+ default:
+ break;
+ }
+ return;
+ }
+}
+
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParserprs.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParserprs.java
new file mode 100644
index 00000000000..48a117f6539
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParserprs.java
@@ -0,0 +1,2025 @@
+/*******************************************************************************
+* Copyright (c) 2006, 2007 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* IBM Corporation - initial API and implementation
+*********************************************************************************/
+
+// This file was generated by LPG
+
+package org.eclipse.cdt.internal.core.dom.parser.upc;
+
+public class UPCParserprs implements lpg.lpgjavaruntime.ParseTable, UPCParsersym {
+
+ public interface IsKeyword {
+ public final static byte isKeyword[] = {0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0
+ };
+ };
+ public final static byte isKeyword[] = IsKeyword.isKeyword;
+ public final boolean isKeyword(int index) { return isKeyword[index] != 0; }
+
+ public interface BaseCheck {
+ public final static short baseCheck[] = {0,
+ 0,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,3,1,4,
+ 3,4,3,3,2,2,7,8,1,3,
+ 1,2,2,2,2,2,2,2,2,2,
+ 4,1,4,1,3,3,3,1,3,3,
+ 1,3,3,1,3,3,3,3,1,3,
+ 3,1,3,1,3,1,3,1,3,1,
+ 3,1,5,1,3,3,3,3,3,3,
+ 3,3,3,3,3,1,1,1,3,1,
+ 1,1,1,1,1,1,1,3,4,3,
+ 1,2,4,1,2,1,1,1,2,5,
+ 7,5,7,5,9,8,8,7,8,7,
+ 7,6,8,7,7,6,3,2,2,2,
+ 3,1,2,4,2,2,2,2,1,2,
+ 1,2,1,2,3,2,1,1,2,3,
+ 2,2,1,3,2,2,1,3,2,2,
+ 1,1,3,1,3,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,5,5,6,6,2,2,1,
+ 1,0,1,2,4,2,1,1,3,1,
+ 2,3,1,5,6,6,7,2,1,0,
+ 1,3,1,3,1,1,1,1,1,3,
+ 1,3,1,1,2,5,3,1,3,5,
+ 1,3,2,4,3,5,4,6,6,3,
+ 5,1,2,3,4,1,2,1,3,1,
+ 1,3,2,1,2,1,3,1,2,2,
+ 1,3,3,1,2,2,3,4,5,1,
+ 4,5,1,1,3,3,3,2,1,2,
+ 3,2,1,0,1,2,1,1,1,1,
+ 4,6,1,2,1,1,1,2,4,2,
+ 4,2,4,1,1,2,1,1,1,3,
+ 3,2,1,3,2,3,2,3,2,2,
+ 11,10,10,9,10,9,9,8,10,9,
+ 9,8,9,8,8,7,10,9,9,8,
+ 9,8,8,7,1,1,-130,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-188,0,-7,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-115,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-190,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-2,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-95,0,-19,0,0,-45,0,
+ 0,0,0,0,0,0,-202,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-21,
+ 0,0,0,0,0,0,0,0,0,0,
+ -251,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-96,0,-24,0,0,0,0,0,0,
+ 0,0,0,0,-253,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-35,-36,-53,0,0,
+ 0,0,0,0,0,0,0,0,-281,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-54,
+ -55,-56,0,0,0,0,0,0,0,0,
+ 0,0,-303,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-57,-58,-59,0,0,0,0,
+ 0,0,0,0,0,0,-305,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-60,-61,-62,
+ 0,0,0,0,0,0,0,0,0,0,
+ -306,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-63,-86,-88,0,0,0,0,0,0,
+ 0,0,0,0,-317,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-126,-127,-135,0,0,
+ 0,0,0,0,0,0,0,0,-320,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-166,
+ -167,-168,0,0,0,0,0,0,0,0,
+ 0,0,-327,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-169,-170,-171,0,0,0,0,
+ 0,0,0,0,0,0,-332,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-172,-173,-174,
+ 0,0,0,0,0,0,0,0,0,0,
+ -340,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-175,-176,-177,0,0,0,0,0,0,
+ 0,0,0,0,-341,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-178,-179,-180,0,0,
+ 0,0,0,0,0,0,0,0,-343,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-181,
+ -199,-200,0,0,0,0,0,0,0,0,
+ 0,0,-344,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-201,-203,-204,0,0,0,0,
+ 0,0,0,0,0,0,-346,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-205,-207,-208,
+ 0,0,0,0,0,0,0,0,0,0,
+ -350,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-210,-218,-228,0,0,0,0,0,0,
+ 0,0,0,0,-351,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-229,-230,-231,0,0,
+ 0,0,0,0,0,0,0,0,-352,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-232,
+ -237,-239,0,0,0,0,0,0,0,0,
+ 0,0,-354,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-248,-252,-260,0,0,0,0,
+ 0,0,0,0,0,0,-357,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-278,-284,-326,
+ 0,0,0,0,0,0,0,0,0,0,
+ -358,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-360,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-363,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-368,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-369,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -370,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-371,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-373,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-374,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-375,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -377,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-378,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-379,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-381,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-382,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -384,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-387,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-388,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-389,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-390,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -391,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-392,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-12,0,0,
+ 0,0,0,0,0,0,0,0,-394,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-40,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-108,0,0,0,
+ 0,0,0,0,0,0,0,-102,0,0,
+ 0,0,0,0,0,0,0,-41,0,0,
+ 0,0,0,0,-90,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-9,0,0,0,0,-109,0,
+ 0,0,0,0,0,0,0,0,0,-103,
+ 0,0,0,0,0,0,0,0,0,-42,
+ 0,0,0,0,0,0,-91,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-10,0,0,0,0,
+ -110,0,0,0,0,0,0,0,0,0,
+ 0,-104,0,0,0,0,0,0,0,0,
+ 0,-43,0,0,0,0,0,0,-92,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-37,0,0,
+ 0,0,-111,0,0,0,0,0,0,0,
+ 0,0,0,0,-49,0,0,0,0,0,
+ 0,0,0,-44,0,0,0,0,0,0,
+ -93,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-105,0,0,0,0,
+ 0,0,0,-77,0,0,-142,0,0,0,
+ 0,0,0,-16,0,-51,0,0,0,0,
+ 0,0,-94,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-286,0,-20,0,0,0,-82,0,0,
+ 0,0,0,-33,0,0,0,0,-264,0,
+ 0,0,0,0,0,0,0,-39,0,0,
+ 0,-32,0,0,-245,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-46,
+ 0,0,0,0,0,0,0,0,0,-112,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-246,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-47,0,
+ 0,0,0,0,0,0,0,0,0,-113,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-213,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-131,-215,-119,0,-222,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-106,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-183,-156,0,-265,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-8,-38,0,-282,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-191,0,-123,-22,-4,-25,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -137,0,-107,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-308,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-234,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-48,0,
+ 0,0,0,0,0,0,-140,-198,0,0,
+ -50,0,0,0,0,0,0,-52,0,0,
+ 0,0,0,0,-309,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-312,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-329,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-330,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -334,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-335,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-337,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-356,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-362,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -365,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-366,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-386,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-144,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-192,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-193,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -194,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-195,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-261,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-117,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-271,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -272,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-274,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-275,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-293,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-295,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -297,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-31,0,0,-298,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-76,0,-300,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-302,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-311,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -314,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-315,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-64,0,0,-319,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -84,0,-322,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-85,0,-323,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -339,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-66,0,0,-348,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-74,0,-83,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-78,0,0,
+ 0,-114,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-68,0,0,-97,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-98,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-81,0,0,-116,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-125,0,0,-87,
+ 0,0,0,0,0,0,-99,0,0,0,
+ 0,0,0,-159,0,-247,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-133,0,0,-249,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -134,0,0,-250,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-304,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-224,0,-136,-165,
+ 0,-17,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-79,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-100,0,0,0,0,0,0,-120,
+ -196,-157,0,0,-101,0,0,0,0,0,
+ 0,-143,0,0,0,0,0,0,0,0,
+ 0,0,0,-139,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-287,0,-182,0,-283,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-145,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -146,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-147,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-148,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-149,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-150,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-151,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-152,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-153,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-154,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-155,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -187,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-209,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-129,-197,-132,0,
+ -225,0,-160,-161,-162,-163,-164,0,-216,-206,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-233,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -236,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-262,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-69,0,
+ -124,0,0,-257,0,0,0,0,0,0,
+ -184,0,0,-270,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-285,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-3,
+ 0,0,-158,-15,-14,0,-221,0,0,-219,
+ -185,-186,0,-211,0,0,-238,0,-254,0,
+ 0,-266,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-256,0,0,0,0,
+ 0,0,0,0,-217,0,0,0,0,0,
+ -80,0,-223,0,0,-226,-235,0,0,0,
+ -268,-258,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -1,0,0,0,-6,0,0,0,0,0,
+ 0,0,0,-189,0,0,0,0,-30,0,
+ 0,0,0,0,0,0,0,0,0,-240,
+ 0,0,-241,-263,0,0,-289,0,-290,0,
+ 0,0,0,0,0,-5,-34,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-242,0,0,-11,0,0,0,-243,
+ -13,-255,0,0,0,0,0,0,0,0,
+ -244,0,0,0,0,0,0,-27,0,-307,
+ -277,0,0,0,0,-28,0,0,-273,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -29,0,0,0,-291,-279,-65,0,0,-67,
+ 0,-276,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-138,0,-75,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-280,0,0,-118,0,-294,0,0,0,
+ 0,0,0,0,0,-122,0,0,-18,-292,
+ 0,0,0,-318,0,0,0,0,0,0,
+ -227,0,0,-23,0,0,0,0,0,0,
+ 0,-269,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-321,0,
+ -288,-26,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-70,0,-296,0,0,0,
+ 0,-325,0,-128,0,0,0,0,0,0,
+ 0,0,-71,0,0,0,0,0,0,0,
+ 0,-72,0,-328,-89,0,-299,0,0,0,
+ 0,0,0,0,0,0,-301,0,0,0,
+ 0,-212,-73,-267,0,0,0,0,0,0,
+ 0,0,0,-310,-313,0,0,0,0,0,
+ 0,-121,-316,0,0,0,0,-324,-331,-336,
+ -259,-141,0,0,-214,0,0,0,-220,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-338,0,0,0,-333,0,-342,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-345,-347,0,0,
+ 0,-353,-349,-355,-359,0,-361,-364,0,-372,
+ -367,-376,-380,-383,-385,-393,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0
+ };
+ };
+ public final static short baseCheck[] = BaseCheck.baseCheck;
+ public final int baseCheck(int index) { return baseCheck[index]; }
+ public final static short rhs[] = baseCheck;
+ public final int rhs(int index) { return rhs[index]; };
+
+ public interface BaseAction {
+ public final static char baseAction[] = {
+ 84,22,1,1,40,40,21,21,41,41,
+ 19,19,2,2,2,2,3,3,3,4,
+ 4,4,4,4,4,4,4,4,4,85,
+ 85,5,5,5,5,5,5,5,5,5,
+ 5,5,6,6,7,7,7,7,8,8,
+ 8,9,9,9,10,10,10,10,10,11,
+ 11,11,12,12,13,13,14,14,15,15,
+ 16,16,17,17,18,18,18,18,18,18,
+ 18,18,18,18,18,18,25,23,20,20,
+ 52,26,26,26,26,26,26,26,27,27,
+ 27,32,24,24,86,86,71,71,28,28,
+ 29,29,29,30,30,30,30,30,30,30,
+ 30,30,30,30,30,30,30,31,31,31,
+ 31,31,87,49,49,34,34,34,34,48,
+ 48,48,48,48,48,68,68,68,68,68,
+ 88,88,88,88,89,89,89,89,90,90,
+ 90,90,72,72,61,61,38,38,38,38,
+ 38,57,57,57,57,57,57,57,57,57,
+ 57,57,57,75,73,73,73,73,73,73,
+ 76,62,62,63,63,58,58,44,91,91,
+ 77,77,77,64,74,74,74,74,74,78,
+ 78,79,79,69,69,35,35,35,39,50,
+ 50,45,45,45,45,46,47,47,92,92,
+ 80,94,94,42,42,42,42,42,42,42,
+ 42,42,54,54,54,54,65,65,59,59,
+ 59,60,60,55,55,55,93,93,51,51,
+ 66,66,66,56,56,56,56,56,56,56,
+ 53,53,53,70,70,70,70,67,95,96,
+ 96,81,81,84,84,97,97,82,82,82,
+ 82,83,83,98,98,2,2,2,5,5,
+ 5,5,5,5,35,35,36,36,37,37,
+ 99,99,99,26,33,33,33,33,33,33,
+ 33,30,30,30,30,30,30,30,30,30,
+ 30,30,30,30,30,30,30,30,30,30,
+ 30,30,30,30,30,43,43,161,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,108,978,760,4200,
+ 118,92,4070,106,91,93,94,95,96,1012,
+ 313,4057,1307,17,16,19,538,42,44,570,
+ 572,571,605,604,638,877,107,1,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,108,978,104,4200,
+ 324,92,4070,106,91,93,94,95,96,1012,
+ 313,4057,706,397,337,24,420,212,103,1307,
+ 17,16,19,538,42,39,107,241,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,108,978,105,306,
+ 654,92,4070,1114,91,93,94,95,96,1012,
+ 313,241,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 108,978,337,23,655,92,4070,100,91,93,
+ 94,95,96,1012,313,241,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,108,978,218,965,503,92,
+ 4070,98,91,93,94,95,96,1012,313,241,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,108,978,
+ 714,393,291,92,4070,99,91,93,94,95,
+ 96,1012,313,241,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,108,978,134,250,224,92,4070,114,
+ 91,93,94,95,96,1012,313,241,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,108,978,571,409,
+ 560,92,4070,112,91,93,94,95,96,1012,
+ 313,241,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 108,978,418,343,775,92,4070,1150,91,93,
+ 94,95,96,1012,313,241,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,108,978,512,969,1008,92,
+ 4070,126,91,93,94,95,96,1012,313,241,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,108,978,
+ 394,526,807,92,4070,122,91,93,94,95,
+ 96,1012,313,241,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,108,978,809,439,769,92,4070,344,
+ 91,93,94,95,96,1012,313,241,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,108,978,742,819,
+ 831,92,4070,336,91,93,94,95,96,1012,
+ 313,241,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 108,978,905,751,652,92,4070,125,91,93,
+ 94,95,96,1012,313,241,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,108,978,898,315,537,92,
+ 4070,124,91,93,94,95,96,1012,313,241,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,108,978,
+ 561,289,340,92,4070,121,91,93,94,95,
+ 96,1012,313,241,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,108,978,452,595,816,92,4070,120,
+ 91,93,94,95,96,1012,313,241,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,108,978,1000,763,
+ 1134,92,4070,118,91,93,94,95,96,1012,
+ 313,241,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 108,978,1164,1065,1010,92,4070,111,91,93,
+ 94,95,96,1012,313,241,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,108,978,1011,1071,1101,92,
+ 4070,343,91,93,94,95,96,1012,313,241,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,108,978,
+ 1135,1167,81,92,4070,342,91,93,94,95,
+ 96,1012,313,241,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,108,978,154,1194,828,92,4070,340,
+ 91,93,94,95,96,1012,313,241,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,108,978,990,993,
+ 877,92,4070,335,91,93,94,95,96,1012,
+ 313,241,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 108,978,4710,4710,4710,92,4070,334,91,93,
+ 94,95,96,1012,313,241,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,108,978,4710,4710,4710,92,
+ 4070,332,91,93,94,95,96,1012,313,241,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,108,978,
+ 4710,4710,4710,92,4070,328,91,93,94,95,
+ 96,1012,313,241,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,108,978,4710,4710,4710,92,4070,123,
+ 91,93,94,95,96,1012,313,241,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,108,978,4710,4710,
+ 4710,92,4070,119,91,93,94,95,96,1012,
+ 313,241,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 108,978,4710,4710,4710,92,4070,117,91,93,
+ 94,95,96,1012,313,241,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,108,978,4710,4710,4710,92,
+ 4070,116,91,93,94,95,96,1012,313,241,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,108,978,
+ 4710,4710,4710,92,4070,341,91,93,94,95,
+ 96,1012,313,241,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,108,978,4710,4710,4710,92,4070,339,
+ 91,93,94,95,96,1012,313,241,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,108,978,4710,4710,
+ 4710,92,4070,338,91,93,94,95,96,1012,
+ 313,241,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 108,978,4710,4710,4710,92,4070,333,91,93,
+ 94,95,96,1012,313,241,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,108,978,4710,4710,4710,92,
+ 4070,331,91,93,94,95,96,1012,313,241,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,108,978,
+ 4710,4710,4710,92,4070,330,91,93,94,95,
+ 96,1012,313,241,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,108,978,4710,4710,4710,92,4070,327,
+ 91,93,94,95,96,1012,313,241,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,108,978,4710,4710,
+ 4710,92,4070,326,91,93,94,95,96,1012,
+ 313,241,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 108,978,4710,4710,4710,92,4070,324,91,93,
+ 94,95,96,1012,313,241,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,108,978,4710,4710,4710,92,
+ 4070,115,91,93,94,95,96,1012,313,241,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,108,978,
+ 4710,4710,4710,92,4070,337,91,93,94,95,
+ 96,1012,313,241,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,108,978,4710,4710,4710,92,4070,329,
+ 91,93,94,95,96,1012,313,241,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,108,978,4710,4710,
+ 4710,92,4070,325,91,93,94,95,96,1012,
+ 313,241,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 108,978,4710,4710,4710,92,4070,323,91,93,
+ 94,95,96,1012,313,241,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,108,978,4710,4710,527,92,
+ 4070,322,91,93,94,95,96,1012,313,241,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,108,978,
+ 4710,4710,4710,92,4070,321,91,93,94,95,
+ 96,1012,313,1157,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,504,674,4710,4200,3385,1307,17,16,
+ 19,538,42,44,570,572,808,197,1307,17,
+ 16,19,538,42,44,570,740,4545,1187,17,
+ 16,19,538,302,3361,1157,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,271,674,4710,4200,3385,1307,
+ 17,16,19,538,42,44,570,572,809,197,
+ 1307,17,16,19,538,42,44,570,741,4545,
+ 1217,17,16,19,538,300,3584,1157,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,350,674,4710,4200,
+ 3385,1307,17,16,19,538,42,44,570,572,
+ 810,197,1307,17,16,19,538,42,44,742,
+ 436,4545,1247,17,16,19,538,298,4063,1157,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,581,674,
+ 4710,4200,3385,1307,17,16,19,538,42,44,
+ 570,572,842,197,4710,929,17,16,19,538,
+ 42,35,470,4545,1277,17,16,19,538,40,
+ 4064,1157,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 4710,674,4261,4200,3385,311,1307,17,16,19,
+ 538,42,44,774,581,197,4710,929,17,16,
+ 19,538,42,35,791,4545,1337,17,16,19,
+ 538,33,4065,1157,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,1434,674,54,4200,3385,240,753,142,
+ 304,305,140,144,739,4710,4710,197,2374,929,
+ 17,16,19,538,42,35,4407,4545,374,227,
+ 4428,4309,719,134,4066,1031,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,3051,674,291,4200,4389,241,
+ 1307,17,16,19,538,42,38,4710,310,4057,
+ 1307,17,16,19,538,42,44,570,572,571,
+ 605,604,843,280,3027,1031,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,3099,674,4710,4200,4412,1307,
+ 17,16,19,538,42,37,4710,4710,4710,4057,
+ 1307,17,16,19,538,42,44,570,572,571,
+ 605,844,4710,4710,3075,1125,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,270,276,392,874,4362,468,17,
+ 16,19,538,673,44,570,572,571,605,604,
+ 638,606,640,639,672,74,4324,1307,17,16,
+ 19,538,42,44,570,572,571,775,273,4710,
+ 247,304,305,247,304,305,4710,185,234,4214,
+ 223,224,274,62,581,4219,1125,17,16,19,
+ 538,673,44,570,572,571,605,604,638,606,
+ 640,639,672,74,270,2184,1397,38,4362,675,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,270,3478,223,
+ 224,4362,1129,1081,874,54,811,54,3677,273,
+ 4710,141,304,305,139,143,4710,4710,4710,225,
+ 272,320,4710,274,4459,133,4405,4410,4204,4149,
+ 198,338,275,1307,17,16,19,538,42,44,
+ 570,572,571,776,4267,184,276,675,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,270,246,304,305,4362,
+ 1307,17,16,19,538,42,44,570,572,571,
+ 605,604,638,606,640,639,672,73,28,1307,
+ 17,16,19,538,42,36,2375,374,764,4710,
+ 275,1307,17,16,19,538,42,34,1337,17,
+ 16,19,538,32,276,708,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,4710,674,753,235,345,708,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,4544,674,
+ 787,4710,345,708,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,4618,674,1059,4371,345,708,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,4642,674,1093,4710,
+ 345,708,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 4644,674,1161,4710,345,708,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,4645,674,1195,4710,345,708,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,4647,674,
+ 1229,4710,345,708,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,4648,674,1467,4710,345,708,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,4652,674,1569,4710,
+ 345,708,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 4653,674,1637,4710,345,708,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,4654,674,1671,4710,345,708,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,4655,674,
+ 1875,4710,345,1307,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,85,4656,1001,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,319,674,4710,4710,4320,1001,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,317,674,4710,4710,
+ 4323,1001,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 315,674,4710,4710,4353,1001,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,130,674,4710,4710,4360,614,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,4327,1307,17,
+ 16,19,538,42,44,570,572,571,605,604,
+ 638,606,640,910,247,304,305,1001,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,3123,674,4710,4710,
+ 4447,1001,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 3147,674,4710,4710,4517,1001,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,3195,674,4710,4710,4547,1001,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,3219,674,
+ 4710,4710,4557,1001,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,2585,674,4710,4710,4574,1001,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,2609,674,4710,4710,
+ 4575,1001,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 3315,674,54,4710,4583,959,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,4563,674,685,752,4464,959,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,222,674,
+ 719,4710,4499,1001,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,3387,674,4710,4710,4588,1001,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,2657,674,4710,4710,
+ 4589,1001,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 2705,674,4710,4710,4590,1001,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,2729,674,54,4710,4614,959,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,88,4445,674,
+ 855,752,4620,959,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,88,3742,674,923,752,4637,959,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,88,18,674,957,4710,
+ 4638,1001,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,88,
+ 2825,674,54,4710,4651,959,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,88,4456,674,1365,578,4650,644,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,2567,396,347,
+ 4710,4592,1307,17,16,19,538,42,44,570,
+ 572,571,605,604,638,606,876,54,102,233,
+ 959,17,16,19,538,673,44,570,572,571,
+ 605,604,638,606,640,639,672,74,29,4151,
+ 225,21,1307,17,16,19,538,673,44,570,
+ 572,571,605,604,638,606,640,639,672,74,
+ 88,4710,674,275,4710,3680,1307,17,16,19,
+ 538,673,44,570,572,571,605,604,638,606,
+ 640,639,672,74,88,2501,674,754,4710,878,
+ 1307,17,16,19,538,42,35,1307,17,16,
+ 19,538,42,47,752,4067,1307,17,16,19,
+ 538,673,44,570,572,571,605,604,638,606,
+ 640,639,672,74,88,1014,674,54,204,4381,
+ 1307,17,16,19,538,673,44,570,572,571,
+ 605,604,638,606,640,639,672,74,88,2355,
+ 674,287,4710,4406,1307,17,16,19,538,673,
+ 44,570,572,571,605,604,638,606,640,639,
+ 672,74,88,4595,674,4710,4710,4442,1307,17,
+ 16,19,538,673,44,570,572,571,605,604,
+ 638,606,640,639,672,74,88,358,674,1067,
+ 374,4522,844,17,16,19,538,42,44,570,
+ 572,571,605,604,638,606,640,639,672,90,
+ 1061,17,16,19,538,673,44,570,572,571,
+ 605,604,638,606,640,639,672,74,270,264,
+ 20,225,312,1307,17,16,19,538,42,46,
+ 811,1129,1099,4222,2248,1307,17,16,19,538,
+ 42,45,1093,17,16,19,538,42,43,196,
+ 129,4710,2423,165,1367,17,16,19,538,673,
+ 44,570,572,571,605,604,638,606,640,639,
+ 672,74,4207,681,265,874,4599,1061,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,270,1307,17,16,19,
+ 538,673,44,570,572,571,605,604,638,606,
+ 640,639,672,74,84,264,187,4710,4214,223,
+ 224,4710,4710,4710,4710,4710,4710,4710,4710,4222,
+ 277,1307,17,16,19,538,673,44,570,572,
+ 571,605,604,638,606,640,639,672,74,83,
+ 1307,17,16,19,538,673,44,570,572,571,
+ 605,604,638,606,640,639,672,74,82,1307,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,81,1307,17,
+ 16,19,538,673,44,570,572,571,605,604,
+ 638,606,640,639,672,74,80,1307,17,16,
+ 19,538,673,44,570,572,571,605,604,638,
+ 606,640,639,672,74,79,1307,17,16,19,
+ 538,673,44,570,572,571,605,604,638,606,
+ 640,639,672,74,78,1307,17,16,19,538,
+ 673,44,570,572,571,605,604,638,606,640,
+ 639,672,74,77,1307,17,16,19,538,673,
+ 44,570,572,571,605,604,638,606,640,639,
+ 672,74,76,1307,17,16,19,538,673,44,
+ 570,572,571,605,604,638,606,640,639,672,
+ 74,75,1307,17,16,19,538,673,44,570,
+ 572,571,605,604,638,606,640,639,672,74,
+ 89,1307,17,16,19,538,42,44,570,572,
+ 571,605,604,638,606,640,639,672,90,1307,
+ 17,16,19,538,42,44,570,572,571,605,
+ 604,638,606,640,639,672,90,811,1129,753,
+ 4710,753,4710,752,752,752,752,755,4710,752,
+ 1129,4710,4710,214,4710,4710,133,128,4710,4304,
+ 227,4562,267,4564,1046,1047,1048,1080,22,109,
+ 226,1115,1307,17,16,19,538,673,44,570,
+ 572,571,605,604,638,606,640,639,672,74,
+ 30,1307,17,16,19,538,42,44,570,572,
+ 571,605,604,638,606,640,639,672,90,1307,
+ 17,16,19,538,673,44,570,572,571,605,
+ 604,638,606,640,639,672,74,4329,4710,570,
+ 4710,570,4710,4710,581,4710,4710,4710,4710,4710,
+ 4710,874,4710,201,1307,17,16,19,538,42,
+ 44,570,572,571,605,604,638,606,640,639,
+ 672,90,1307,17,16,19,538,42,44,570,
+ 572,571,605,604,638,606,640,639,672,90,
+ 500,183,186,516,142,557,183,374,3773,4710,
+ 1373,875,874,706,1375,706,202,874,211,899,
+ 211,4710,1398,4710,266,4471,2118,3567,707,4211,
+ 707,230,4710,4710,4380,141,304,305,139,143,
+ 142,304,305,140,144,264,450,237,4205,2447,
+ 223,537,205,206,536,573,225,4295,207,3732,
+ 271,276,4309,54,265,162,752,897,135,4266,
+ 4710,752,462,2446,4356,4361,2234,4154,4401,4386,
+ 4378,247,304,305,231,2426,195,263,136,137,
+ 138,321,268,266,4501,738,2252,264,3192,4710,
+ 3478,223,224,4710,142,536,3679,223,708,876,
+ 289,3732,4710,4200,264,4710,253,3478,223,224,
+ 1129,255,3217,1129,374,2476,2184,374,3732,374,
+ 141,304,305,139,143,4710,380,142,4266,318,
+ 288,232,316,2194,141,304,305,139,143,3478,
+ 223,224,4295,1129,536,289,1409,2194,4200,2184,
+ 1129,1440,814,146,236,162,4295,238,4710,239,
+ 2476,1129,314,285,287,420,2234,145,1526,131,
+ 374,752,3478,223,224,288,1538,3217,4336,1129,
+ 127,141,304,305,139,143,141,304,305,139,
+ 143,1569,583,4710,4474,900,752,248,3171,4502,
+ 248,4710,1129,141,304,305,139,143,286,287,
+ 281,141,304,305,139,143,4515,617,249,4200,
+ 142,3243,4200,4710,4533,4710,141,304,305,139,
+ 143,197,752,279,197,248,27,1129,4710,4542,
+ 4200,3730,2184,4710,3730,4710,248,3777,2222,1452,
+ 752,4710,4255,651,752,193,3267,4200,193,2376,
+ 4582,577,2474,4582,1483,3478,223,224,4200,197,
+ 536,269,62,251,4710,821,4710,4069,1013,3730,
+ 197,163,4710,4200,142,304,305,140,144,752,
+ 3730,577,1495,193,2184,4255,4710,3775,4582,142,
+ 304,305,140,144,193,1581,4710,1129,4161,4582,
+ 889,4210,752,4200,968,3677,251,3478,223,224,
+ 4271,1013,1081,1612,4710,4255,3291,142,304,305,
+ 140,144,1624,4643,752,198,4200,1129,292,4710,
+ 142,304,305,140,144,3773,251,1129,4057,199,
+ 4271,1013,822,54,822,1025,3339,2424,142,304,
+ 305,140,144,294,1129,1129,3363,142,304,305,
+ 140,144,1374,1129,4200,4200,4200,264,1129,1129,
+ 1129,829,338,2633,2681,338,4255,4057,4255,338,
+ 4710,3732,3411,4710,4200,4710,4710,3435,2753,2777,
+ 4710,259,293,4200,1129,4710,197,251,752,251,
+ 752,4069,1013,4460,1013,4255,3730,246,304,305,
+ 246,304,305,2801,246,304,305,752,752,1127,
+ 194,1263,752,1129,752,752,252,752,752,4710,
+ 752,1129,752,752,752,752,752,2378,1297,1331,
+ 4246,4524,113,1399,2989,1433,1501,4710,1535,1603,
+ 2849,1705,4710,1739,1773,1807,1841,1909,4710,0,
+ 307,3682,0,148,4712,0,1,4713,0,1,
+ 4712,0,4719,1,0,1,979,0,1,4966,
+ 0,9,11,0,1,4931,0,110,991,0
+ };
+ };
+ public final static char baseAction[] = BaseAction.baseAction;
+ public final int baseAction(int index) { return baseAction[index]; }
+ public final static char lhs[] = baseAction;
+ public final int lhs(int index) { return lhs[index]; };
+
+ public interface TermCheck {
+ public final static byte termCheck[] = {0,
+ 0,1,2,3,4,5,6,7,8,9,
+ 10,11,12,13,14,15,16,17,18,19,
+ 20,21,22,23,24,25,26,27,28,29,
+ 30,31,32,33,34,35,36,0,1,39,
+ 40,41,42,43,44,45,46,47,48,49,
+ 50,51,52,0,54,55,56,0,58,59,
+ 60,0,1,2,64,65,66,67,68,69,
+ 70,71,72,0,37,75,76,77,78,79,
+ 0,1,2,3,4,5,6,7,8,9,
+ 10,11,12,13,14,15,16,17,18,19,
+ 20,21,22,23,24,25,26,27,28,29,
+ 30,31,32,33,34,35,36,0,57,39,
+ 40,41,42,43,44,45,46,47,48,49,
+ 50,51,52,0,54,55,56,0,58,59,
+ 60,0,1,2,64,65,66,67,68,69,
+ 70,71,72,0,37,75,76,77,78,79,
+ 0,1,2,3,4,5,6,7,8,9,
+ 10,11,12,13,14,15,16,17,18,19,
+ 20,21,22,23,24,25,26,27,28,29,
+ 30,31,32,33,34,35,36,0,1,39,
+ 3,41,42,43,44,45,46,47,48,49,
+ 50,51,52,60,54,55,56,0,58,59,
+ 60,88,89,0,64,65,66,67,68,69,
+ 70,71,72,0,37,75,76,77,78,79,
+ 0,1,2,3,4,5,0,0,0,0,
+ 2,4,12,13,14,15,16,17,18,19,
+ 20,21,22,23,24,25,26,27,28,29,
+ 0,31,2,0,0,0,1,2,3,39,
+ 6,7,8,9,10,11,0,40,0,1,
+ 0,74,6,7,8,9,10,11,58,59,
+ 60,31,12,13,64,65,66,67,68,69,
+ 70,71,72,90,0,75,76,77,78,79,
+ 0,73,2,0,4,5,6,7,8,9,
+ 10,11,83,84,85,86,0,0,2,0,
+ 1,5,0,6,7,8,9,10,11,0,
+ 30,2,32,33,34,35,36,0,1,39,
+ 3,41,42,43,44,45,46,47,48,49,
+ 50,51,52,0,54,55,56,4,58,0,
+ 31,2,0,4,5,6,7,8,9,10,
+ 11,0,0,0,37,0,1,6,7,8,
+ 9,10,11,0,90,12,13,87,0,30,
+ 87,32,33,34,35,36,74,0,39,0,
+ 41,42,43,44,45,46,47,48,49,50,
+ 51,52,37,54,55,56,63,58,0,97,
+ 98,99,100,101,102,103,104,105,106,0,
+ 31,0,1,61,62,6,7,8,9,10,
+ 11,0,1,2,0,4,87,0,1,2,
+ 3,4,5,6,7,8,9,10,11,12,
+ 13,14,15,16,17,18,19,20,21,22,
+ 23,24,25,26,27,28,29,30,37,0,
+ 92,2,0,1,5,6,7,8,9,10,
+ 11,0,95,96,53,0,1,15,16,4,
+ 0,83,84,85,86,0,0,0,2,30,
+ 63,32,33,34,35,36,0,12,13,37,
+ 41,42,43,44,45,46,47,48,49,50,
+ 51,52,37,54,55,56,0,31,2,0,
+ 0,5,6,7,8,9,10,11,53,0,
+ 0,2,0,1,2,3,0,0,0,3,
+ 0,4,80,3,14,74,30,0,32,33,
+ 34,35,36,57,0,1,94,41,42,43,
+ 44,45,46,47,48,49,50,51,52,37,
+ 54,55,56,0,1,2,3,40,5,6,
+ 7,8,9,10,11,12,13,14,15,16,
+ 17,18,19,20,21,22,23,24,25,26,
+ 27,28,29,0,1,2,3,4,5,73,
+ 91,0,92,0,0,12,13,14,15,16,
+ 17,18,19,20,21,22,23,24,25,26,
+ 27,28,29,30,0,1,2,3,4,5,
+ 0,1,2,3,31,31,12,13,14,15,
+ 16,17,18,19,20,21,22,23,24,25,
+ 26,27,28,29,0,31,63,0,1,2,
+ 3,4,5,0,40,0,3,37,0,12,
+ 13,14,15,16,17,18,19,20,21,22,
+ 23,24,25,26,27,28,29,0,0,88,
+ 89,0,4,6,7,8,9,10,11,31,
+ 0,0,0,0,0,4,4,4,4,0,
+ 53,2,0,0,14,2,59,30,0,32,
+ 33,34,35,36,0,0,38,39,41,42,
+ 43,44,45,46,47,48,49,50,51,52,
+ 0,38,38,40,81,82,6,7,8,9,
+ 10,11,61,62,53,53,0,53,0,3,
+ 0,3,38,0,4,0,1,0,0,57,
+ 30,0,32,33,34,35,36,0,0,2,
+ 0,41,42,43,44,45,46,47,48,49,
+ 50,51,52,0,1,2,3,4,5,39,
+ 37,83,84,85,86,12,13,14,15,16,
+ 17,18,19,20,21,22,23,24,25,26,
+ 27,28,29,0,0,0,0,4,4,61,
+ 62,6,7,8,9,10,11,81,82,81,
+ 82,61,62,80,73,0,0,0,0,0,
+ 4,73,4,4,0,30,63,32,33,34,
+ 35,36,38,40,40,0,41,42,43,44,
+ 45,46,47,48,49,50,51,52,0,1,
+ 2,3,4,5,38,39,38,38,40,40,
+ 12,13,14,15,16,17,18,19,20,21,
+ 22,23,24,25,26,27,28,29,0,1,
+ 2,3,4,5,0,61,62,0,0,93,
+ 12,13,14,15,16,17,18,19,20,21,
+ 22,23,24,25,26,27,28,29,91,0,
+ 1,63,0,0,2,31,0,0,31,0,
+ 0,1,2,3,4,5,38,0,0,0,
+ 0,53,12,13,14,15,16,17,18,19,
+ 20,21,22,23,24,25,26,27,28,29,
+ 0,1,2,3,4,5,0,38,31,39,
+ 31,31,12,13,14,15,16,17,18,19,
+ 20,21,22,23,24,25,26,27,28,29,
+ 0,1,2,3,0,5,0,1,0,39,
+ 0,0,12,13,14,15,16,17,18,19,
+ 20,21,22,23,24,25,26,27,28,29,
+ 0,31,0,1,2,3,0,5,0,1,
+ 0,31,38,37,12,13,14,15,16,17,
+ 18,19,20,21,22,23,24,25,26,27,
+ 28,29,0,31,0,1,2,3,0,5,
+ 0,31,4,0,0,37,12,13,14,15,
+ 16,17,18,19,20,21,22,23,24,25,
+ 26,27,28,29,0,31,0,1,2,3,
+ 0,5,2,0,0,31,0,39,12,13,
+ 14,15,16,17,18,19,20,21,22,23,
+ 24,25,26,27,28,29,0,1,2,3,
+ 57,5,0,0,0,0,0,0,12,13,
+ 14,15,16,17,18,19,20,21,22,23,
+ 24,25,26,27,28,29,0,1,2,3,
+ 57,5,0,57,0,0,0,0,12,13,
+ 14,15,16,17,18,19,20,21,22,23,
+ 24,25,26,27,28,29,0,1,2,3,
+ 57,5,0,0,0,0,0,0,12,13,
+ 14,15,16,17,18,19,20,21,22,23,
+ 24,25,26,27,28,29,0,1,2,3,
+ 0,5,0,0,0,0,0,0,12,13,
+ 14,15,16,17,18,19,20,21,22,23,
+ 24,25,26,27,28,29,0,1,2,3,
+ 0,5,0,0,0,0,0,0,12,13,
+ 14,15,16,17,18,19,20,21,22,23,
+ 24,25,26,27,28,29,0,1,2,3,
+ 0,5,0,0,0,0,0,0,12,13,
+ 14,15,16,17,18,19,20,21,22,23,
+ 24,25,26,27,28,29,0,1,2,3,
+ 0,5,0,0,0,1,4,4,12,13,
+ 14,15,16,17,18,19,20,21,22,23,
+ 24,25,26,27,28,29,0,0,1,0,
+ 0,0,6,7,8,9,10,11,0,0,
+ 38,37,0,40,6,7,8,9,10,11,
+ 0,0,0,0,0,53,30,0,32,33,
+ 34,35,36,0,37,0,0,0,30,0,
+ 32,33,34,35,36,6,7,8,9,10,
+ 11,0,0,0,0,0,0,6,7,8,
+ 9,10,11,0,0,0,0,0,0,30,
+ 37,32,33,34,35,36,0,0,0,0,
+ 0,30,0,32,33,34,35,36,6,7,
+ 8,9,10,11,0,0,0,0,0,0,
+ 6,7,8,9,10,11,0,74,0,0,
+ 0,0,30,80,32,33,34,35,36,0,
+ 0,0,0,0,30,0,32,33,34,35,
+ 36,6,7,8,9,10,11,0,0,0,
+ 0,0,0,6,7,8,9,10,11,0,
+ 0,0,0,0,0,30,0,32,33,34,
+ 35,36,0,0,0,0,0,30,0,32,
+ 33,34,35,36,6,7,8,9,10,11,
+ 0,0,0,0,0,0,6,7,8,9,
+ 10,11,0,0,0,0,0,0,30,0,
+ 32,33,34,35,36,0,0,0,0,0,
+ 30,0,32,33,34,35,36,6,7,8,
+ 9,10,11,0,0,0,0,0,0,6,
+ 7,8,9,10,11,0,0,0,0,0,
+ 0,30,0,32,33,34,35,36,0,0,
+ 0,0,0,30,0,32,33,34,35,36,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0
+ };
+ };
+ public final static byte termCheck[] = TermCheck.termCheck;
+ public final int termCheck(int index) { return termCheck[index]; }
+
+ public interface TermAction {
+ public final static char termAction[] = {0,
+ 4710,1943,4695,3570,1082,4686,1,1,1,1,
+ 1,1,2559,2329,2571,2578,2196,2144,2280,439,
+ 5005,5006,5007,2092,2040,1988,4722,4723,4724,4725,
+ 1,3457,1,1,1,1,1,219,2228,4720,
+ 4718,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,4710,4807,4058,
+ 944,1,4337,4931,3731,4039,980,447,912,2568,
+ 946,2965,945,4710,3459,2893,2941,2472,2917,911,
+ 9,4701,4701,4701,4701,4701,4701,4701,4701,4701,
+ 4701,4701,4701,4701,4701,4701,4701,4701,4701,4701,
+ 4701,4701,4701,4701,4701,4701,4701,4701,4701,4701,
+ 4701,4701,4701,4701,4701,4701,4701,307,4111,4701,
+ 4701,4701,4701,4701,4701,4701,4701,4701,4701,4701,
+ 4701,4701,4701,62,4701,4701,4701,4710,4701,4701,
+ 4701,1,4337,4931,4701,4701,4701,4701,4701,4701,
+ 4701,4701,4701,4710,4680,4701,4701,4701,4701,4701,
+ 4710,1943,4695,3570,4721,4686,1,1,1,1,
+ 1,1,2559,2329,2571,2578,2196,2144,2280,439,
+ 5005,5006,5007,2092,2040,1988,4722,4723,4724,4725,
+ 1,3457,1,1,1,1,1,258,4203,4720,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1148,1,1,1,164,4807,4058,
+ 944,2503,2397,66,3731,4039,980,447,912,2568,
+ 946,2965,945,4710,3459,2893,2941,2472,2917,911,
+ 4710,1943,979,3570,4721,4713,4710,1,1,59,
+ 4698,192,2559,2329,2571,2578,2196,2144,2280,439,
+ 5005,5006,5007,2092,2040,1988,4722,4723,4724,4725,
+ 4710,3457,4900,4710,242,4710,4337,4931,3631,4720,
+ 1,1,1,1,1,1,243,192,4710,2255,
+ 51,3700,1,1,1,1,1,1,4807,4058,
+ 944,2224,2176,2082,3731,4039,980,447,912,2568,
+ 946,2965,945,2290,67,2893,2941,2472,2917,911,
+ 4710,4960,1,4710,4721,1,1,1,1,1,
+ 1,1,2123,2071,2019,1967,4710,4710,4712,4710,
+ 2305,4713,42,4925,4926,4927,5018,370,5019,4710,
+ 1,4900,1,1,1,1,1,260,4203,4720,
+ 3631,1,1,1,1,1,1,1,1,1,
+ 1,1,1,4710,1,1,1,4715,5000,4710,
+ 2475,1,4710,4721,1,1,1,1,1,1,
+ 1,244,54,53,3459,219,4059,4925,4926,4927,
+ 5018,370,5019,4710,2290,2176,2082,284,70,1,
+ 4679,1,1,1,1,1,3983,72,4720,189,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,1,3459,1,1,1,4714,5000,61,3964,
+ 3945,3926,3907,3888,3850,3869,3831,3796,2873,245,
+ 3336,4710,3586,1978,2030,4925,4926,4927,5018,370,
+ 5019,1,4272,4704,4710,4717,283,4710,1943,4712,
+ 2239,4715,4713,4925,4926,4927,5018,370,5019,2559,
+ 2329,2571,2578,2196,2144,2280,439,5005,5006,5007,
+ 2092,2040,1988,4722,4723,4724,4725,4129,3459,4710,
+ 3482,4712,31,3500,4713,4925,4926,4927,5018,370,
+ 5019,213,3008,3546,4716,1,4203,4735,4736,4717,
+ 4710,2123,2071,2019,1967,52,4710,4710,4913,4878,
+ 4714,4879,4877,4928,4880,4876,4710,2176,2082,3522,
+ 4882,4887,4886,4884,4885,4883,4888,4889,4881,4890,
+ 4891,4892,3459,1898,2066,2014,148,2477,4683,68,
+ 71,4713,4925,4926,4927,5018,370,5019,4716,210,
+ 64,4913,254,4272,4931,1,1,1,4710,3543,
+ 4710,4692,502,3543,2340,4021,4878,4710,4879,4877,
+ 4928,4880,4876,2540,4710,3610,434,4882,4887,4886,
+ 4884,4885,4883,4888,4889,4881,4890,4891,4892,3459,
+ 1898,2066,2014,4710,1943,4712,3570,4718,4713,4925,
+ 4926,4927,5018,370,5019,2559,2329,2571,2578,2196,
+ 2144,2280,439,5005,5006,5007,2092,2040,1988,4722,
+ 4723,4724,4725,1,1943,4712,2187,4715,4713,4960,
+ 382,63,3482,188,208,2559,2329,2571,2578,2196,
+ 2144,2280,439,5005,5006,5007,2092,2040,1988,4722,
+ 4723,4724,4725,3754,1,1943,4712,3570,4719,4713,
+ 260,4272,4931,3631,3432,3497,2559,2329,2571,2578,
+ 2196,2144,2280,439,5005,5006,5007,2092,2040,1988,
+ 4722,4723,4724,4725,4710,3607,4714,4710,1943,4712,
+ 3570,4717,4713,48,4718,4710,3735,3459,4710,2559,
+ 2329,2571,2578,2196,2144,2280,439,5005,5006,5007,
+ 2092,2040,1988,4722,4723,4724,4725,147,4710,2503,
+ 2397,58,4721,4925,4926,4927,5018,370,5019,3457,
+ 65,4710,1,4710,4710,4717,4717,4719,4717,4710,
+ 4716,4913,2,4710,2340,4842,5056,4878,60,4879,
+ 4877,4928,4880,4876,87,4710,4430,4720,4882,4887,
+ 4886,4884,4885,4883,4888,4889,4881,4890,4891,4892,
+ 148,4212,4092,4718,3723,3577,4925,4926,4927,5018,
+ 370,5019,1978,2030,4716,4716,50,4716,49,3735,
+ 1,3735,4002,4710,4721,4710,3634,4710,57,101,
+ 4878,1,4879,4877,4928,4880,4876,4710,1,4967,
+ 56,4882,4887,4886,4884,4885,4883,4888,4889,4881,
+ 4890,4891,4892,4710,1943,4712,2135,4715,4713,4720,
+ 4182,2123,2071,2019,1967,2559,2329,2571,2578,2196,
+ 2144,2280,439,5005,5006,5007,2092,2040,1988,4722,
+ 4723,4724,4725,4710,4710,149,110,4719,4719,1978,
+ 2030,4925,4926,4927,5018,370,5019,3723,3577,3723,
+ 3577,1978,2030,1149,4960,4710,4710,69,4710,4710,
+ 4721,4959,4719,4719,55,4878,4714,4879,4877,4928,
+ 4880,4876,4217,4718,4718,4710,4882,4887,4886,4884,
+ 4885,4883,4888,4889,4881,4890,4891,4892,4710,1943,
+ 4712,3570,4715,4713,4482,4720,2449,2517,4718,4718,
+ 2559,2329,2571,2578,2196,2144,2280,439,5005,5006,
+ 5007,2092,2040,1988,4722,4723,4724,4725,4710,1943,
+ 4712,3570,4717,4713,224,1978,2030,1,209,4707,
+ 2559,2329,2571,2578,2196,2144,2280,439,5005,5006,
+ 5007,2092,2040,1988,4722,4723,4724,4725,382,4710,
+ 3658,4714,4710,4710,4992,228,4710,4710,3457,86,
+ 4710,1943,4712,3570,4721,4713,6217,224,4710,303,
+ 301,4716,2559,2329,2571,2578,2196,2144,2280,439,
+ 5005,5006,5007,2092,2040,1988,4722,4723,4724,4725,
+ 1,1943,4689,3570,4721,4686,4710,4002,229,4720,
+ 4263,4263,2559,2329,2571,2578,2196,2144,2280,439,
+ 5005,5006,5007,2092,2040,1988,4722,4723,4724,4725,
+ 4710,1943,4712,3570,248,4713,220,2228,4710,4720,
+ 299,4710,2559,2329,2571,2578,2196,2144,2280,439,
+ 5005,5006,5007,2092,2040,1988,4722,4723,4724,4725,
+ 4710,3607,4710,1943,4712,3570,4710,4713,261,4061,
+ 41,4263,4591,3459,2559,2329,2571,2578,2196,2144,
+ 2280,439,5005,5006,5007,2092,2040,1988,4722,4723,
+ 4724,4725,4710,4263,1,1943,4712,3570,4710,4713,
+ 4710,4263,4721,4710,4710,3459,2559,2329,2571,2578,
+ 2196,2144,2280,439,5005,5006,5007,2092,2040,1988,
+ 4722,4723,4724,4725,4710,3607,1,1943,4689,3570,
+ 209,4686,368,4710,4710,4263,200,4720,2559,2329,
+ 2571,2578,2196,2144,2280,439,5005,5006,5007,2092,
+ 2040,1988,4722,4723,4724,4725,4710,1995,4712,3570,
+ 481,4713,4710,4710,4710,4710,4710,4710,2559,2329,
+ 2571,2578,2196,2144,2280,439,5005,5006,5007,2092,
+ 2040,1988,4722,4723,4724,4725,4710,2047,4712,3570,
+ 515,4713,4710,4164,4710,4710,4710,4710,2559,2329,
+ 2571,2578,2196,2144,2280,439,5005,5006,5007,2092,
+ 2040,1988,4722,4723,4724,4725,4710,2099,4712,3570,
+ 549,4713,4710,4710,4710,4710,4710,4710,2559,2329,
+ 2571,2578,2196,2144,2280,439,5005,5006,5007,2092,
+ 2040,1988,4722,4723,4724,4725,4710,2151,4712,3570,
+ 4710,4713,4710,4710,4710,4710,4710,4710,2559,2329,
+ 2571,2578,2196,2144,2280,439,5005,5006,5007,2092,
+ 2040,1988,4722,4723,4724,4725,4710,1943,4712,3570,
+ 4710,4713,4710,4710,4710,4710,4710,4710,2559,2329,
+ 2571,2578,2196,2144,2280,439,5005,5006,5007,2092,
+ 2040,1988,4722,4723,4724,4725,4710,2203,4712,3570,
+ 4710,4713,4710,4710,4710,4710,4710,4710,2559,2329,
+ 2571,2578,2196,2144,2280,439,5005,5006,5007,2092,
+ 2040,1988,4722,4723,4724,4725,1,1943,4712,3570,
+ 4710,4713,4710,1,220,4059,4717,191,2559,2329,
+ 2571,2578,2196,2144,2280,439,5005,5006,5007,2092,
+ 2040,1988,4722,4723,4724,4725,153,262,4061,4710,
+ 4710,4710,4925,4926,4927,5018,370,5019,157,4710,
+ 1116,3459,4710,191,4925,4926,4927,5018,370,5019,
+ 4710,4710,4710,4710,4710,4716,4878,4710,4879,4877,
+ 4928,4880,4876,4710,3459,4710,4710,4710,4878,161,
+ 4879,4877,4928,4880,4876,4925,4926,4927,5018,370,
+ 5019,151,4710,4710,4710,4710,4710,4925,4926,4927,
+ 5018,370,5019,4710,4710,4710,4710,4710,4710,4878,
+ 4182,4879,4877,4928,4880,4876,4710,4710,4710,4710,
+ 4710,4878,155,4879,4877,4928,4880,4876,4925,4926,
+ 4927,5018,370,5019,159,4710,4710,4710,4710,4710,
+ 4925,4926,4927,5018,370,5019,4710,4988,4710,4710,
+ 4710,4710,4878,1149,4879,4877,4928,4880,4876,4710,
+ 4710,4710,4710,4710,4878,160,4879,4877,4928,4880,
+ 4876,4925,4926,4927,5018,370,5019,156,4710,4710,
+ 4710,4710,4710,4925,4926,4927,5018,370,5019,4710,
+ 4710,4710,4710,4710,4710,4878,4710,4879,4877,4928,
+ 4880,4876,4710,4710,4710,4710,4710,4878,152,4879,
+ 4877,4928,4880,4876,4925,4926,4927,5018,370,5019,
+ 158,4710,4710,4710,4710,4710,4925,4926,4927,5018,
+ 370,5019,4710,4710,4710,4710,4710,4710,4878,4710,
+ 4879,4877,4928,4880,4876,4710,4710,4710,4710,4710,
+ 4878,154,4879,4877,4928,4880,4876,4925,4926,4927,
+ 5018,370,5019,150,4710,4710,4710,4710,4710,4925,
+ 4926,4927,5018,370,5019,4710,4710,4710,4710,4710,
+ 4710,4878,4710,4879,4877,4928,4880,4876,4710,4710,
+ 4710,4710,4710,4878,4710,4879,4877,4928,4880,4876
+ };
+ };
+ public final static char termAction[] = TermAction.termAction;
+ public final int termAction(int index) { return termAction[index]; }
+
+ public interface Asb {
+ public final static char asb[] = {0,
+ 497,529,263,75,497,24,1,36,591,591,
+ 36,591,36,20,120,24,436,36,58,299,
+ 58,299,36,58,364,36,36,36,36,24,
+ 263,592,172,120,430,124,561,169,458,243,
+ 101,101,101,101,101,101,101,101,436,101,
+ 101,101,132,193,198,196,204,200,207,206,
+ 209,208,210,299,299,299,299,364,364,36,
+ 36,36,263,222,120,55,561,427,340,120,
+ 44,464,395,55,55,182,101,213,594,243,
+ 243,243,243,243,494,494,370,101,101,101,
+ 101,101,101,101,101,101,101,101,101,101,
+ 101,101,101,101,101,101,101,299,328,74,
+ 299,299,328,364,177,176,177,563,75,223,
+ 120,464,338,44,124,169,286,466,398,458,
+ 286,436,340,101,101,101,101,101,101,101,
+ 101,101,101,101,101,561,52,461,55,55,
+ 55,55,55,54,458,196,196,193,193,200,
+ 200,198,198,198,198,206,204,208,207,218,
+ 209,328,331,328,177,328,101,495,120,222,
+ 173,99,99,99,99,173,173,495,122,122,
+ 122,81,122,122,172,173,135,218,101,218,
+ 427,466,338,286,44,55,50,54,54,286,
+ 458,395,338,594,464,55,531,181,181,181,
+ 181,592,101,101,172,101,215,328,220,173,
+ 173,173,173,173,241,241,101,293,101,101,
+ 81,218,81,177,296,44,561,461,466,495,
+ 398,101,458,436,338,52,466,55,331,101,
+ 99,99,173,99,99,173,55,122,55,55,
+ 81,336,340,495,101,295,50,531,458,458,
+ 177,55,99,173,99,173,99,370,173,370,
+ 173,99,81,101,81,81,458,336,369,173,
+ 99,369,173,99,99,173,81,55,370,81,
+ 55,370,370,173,55,221,81,55,369,369,
+ 173,81,55,369,369,173,369,173,99,81,
+ 81,55,81,81,55,81,55,370,173,81,
+ 81,81,55,81,55,369,81,81,55,81,
+ 55,369,81,55,369,369,173,81,81,81,
+ 81,55,81,81,81,55,81,81,81,55,
+ 81,81,55,81,55,369,81,81,81,81,
+ 81,81,55,81
+ };
+ };
+ public final static char asb[] = Asb.asb;
+ public final int asb(int index) { return asb[index]; }
+
+ public interface Asr {
+ public final static byte asr[] = {0,
+ 17,15,16,14,12,13,18,19,20,21,
+ 22,23,24,25,26,27,28,29,63,5,
+ 54,55,56,49,41,46,44,45,43,42,
+ 47,48,50,51,52,57,39,36,33,30,
+ 32,35,34,6,7,8,9,10,11,3,
+ 2,37,1,38,53,4,0,32,6,33,
+ 34,35,7,30,36,8,37,38,9,10,
+ 11,53,31,57,1,3,2,39,4,0,
+ 65,66,31,70,72,67,60,68,79,69,
+ 59,64,71,76,78,75,77,58,39,4,
+ 26,27,28,29,20,21,22,5,15,16,
+ 14,12,13,18,19,17,23,24,25,3,
+ 2,1,0,31,37,1,74,38,39,4,
+ 0,63,53,40,57,80,94,15,16,14,
+ 3,12,13,81,82,61,62,83,84,85,
+ 86,88,89,90,91,92,95,96,97,98,
+ 99,100,101,102,103,104,105,106,74,37,
+ 1,38,39,4,0,74,40,4,38,0,
+ 31,74,97,98,99,100,101,103,102,104,
+ 105,106,3,81,82,12,13,62,61,83,
+ 84,85,86,88,89,14,90,91,92,40,
+ 95,96,63,53,38,39,4,57,0,87,
+ 93,40,65,66,31,70,72,67,60,68,
+ 79,69,59,64,71,76,78,75,77,58,
+ 39,4,15,16,14,3,12,13,18,19,
+ 17,23,24,25,1,26,27,28,29,20,
+ 21,22,2,5,54,55,56,34,36,33,
+ 30,32,35,49,41,46,44,45,43,42,
+ 47,48,50,51,52,6,7,8,9,11,
+ 10,0,60,0,74,37,80,0,32,41,
+ 6,42,54,33,43,34,44,45,35,7,
+ 46,47,30,55,36,56,48,49,8,50,
+ 51,52,9,10,11,2,5,40,4,0,
+ 3,57,2,1,0,40,4,37,80,1,
+ 26,27,28,29,20,21,22,2,5,15,
+ 16,14,3,12,13,18,19,17,23,24,
+ 25,31,0,38,2,40,4,0,59,1,
+ 26,27,28,29,20,21,22,2,5,15,
+ 16,14,3,12,13,18,19,17,23,24,
+ 25,53,4,0,63,4,30,6,7,8,
+ 9,10,11,15,16,14,3,12,13,18,
+ 19,17,23,24,25,1,2,5,26,27,
+ 28,29,20,21,22,0,57,37,1,38,
+ 53,39,4,74,0,15,16,14,3,12,
+ 13,18,19,17,23,24,25,1,2,5,
+ 26,27,28,29,20,21,22,63,4,0,
+ 3,1,37,53,4,32,41,6,42,54,
+ 33,43,34,44,45,35,7,46,47,30,
+ 55,36,56,48,49,8,50,51,52,9,
+ 10,11,73,5,2,0,32,41,6,42,
+ 54,33,43,34,44,45,35,7,46,47,
+ 30,55,36,56,48,49,8,50,51,52,
+ 9,10,11,2,5,39,4,58,87,0,
+ 32,41,6,42,54,33,43,34,44,45,
+ 35,7,46,47,30,55,36,56,48,49,
+ 8,50,51,52,9,10,11,2,5,73,
+ 3,0,32,41,6,42,54,33,43,34,
+ 44,45,35,7,46,47,30,55,36,56,
+ 48,49,8,50,51,52,9,10,11,5,
+ 2,31,0,53,4,3,1,37,0
+ };
+ };
+ public final static byte asr[] = Asr.asr;
+ public final int asr(int index) { return asr[index]; }
+
+ public interface Nasb {
+ public final static char nasb[] = {0,
+ 96,87,66,52,100,69,7,70,28,28,
+ 70,22,70,80,76,83,60,84,87,14,
+ 87,14,84,87,14,84,70,70,70,69,
+ 14,125,53,104,87,87,120,45,61,24,
+ 39,39,39,39,39,39,39,39,60,39,
+ 39,39,87,87,87,87,87,87,87,87,
+ 87,87,87,14,110,14,110,14,22,84,
+ 84,84,127,49,104,64,120,45,39,88,
+ 14,32,59,64,64,87,39,87,73,24,
+ 24,24,24,24,16,16,63,39,39,39,
+ 39,39,39,39,39,39,39,39,39,39,
+ 39,39,39,39,39,39,39,110,50,52,
+ 131,110,50,22,50,87,87,122,52,1,
+ 105,32,14,14,87,45,55,114,4,61,
+ 55,60,39,39,39,39,39,39,39,39,
+ 39,39,39,39,39,120,45,72,64,64,
+ 64,64,64,64,61,87,87,87,87,87,
+ 87,87,87,87,87,87,87,87,87,87,
+ 87,50,104,50,50,50,39,22,104,9,
+ 53,38,38,38,38,53,53,57,87,87,
+ 87,18,87,87,87,53,87,87,39,87,
+ 45,13,4,55,86,64,92,87,64,55,
+ 61,41,14,94,32,64,118,87,87,87,
+ 87,87,39,39,53,39,87,50,87,53,
+ 53,53,53,53,35,35,39,87,39,39,
+ 18,87,18,50,107,86,120,91,13,87,
+ 42,39,61,60,4,45,13,64,104,39,
+ 38,38,53,38,38,53,64,87,64,64,
+ 18,47,39,87,39,30,93,118,61,61,
+ 50,64,38,53,38,53,38,63,53,63,
+ 53,38,18,39,18,18,61,47,63,53,
+ 38,63,53,38,38,53,18,64,63,18,
+ 64,63,63,53,64,87,18,64,63,63,
+ 53,18,64,63,63,53,63,53,38,18,
+ 18,64,18,18,64,18,64,63,53,18,
+ 18,18,64,18,64,63,18,18,64,18,
+ 64,63,18,64,63,63,53,18,18,18,
+ 18,64,18,18,18,64,18,18,18,64,
+ 18,18,64,18,64,63,18,18,18,18,
+ 18,18,64,18
+ };
+ };
+ public final static char nasb[] = Nasb.nasb;
+ public final int nasb(int index) { return nasb[index]; }
+
+ public interface Nasr {
+ public final static char nasr[] = {0,
+ 34,32,86,4,22,0,99,0,4,32,
+ 41,71,34,22,0,1,0,32,4,26,
+ 0,64,0,22,44,4,0,76,0,81,
+ 0,22,21,0,22,34,49,19,4,0,
+ 40,4,35,0,42,0,4,67,22,41,
+ 0,22,19,0,65,0,87,0,22,4,
+ 40,0,4,21,0,75,74,73,57,48,
+ 0,21,56,22,0,22,47,94,0,73,
+ 74,75,57,38,39,35,0,47,80,0,
+ 21,22,45,56,0,97,34,22,0,34,
+ 22,82,0,22,45,0,96,95,0,63,
+ 22,44,0,93,22,34,0,22,34,54,
+ 0,22,34,49,24,0,34,22,98,0,
+ 22,44,58,0
+ };
+ };
+ public final static char nasr[] = Nasr.nasr;
+ public final int nasr(int index) { return nasr[index]; }
+
+ public interface TerminalIndex {
+ public final static char terminalIndex[] = {0,
+ 2,99,9,113,112,51,67,79,87,88,
+ 89,10,11,8,6,7,71,12,13,84,
+ 85,86,91,92,93,100,101,102,103,72,
+ 3,47,58,63,66,75,1,42,107,106,
+ 50,55,59,64,65,69,70,77,78,81,
+ 82,83,105,57,73,76,29,116,52,80,
+ 16,17,104,48,49,53,54,60,61,62,
+ 68,74,30,31,90,94,95,96,97,4,
+ 14,15,18,19,20,21,98,22,23,24,
+ 25,26,56,5,27,28,32,33,34,35,
+ 36,37,38,39,40,41,43,44,45,108,
+ 109,110,111,114,115
+ };
+ };
+ public final static char terminalIndex[] = TerminalIndex.terminalIndex;
+ public final int terminalIndex(int index) { return terminalIndex[index]; }
+
+ public interface NonterminalIndex {
+ public final static char nonterminalIndex[] = {0,
+ 117,0,0,123,128,129,130,131,132,133,
+ 134,135,136,137,138,139,140,127,121,142,
+ 119,0,122,145,141,144,0,0,0,0,
+ 0,146,0,151,159,0,0,158,160,118,
+ 120,180,199,171,177,0,179,157,149,166,
+ 125,143,167,178,188,190,161,170,181,187,
+ 165,0,169,174,186,189,191,153,176,126,
+ 148,152,162,163,164,168,173,0,175,183,
+ 194,196,0,0,124,147,150,154,155,156,
+ 172,182,184,185,192,193,195,197,198,0
+ };
+ };
+ public final static char nonterminalIndex[] = NonterminalIndex.nonterminalIndex;
+ public final int nonterminalIndex(int index) { return nonterminalIndex[index]; }
+
+ public interface ScopePrefix {
+ public final static char scopePrefix[] = {
+ 219,219,62,72,108,133,139,108,189,38,
+ 90,98,114,145,150,78,114,6,12,16,
+ 29,43,86,55,123,198,215,239,243,29,
+ 55,55,202,55,1,1,24,47,50,95,
+ 103,50,164,174,247,127,209,180,209,209,
+ 20,119,155,155,155,155,155,155
+ };
+ };
+ public final static char scopePrefix[] = ScopePrefix.scopePrefix;
+ public final int scopePrefix(int index) { return scopePrefix[index]; }
+
+ public interface ScopeSuffix {
+ public final static char scopeSuffix[] = {
+ 36,33,4,4,36,36,36,33,195,10,
+ 4,10,36,36,36,83,33,10,10,10,
+ 36,10,4,4,121,36,10,10,4,33,
+ 59,83,206,68,4,4,27,10,53,4,
+ 10,106,167,167,10,130,212,183,233,226,
+ 22,121,157,162,172,159,169,177
+ };
+ };
+ public final static char scopeSuffix[] = ScopeSuffix.scopeSuffix;
+ public final int scopeSuffix(int index) { return scopeSuffix[index]; }
+
+ public interface ScopeLhs {
+ public final static char scopeLhs[] = {
+ 4,4,42,42,74,73,73,74,29,56,
+ 42,47,74,73,73,42,74,5,5,5,
+ 53,56,42,42,58,24,5,4,4,53,
+ 42,42,17,42,99,81,67,56,66,42,
+ 45,50,89,88,3,58,6,30,4,4,
+ 95,58,90,89,88,90,89,88
+ };
+ };
+ public final static char scopeLhs[] = ScopeLhs.scopeLhs;
+ public final int scopeLhs(int index) { return scopeLhs[index]; }
+
+ public interface ScopeLa {
+ public final static byte scopeLa[] = {
+ 40,38,63,63,40,40,40,38,93,53,
+ 63,53,40,40,40,26,38,53,53,53,
+ 40,53,63,63,39,40,53,53,63,38,
+ 3,26,57,30,63,63,26,53,1,63,
+ 53,2,36,36,53,2,53,60,53,53,
+ 74,39,2,54,55,2,54,55
+ };
+ };
+ public final static byte scopeLa[] = ScopeLa.scopeLa;
+ public final int scopeLa(int index) { return scopeLa[index]; }
+
+ public interface ScopeStateSet {
+ public final static char scopeStateSet[] = {
+ 79,79,17,17,254,254,254,254,193,23,
+ 17,240,254,254,254,17,254,79,79,79,
+ 4,23,17,17,11,30,79,79,79,4,
+ 17,17,113,17,252,1,6,23,25,17,
+ 240,243,255,255,79,11,85,193,79,79,
+ 2,11,255,255,255,255,255,255
+ };
+ };
+ public final static char scopeStateSet[] = ScopeStateSet.scopeStateSet;
+ public final int scopeStateSet(int index) { return scopeStateSet[index]; }
+
+ public interface ScopeRhs {
+ public final static char scopeRhs[] = {0,
+ 167,37,0,118,0,166,1,25,0,119,
+ 0,166,1,24,0,166,1,23,0,211,
+ 0,31,0,210,137,0,167,0,185,137,
+ 31,0,42,120,0,120,0,174,137,1,
+ 171,0,174,137,1,0,181,1,0,169,
+ 137,0,190,0,180,137,37,0,9,118,
+ 0,133,30,180,137,37,0,72,127,118,
+ 0,133,180,137,30,37,0,180,137,30,
+ 37,0,127,118,0,133,30,37,0,133,
+ 180,137,37,0,133,37,0,174,137,1,
+ 160,0,165,1,0,177,0,193,137,31,
+ 179,54,0,193,137,31,54,0,159,0,
+ 121,0,206,137,159,0,137,159,0,172,
+ 121,0,177,137,31,191,56,0,177,137,
+ 31,191,55,0,177,137,31,56,0,177,
+ 137,31,55,0,163,0,164,0,164,157,
+ 0,163,0,189,163,0,157,0,163,157,
+ 0,162,0,188,163,0,162,157,0,141,
+ 67,0,80,2,122,119,121,0,141,136,
+ 138,1,70,0,56,144,0,201,137,31,
+ 0,138,96,131,0,29,140,0,166,1,
+ 0,119,129,0,166,1,17,0,185,137,
+ 31,136,166,1,0,119,3,0,126,42,
+ 120,0,119,3,0,126,120,0,200,1,
+ 119,0,138,37,119,0,138,1,0
+ };
+ };
+ public final static char scopeRhs[] = ScopeRhs.scopeRhs;
+ public final int scopeRhs(int index) { return scopeRhs[index]; }
+
+ public interface ScopeState {
+ public final static char scopeState[] = {0,
+ 2222,4362,0,3777,3700,2517,2449,2426,2355,0,
+ 4456,4582,4445,4410,4407,0,4222,4214,3732,3679,
+ 3478,2447,3773,3677,4272,4255,4203,4545,0,1909,
+ 1875,1841,1807,1773,1739,1705,1671,1637,1603,1569,
+ 1535,1501,1467,1433,1399,1365,1331,1297,1263,1229,
+ 1195,1161,1127,1093,1059,1025,991,957,923,889,
+ 855,821,787,753,719,685,651,617,583,549,
+ 515,481,447,397,347,4524,2252,0,2578,2196,
+ 2144,2092,2040,1988,2239,3742,2187,3008,382,3482,
+ 2340,2290,2123,2071,2019,1967,2503,2397,2176,2082,
+ 2030,1978,3735,3723,3577,3570,2571,2135,2559,2329,
+ 2280,439,2849,2825,2801,2777,2753,3435,3411,2729,
+ 2705,2681,2657,2633,3387,3363,3339,3315,3291,2609,
+ 3267,2585,2517,3658,3243,3219,3195,3171,3147,3123,
+ 4182,3777,2449,3099,3075,3051,3027,4164,2426,4129,
+ 2989,3634,3610,3586,2305,2255,4111,2540,4092,2378,
+ 2355,4039,2965,2941,2917,2893,4021,4002,3983,3964,
+ 3945,3926,3907,3888,3869,3850,3831,3796,2873,3754,
+ 3546,3522,3500,2203,2151,2099,2047,1995,3459,3700,
+ 1943,3682,1909,1875,1841,1807,1773,1739,1705,1671,
+ 1637,1603,1569,1535,1501,1467,1433,1399,1365,1331,
+ 1297,1263,1229,1195,1161,1127,1093,1059,1025,991,
+ 957,923,889,855,821,787,753,719,685,651,
+ 617,583,549,515,481,447,397,347,0,3773,
+ 2374,4261,4482,4272,4255,4304,2423,4430,4337,4204,
+ 0,370,0,4205,4200,0
+ };
+ };
+ public final static char scopeState[] = ScopeState.scopeState;
+ public final int scopeState(int index) { return scopeState[index]; }
+
+ public interface InSymb {
+ public final static char inSymb[] = {0,
+ 0,199,137,149,212,172,10,188,56,55,
+ 189,54,190,163,137,163,37,163,191,31,
+ 191,31,163,179,31,163,190,189,188,172,
+ 209,207,187,1,165,162,137,160,167,1,
+ 25,24,23,17,19,18,13,12,3,14,
+ 16,15,119,122,124,123,126,125,128,127,
+ 130,129,131,31,137,31,137,31,137,163,
+ 163,163,137,31,38,165,137,160,74,169,
+ 3,1,37,166,138,120,3,135,159,1,
+ 1,1,1,1,94,80,1,37,82,81,
+ 3,61,62,13,12,89,88,86,85,84,
+ 83,90,14,92,91,96,95,137,177,159,
+ 178,137,177,137,193,179,194,213,149,137,
+ 169,1,31,3,162,160,137,137,30,133,
+ 137,3,136,106,105,104,102,103,101,100,
+ 99,98,97,74,38,137,171,1,166,166,
+ 166,166,166,200,138,123,123,122,122,125,
+ 125,124,124,124,124,127,126,129,128,138,
+ 130,177,137,177,193,38,74,38,137,201,
+ 77,75,78,76,71,64,59,69,79,68,
+ 60,67,72,70,135,140,2,66,65,147,
+ 160,137,137,137,180,174,149,175,208,137,
+ 133,180,31,169,1,181,137,136,136,136,
+ 136,136,38,57,206,57,165,38,4,138,
+ 138,138,138,202,1,1,1,141,1,1,
+ 57,167,57,185,137,180,137,1,38,38,
+ 180,30,133,3,137,171,137,174,38,57,
+ 164,134,138,164,134,138,138,60,138,138,
+ 57,38,210,80,37,211,169,137,133,133,
+ 185,174,134,138,134,138,134,134,138,134,
+ 138,134,136,1,136,136,167,38,134,138,
+ 134,134,138,134,134,138,136,138,134,136,
+ 138,134,134,138,138,141,136,158,134,134,
+ 138,136,158,134,134,138,134,138,134,136,
+ 136,138,136,136,138,136,138,134,136,93,
+ 136,136,158,136,158,134,136,136,158,136,
+ 158,134,136,158,134,134,138,136,136,136,
+ 136,138,136,136,136,158,136,136,136,158,
+ 136,136,158,136,158,134,136,136,136,136,
+ 136,136,158,136
+ };
+ };
+ public final static char inSymb[] = InSymb.inSymb;
+ public final int inSymb(int index) { return inSymb[index]; }
+
+ public interface Name {
+ public final static String name[] = {
+ "",
+ "[",
+ "(",
+ "{",
+ ".",
+ "->",
+ "++",
+ "--",
+ "&",
+ "*",
+ "+",
+ "-",
+ "~",
+ "!",
+ "/",
+ "%",
+ ">>",
+ "<<",
+ "<",
+ ">",
+ "<=",
+ ">=",
+ "==",
+ "!=",
+ "^",
+ "|",
+ "&&",
+ "||",
+ "?",
+ ":",
+ "...",
+ "=",
+ "*=",
+ "/=",
+ "%=",
+ "+=",
+ "-=",
+ ">>=",
+ "<<=",
+ "&=",
+ "^=",
+ "|=",
+ ",",
+ "#",
+ "##",
+ "nl",
+ "$empty",
+ "auto",
+ "break",
+ "case",
+ "char",
+ "const",
+ "continue",
+ "default",
+ "do",
+ "double",
+ "else",
+ "enum",
+ "extern",
+ "float",
+ "for",
+ "goto",
+ "if",
+ "inline",
+ "int",
+ "long",
+ "register",
+ "restrict",
+ "return",
+ "short",
+ "signed",
+ "sizeof",
+ "static",
+ "struct",
+ "switch",
+ "typedef",
+ "union",
+ "unsigned",
+ "void",
+ "volatile",
+ "while",
+ "_Bool",
+ "_Complex",
+ "_Imaginary",
+ "MYTHREAD",
+ "THREADS",
+ "UPC_MAX_BLOCKSIZE",
+ "relaxed",
+ "shared",
+ "strict",
+ "upc_barrier",
+ "upc_localsizeof",
+ "upc_blocksizeof",
+ "upc_elemsizeof",
+ "upc_notify",
+ "upc_fence",
+ "upc_wait",
+ "upc_forall",
+ "EOF_TOKEN",
+ "identifier",
+ "integer",
+ "floating",
+ "charconst",
+ "stringlit",
+ "RightBracket",
+ "RightParen",
+ "RightBrace",
+ "SemiColon",
+ "Invalid",
+ "PlaceMarker",
+ "Parameter",
+ "DisabledMacroName",
+ "Completion",
+ "EndOfCompletion",
+ "SingleLineComment",
+ "MultiLineComment",
+ "ERROR_TOKEN",
+ "ident",
+ "]",
+ ")",
+ "}",
+ ";",
+ "expression",
+ "postfix_expression",
+ "argument_expression_list",
+ "type_name",
+ "initializer_list",
+ "assignment_expression",
+ "unary_expression",
+ "cast_expression",
+ "multiplicative_expression",
+ "additive_expression",
+ "shift_expression",
+ "relational_expression",
+ "equality_expression",
+ "AND_expression",
+ "exclusive_OR_expression",
+ "inclusive_OR_expression",
+ "logical_AND_expression",
+ "logical_OR_expression",
+ "conditional_expression",
+ "expression_in_statement",
+ "expression_list",
+ "constant_expression",
+ "statement",
+ "compound_statement",
+ "label_identifier",
+ "block_item_list",
+ "block_item",
+ "declaration",
+ "goto_identifier",
+ "declaration_specifiers",
+ "init_declarator_list",
+ "simple_declaration_specifiers",
+ "struct_or_union_declaration_sp" +
+ "ecifiers",
+ "enum_declaration_specifiers",
+ "typdef_name_declaration_specif" +
+ "iers",
+ "no_type_declaration_specifiers",
+ "storage_class_specifier",
+ "type_qualifier",
+ "function_specifier",
+ "type_specifier",
+ "struct_or_union_specifier",
+ "enum_specifier",
+ "typedef_name",
+ "init_declarator",
+ "declarator",
+ "initializer",
+ "struct_or_union_identifier",
+ "struct_declaration_list",
+ "struct_declaration",
+ "specifier_qualifier_list",
+ "struct_declarator_list",
+ "struct_declarator",
+ "enum_identifier",
+ "enumerator_list",
+ "enumerator",
+ "direct_declarator",
+ "pointer",
+ "function_direct_declarator",
+ "array_modifier",
+ "parameter_type_list",
+ "function_declarator",
+ "knr_direct_declarator",
+ "identifier_list",
+ "knr_function_declarator",
+ "type_qualifier_list",
+ "parameter_list",
+ "parameter_declaration",
+ "abstract_declarator",
+ "direct_abstract_declarator",
+ "designated_initializer",
+ "designation",
+ "designator_list",
+ "designator",
+ "external_declaration_list",
+ "external_declaration",
+ "declaration_list",
+ "layout_qualifier",
+ "affinity"
+ };
+ };
+ public final static String name[] = Name.name;
+ public final String name(int index) { return name[index]; }
+
+ public final static int
+ ERROR_SYMBOL = 58,
+ SCOPE_UBOUND = 57,
+ SCOPE_SIZE = 58,
+ MAX_NAME_LENGTH = 38;
+
+ public final int getErrorSymbol() { return ERROR_SYMBOL; }
+ public final int getScopeUbound() { return SCOPE_UBOUND; }
+ public final int getScopeSize() { return SCOPE_SIZE; }
+ public final int getMaxNameLength() { return MAX_NAME_LENGTH; }
+
+ public final static int
+ NUM_STATES = 394,
+ NT_OFFSET = 115,
+ LA_STATE_OFFSET = 5056,
+ MAX_LA = 2147483647,
+ NUM_RULES = 346,
+ NUM_NONTERMINALS = 100,
+ NUM_SYMBOLS = 215,
+ SEGMENT_SIZE = 8192,
+ START_STATE = 4291,
+ IDENTIFIER_SYMBOL = 0,
+ EOFT_SYMBOL = 87,
+ EOLT_SYMBOL = 87,
+ ACCEPT_ACTION = 4679,
+ ERROR_ACTION = 4710;
+
+ public final static boolean BACKTRACK = true;
+
+ public final int getNumStates() { return NUM_STATES; }
+ public final int getNtOffset() { return NT_OFFSET; }
+ public final int getLaStateOffset() { return LA_STATE_OFFSET; }
+ public final int getMaxLa() { return MAX_LA; }
+ public final int getNumRules() { return NUM_RULES; }
+ public final int getNumNonterminals() { return NUM_NONTERMINALS; }
+ public final int getNumSymbols() { return NUM_SYMBOLS; }
+ public final int getSegmentSize() { return SEGMENT_SIZE; }
+ public final int getStartState() { return START_STATE; }
+ public final int getStartSymbol() { return lhs[0]; }
+ public final int getIdentifierSymbol() { return IDENTIFIER_SYMBOL; }
+ public final int getEoftSymbol() { return EOFT_SYMBOL; }
+ public final int getEoltSymbol() { return EOLT_SYMBOL; }
+ public final int getAcceptAction() { return ACCEPT_ACTION; }
+ public final int getErrorAction() { return ERROR_ACTION; }
+ public final boolean isValidForParser() { return isValidForParser; }
+ public final boolean getBacktrack() { return BACKTRACK; }
+
+ public final int originalState(int state) {
+ return -baseCheck[state];
+ }
+ public final int asi(int state) {
+ return asb[originalState(state)];
+ }
+ public final int nasi(int state) {
+ return nasb[originalState(state)];
+ }
+ public final int inSymbol(int state) {
+ return inSymb[originalState(state)];
+ }
+
+ public final int ntAction(int state, int sym) {
+ return baseAction[state + sym];
+ }
+
+ public final int tAction(int state, int sym) {
+ int i = baseAction[state],
+ k = i + sym;
+ return termAction[termCheck[k] == sym ? k : i];
+ }
+ public final int lookAhead(int la_state, int sym) {
+ int k = la_state + sym;
+ return termAction[termCheck[k] == sym ? k : la_state];
+ }
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParsersym.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParsersym.java
new file mode 100644
index 00000000000..3b027b662ec
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/UPCParsersym.java
@@ -0,0 +1,254 @@
+/*******************************************************************************
+* Copyright (c) 2006, 2007 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* IBM Corporation - initial API and implementation
+*********************************************************************************/
+
+// This file was generated by LPG
+
+package org.eclipse.cdt.internal.core.dom.parser.upc;
+
+public interface UPCParsersym {
+ public final static int
+ TK_auto = 32,
+ TK_break = 64,
+ TK_case = 65,
+ TK_char = 41,
+ TK_const = 6,
+ TK_continue = 59,
+ TK_default = 66,
+ TK_do = 67,
+ TK_double = 42,
+ TK_else = 93,
+ TK_enum = 54,
+ TK_extern = 33,
+ TK_float = 43,
+ TK_for = 68,
+ TK_goto = 69,
+ TK_if = 70,
+ TK_inline = 34,
+ TK_int = 44,
+ TK_long = 45,
+ TK_register = 35,
+ TK_restrict = 7,
+ TK_return = 71,
+ TK_short = 46,
+ TK_signed = 47,
+ TK_sizeof = 17,
+ TK_static = 30,
+ TK_struct = 55,
+ TK_switch = 72,
+ TK_typedef = 36,
+ TK_union = 56,
+ TK_unsigned = 48,
+ TK_void = 49,
+ TK_volatile = 8,
+ TK_while = 60,
+ TK__Bool = 50,
+ TK__Complex = 51,
+ TK__Imaginary = 52,
+ TK_LeftBracket = 37,
+ TK_LeftParen = 1,
+ TK_LeftBrace = 31,
+ TK_Dot = 80,
+ TK_Arrow = 94,
+ TK_PlusPlus = 15,
+ TK_MinusMinus = 16,
+ TK_And = 14,
+ TK_Star = 3,
+ TK_Plus = 12,
+ TK_Minus = 13,
+ TK_Tilde = 18,
+ TK_Bang = 19,
+ TK_Slash = 81,
+ TK_Percent = 82,
+ TK_RightShift = 61,
+ TK_LeftShift = 62,
+ TK_LT = 83,
+ TK_GT = 84,
+ TK_LE = 85,
+ TK_GE = 86,
+ TK_EQ = 88,
+ TK_NE = 89,
+ TK_Caret = 90,
+ TK_Or = 91,
+ TK_AndAnd = 92,
+ TK_OrOr = 95,
+ TK_Question = 96,
+ TK_Colon = 57,
+ TK_DotDotDot = 73,
+ TK_Assign = 74,
+ TK_StarAssign = 97,
+ TK_SlashAssign = 98,
+ TK_PercentAssign = 99,
+ TK_PlusAssign = 100,
+ TK_MinusAssign = 101,
+ TK_RightShiftAssign = 102,
+ TK_LeftShiftAssign = 103,
+ TK_AndAssign = 104,
+ TK_CaretAssign = 105,
+ TK_OrAssign = 106,
+ TK_Comma = 38,
+ TK_Hash = 107,
+ TK_HashHash = 108,
+ TK_NewLine = 109,
+ TK_MYTHREAD = 20,
+ TK_THREADS = 21,
+ TK_UPC_MAX_BLOCKSIZE = 22,
+ TK_relaxed = 9,
+ TK_shared = 10,
+ TK_strict = 11,
+ TK_upc_barrier = 75,
+ TK_upc_localsizeof = 23,
+ TK_upc_blocksizeof = 24,
+ TK_upc_elemsizeof = 25,
+ TK_upc_notify = 76,
+ TK_upc_fence = 77,
+ TK_upc_wait = 78,
+ TK_upc_forall = 79,
+ TK_EOF_TOKEN = 87,
+ TK_identifier = 2,
+ TK_integer = 26,
+ TK_floating = 27,
+ TK_charconst = 28,
+ TK_stringlit = 29,
+ TK_RightBracket = 63,
+ TK_RightParen = 53,
+ TK_RightBrace = 40,
+ TK_SemiColon = 39,
+ TK_Invalid = 110,
+ TK_PlaceMarker = 111,
+ TK_Parameter = 112,
+ TK_DisabledMacroName = 113,
+ TK_Completion = 5,
+ TK_EndOfCompletion = 4,
+ TK_SingleLineComment = 114,
+ TK_MultiLineComment = 115,
+ TK_ERROR_TOKEN = 58;
+
+ public final static String orderedTerminalSymbols[] = {
+ "",//$NON-NLS-1$
+ "LeftParen",//$NON-NLS-1$
+ "identifier",//$NON-NLS-1$
+ "Star",//$NON-NLS-1$
+ "EndOfCompletion",//$NON-NLS-1$
+ "Completion",//$NON-NLS-1$
+ "const",//$NON-NLS-1$
+ "restrict",//$NON-NLS-1$
+ "volatile",//$NON-NLS-1$
+ "relaxed",//$NON-NLS-1$
+ "shared",//$NON-NLS-1$
+ "strict",//$NON-NLS-1$
+ "Plus",//$NON-NLS-1$
+ "Minus",//$NON-NLS-1$
+ "And",//$NON-NLS-1$
+ "PlusPlus",//$NON-NLS-1$
+ "MinusMinus",//$NON-NLS-1$
+ "sizeof",//$NON-NLS-1$
+ "Tilde",//$NON-NLS-1$
+ "Bang",//$NON-NLS-1$
+ "MYTHREAD",//$NON-NLS-1$
+ "THREADS",//$NON-NLS-1$
+ "UPC_MAX_BLOCKSIZE",//$NON-NLS-1$
+ "upc_localsizeof",//$NON-NLS-1$
+ "upc_blocksizeof",//$NON-NLS-1$
+ "upc_elemsizeof",//$NON-NLS-1$
+ "integer",//$NON-NLS-1$
+ "floating",//$NON-NLS-1$
+ "charconst",//$NON-NLS-1$
+ "stringlit",//$NON-NLS-1$
+ "static",//$NON-NLS-1$
+ "LeftBrace",//$NON-NLS-1$
+ "auto",//$NON-NLS-1$
+ "extern",//$NON-NLS-1$
+ "inline",//$NON-NLS-1$
+ "register",//$NON-NLS-1$
+ "typedef",//$NON-NLS-1$
+ "LeftBracket",//$NON-NLS-1$
+ "Comma",//$NON-NLS-1$
+ "SemiColon",//$NON-NLS-1$
+ "RightBrace",//$NON-NLS-1$
+ "char",//$NON-NLS-1$
+ "double",//$NON-NLS-1$
+ "float",//$NON-NLS-1$
+ "int",//$NON-NLS-1$
+ "long",//$NON-NLS-1$
+ "short",//$NON-NLS-1$
+ "signed",//$NON-NLS-1$
+ "unsigned",//$NON-NLS-1$
+ "void",//$NON-NLS-1$
+ "_Bool",//$NON-NLS-1$
+ "_Complex",//$NON-NLS-1$
+ "_Imaginary",//$NON-NLS-1$
+ "RightParen",//$NON-NLS-1$
+ "enum",//$NON-NLS-1$
+ "struct",//$NON-NLS-1$
+ "union",//$NON-NLS-1$
+ "Colon",//$NON-NLS-1$
+ "ERROR_TOKEN",//$NON-NLS-1$
+ "continue",//$NON-NLS-1$
+ "while",//$NON-NLS-1$
+ "RightShift",//$NON-NLS-1$
+ "LeftShift",//$NON-NLS-1$
+ "RightBracket",//$NON-NLS-1$
+ "break",//$NON-NLS-1$
+ "case",//$NON-NLS-1$
+ "default",//$NON-NLS-1$
+ "do",//$NON-NLS-1$
+ "for",//$NON-NLS-1$
+ "goto",//$NON-NLS-1$
+ "if",//$NON-NLS-1$
+ "return",//$NON-NLS-1$
+ "switch",//$NON-NLS-1$
+ "DotDotDot",//$NON-NLS-1$
+ "Assign",//$NON-NLS-1$
+ "upc_barrier",//$NON-NLS-1$
+ "upc_notify",//$NON-NLS-1$
+ "upc_fence",//$NON-NLS-1$
+ "upc_wait",//$NON-NLS-1$
+ "upc_forall",//$NON-NLS-1$
+ "Dot",//$NON-NLS-1$
+ "Slash",//$NON-NLS-1$
+ "Percent",//$NON-NLS-1$
+ "LT",//$NON-NLS-1$
+ "GT",//$NON-NLS-1$
+ "LE",//$NON-NLS-1$
+ "GE",//$NON-NLS-1$
+ "EOF_TOKEN",//$NON-NLS-1$
+ "EQ",//$NON-NLS-1$
+ "NE",//$NON-NLS-1$
+ "Caret",//$NON-NLS-1$
+ "Or",//$NON-NLS-1$
+ "AndAnd",//$NON-NLS-1$
+ "else",//$NON-NLS-1$
+ "Arrow",//$NON-NLS-1$
+ "OrOr",//$NON-NLS-1$
+ "Question",//$NON-NLS-1$
+ "StarAssign",//$NON-NLS-1$
+ "SlashAssign",//$NON-NLS-1$
+ "PercentAssign",//$NON-NLS-1$
+ "PlusAssign",//$NON-NLS-1$
+ "MinusAssign",//$NON-NLS-1$
+ "RightShiftAssign",//$NON-NLS-1$
+ "LeftShiftAssign",//$NON-NLS-1$
+ "AndAssign",//$NON-NLS-1$
+ "CaretAssign",//$NON-NLS-1$
+ "OrAssign",//$NON-NLS-1$
+ "Hash",//$NON-NLS-1$
+ "HashHash",//$NON-NLS-1$
+ "NewLine",//$NON-NLS-1$
+ "Invalid",//$NON-NLS-1$
+ "PlaceMarker",//$NON-NLS-1$
+ "Parameter",//$NON-NLS-1$
+ "DisabledMacroName",//$NON-NLS-1$
+ "SingleLineComment",//$NON-NLS-1$
+ "MultiLineComment"//$NON-NLS-1$
+ };
+
+ public final static boolean isValidForParser = true;
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTCompositeTypeSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTCompositeTypeSpecifier.java
new file mode 100644
index 00000000000..b8fcd023f0a
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTCompositeTypeSpecifier.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core.dom.parser.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTCompositeTypeSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTCompositeTypeSpecifier;
+
+public class UPCASTCompositeTypeSpecifier extends CASTCompositeTypeSpecifier implements
+ IUPCASTCompositeTypeSpecifier {
+
+
+ private int referenceType;
+ private int sharedQualifier;
+ private IASTExpression blockSizeExpression;
+
+
+ public IASTExpression getBlockSizeExpression() {
+ return blockSizeExpression;
+ }
+
+ public int getReferenceType() {
+ return referenceType;
+ }
+
+ public int getSharedQualifier() {
+ return sharedQualifier;
+ }
+
+ public void setBlockSizeExpression(IASTExpression expr) {
+ this.blockSizeExpression = expr;
+ }
+
+ public void setReferenceType(int referenceType) {
+ this.referenceType = referenceType;
+ }
+
+ public void setSharedQualifier(int shared) {
+ this.sharedQualifier = shared;
+ }
+
+
+
+ public boolean accept( ASTVisitor action ){
+ if( action.shouldVisitDeclSpecifiers ){
+ switch( action.visit( this ) ){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ default : break;
+ }
+ }
+ if( getName() != null ) if( !getName().accept( action ) ) return false;
+ if( blockSizeExpression != null) if( !blockSizeExpression.accept( action ) ) return false;
+
+ IASTDeclaration [] decls = getMembers();
+ for( int i = 0; i < decls.length; i++ )
+ if( !decls[i].accept( action ) ) return false;
+
+ if( action.shouldVisitDeclSpecifiers ){
+ switch( action.leave( this ) ){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ default : break;
+ }
+ }
+ return true;
+ }
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTElaboratedTypeSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTElaboratedTypeSpecifier.java
new file mode 100644
index 00000000000..368d1fd0900
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTElaboratedTypeSpecifier.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core.dom.parser.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTElaboratedTypeSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTElaboratedTypeSpecifier;
+
+public class UPCASTElaboratedTypeSpecifier extends CASTElaboratedTypeSpecifier implements IUPCASTElaboratedTypeSpecifier {
+
+ private int referenceType;
+ private int sharedQualifier;
+ private IASTExpression blockSizeExpression;
+
+
+ public IASTExpression getBlockSizeExpression() {
+ return blockSizeExpression;
+ }
+
+ public int getReferenceType() {
+ return referenceType;
+ }
+
+ public int getSharedQualifier() {
+ return sharedQualifier;
+ }
+
+ public void setBlockSizeExpression(IASTExpression expr) {
+ this.blockSizeExpression = expr;
+ }
+
+ public void setReferenceType(int referenceType) {
+ this.referenceType = referenceType;
+ }
+
+ public void setSharedQualifier(int shared) {
+ this.sharedQualifier = shared;
+ }
+
+
+ public boolean accept( ASTVisitor action ){
+ if( action.shouldVisitDeclSpecifiers ){
+ switch( action.visit( this ) ){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ default : break;
+ }
+ }
+ if( getName() != null ) if( !getName().accept( action ) ) return false;
+ if( blockSizeExpression != null) if( !blockSizeExpression.accept( action ) ) return false;
+
+ if( action.shouldVisitDeclSpecifiers ){
+ switch( action.leave( this ) ){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ default : break;
+ }
+ }
+ return true;
+ }
+
+
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTEnumerationSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTEnumerationSpecifier.java
new file mode 100644
index 00000000000..b1864064bdf
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTEnumerationSpecifier.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core.dom.parser.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTEnumerationSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTEnumerationSpecifier;
+
+public class UPCASTEnumerationSpecifier extends CASTEnumerationSpecifier
+ implements IUPCASTEnumerationSpecifier {
+
+ private int referenceType;
+ private int sharedQualifier;
+ private IASTExpression blockSizeExpression;
+
+
+ public IASTExpression getBlockSizeExpression() {
+ return blockSizeExpression;
+ }
+
+ public int getReferenceType() {
+ return referenceType;
+ }
+
+ public int getSharedQualifier() {
+ return sharedQualifier;
+ }
+
+ public void setBlockSizeExpression(IASTExpression expr) {
+ this.blockSizeExpression = expr;
+ }
+
+ public void setReferenceType(int referenceType) {
+ this.referenceType = referenceType;
+ }
+
+ public void setSharedQualifier(int shared) {
+ this.sharedQualifier = shared;
+ }
+
+ public boolean accept( ASTVisitor action ){
+ if( action.shouldVisitDeclSpecifiers ){
+ switch( action.visit( this ) ){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ default : break;
+ }
+ }
+ if( getName() != null ) if( !getName().accept( action ) ) return false;
+ if( blockSizeExpression != null) if( !blockSizeExpression.accept( action ) ) return false;
+
+ IASTEnumerator[] etors = getEnumerators();
+ for ( int i = 0; i < etors.length; i++ ) {
+ if( !etors[i].accept( action ) ) return false;
+ }
+ if( action.shouldVisitDeclSpecifiers ){
+ switch( action.leave( this ) ){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ default : break;
+ }
+ }
+ return true;
+ }
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTForallStatement.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTForallStatement.java
new file mode 100644
index 00000000000..9b6bd49f35b
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTForallStatement.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core.dom.parser.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.ast.IASTStatement;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTForallStatement;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTForStatement;
+
+public class UPCASTForallStatement extends CASTForStatement implements IUPCASTForallStatement {
+
+ private IASTExpression affinity;
+ private boolean affinityContinue;
+
+
+ public boolean isAffinityContinue() {
+ return affinityContinue;
+ }
+
+ public IASTExpression getAffinityExpresiion() {
+ return affinity;
+ }
+
+ public void setAffinityExpression(IASTExpression affinity) {
+ if(affinity != null)
+ this.affinityContinue = false;
+ this.affinity = affinity;
+ }
+
+ public void setAffinityContinue(boolean affinityContinue) {
+ if(affinityContinue)
+ this.affinity = null;
+ this.affinityContinue = affinityContinue;
+ }
+
+
+ public boolean accept(ASTVisitor visitor) {
+ if(visitor.shouldVisitStatements) {
+ switch(visitor.visit(this)){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ }
+ }
+
+ IASTStatement initializer = super.getInitializerStatement();
+ if(initializer != null) if(!initializer.accept(visitor)) return false;
+
+ IASTExpression condition = super.getConditionExpression();
+ if(condition != null) if(!condition.accept(visitor)) return false;
+
+ IASTExpression iteration = super.getIterationExpression();
+ if(iteration != null) if(!iteration.accept(visitor)) return false;
+
+ if(affinity != null) if(!affinity.accept(visitor)) return false;
+
+ IASTStatement body = super.getBody();
+ if(body != null) if(!body.accept(visitor)) return false;
+
+ if(visitor.shouldVisitStatements) {
+ switch(visitor.leave(this)){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ }
+ }
+
+ return true;
+ }
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTKeywordExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTKeywordExpression.java
new file mode 100644
index 00000000000..5d2ed7e1102
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTKeywordExpression.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core.dom.parser.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IBasicType;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTKeywordExpression;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTNode;
+import org.eclipse.cdt.internal.core.dom.parser.c.CBasicType;
+
+public class UPCASTKeywordExpression extends CASTNode implements IUPCASTKeywordExpression {
+
+
+ private int keywordKind;
+
+ public int getKeywordKind() {
+ return keywordKind;
+ }
+
+ public void setKeywordKind(int kind) {
+ this.keywordKind = kind;
+
+ }
+
+ public IType getExpressionType() {
+ return new CBasicType(IBasicType.t_int, 0, this);
+ }
+
+
+ public boolean accept(ASTVisitor visitor) {
+ if(visitor.shouldVisitExpressions) {
+ switch(visitor.visit(this)) {
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ }
+ }
+ if(visitor.shouldVisitExpressions) {
+ switch(visitor.leave(this)) {
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ }
+ }
+ return true;
+ }
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTLayoutQualifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTLayoutQualifier.java
new file mode 100644
index 00000000000..66b955eb09d
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTLayoutQualifier.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core.dom.parser.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTLayoutQualifier;
+
+public class UPCASTLayoutQualifier implements IUPCASTLayoutQualifier {
+
+
+ private boolean isPure;
+ private boolean isIndefinite;
+ private IASTExpression blockSizeExpression;
+
+
+ public IASTExpression getBlockSizeExpression() {
+ return blockSizeExpression;
+ }
+
+
+ public boolean isIndefiniteBlockAllocation() {
+ return isIndefinite;
+ }
+
+
+ public boolean isPureBlockAllocation() {
+ return isPure;
+ }
+
+
+ public void setBlockSizeExpression(IASTExpression expr) {
+ this.blockSizeExpression = expr;
+ }
+
+
+ public void setIndefiniteBlockAllocation(boolean allocation) {
+ this.isIndefinite = allocation;
+
+ }
+
+
+ public void setPureBlockAllocation(boolean allocation) {
+ this.isPure = allocation;
+ }
+
+
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSimpleDeclSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSimpleDeclSpecifier.java
new file mode 100644
index 00000000000..42f64d9db4e
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSimpleDeclSpecifier.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core.dom.parser.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSimpleDeclSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTSimpleDeclSpecifier;
+
+public class UPCASTSimpleDeclSpecifier extends CASTSimpleDeclSpecifier
+ implements IUPCASTSimpleDeclSpecifier {
+
+ private int referenceType;
+ private int sharedQualifier;
+ private IASTExpression blockSizeExpression;
+
+
+ public IASTExpression getBlockSizeExpression() {
+ return blockSizeExpression;
+ }
+
+ public int getReferenceType() {
+ return referenceType;
+ }
+
+ public int getSharedQualifier() {
+ return sharedQualifier;
+ }
+
+ public void setBlockSizeExpression(IASTExpression expr) {
+ this.blockSizeExpression = expr;
+ }
+
+ public void setReferenceType(int referenceType) {
+ this.referenceType = referenceType;
+ }
+
+ public void setSharedQualifier(int shared) {
+ this.sharedQualifier = shared;
+ }
+
+
+ public boolean accept( ASTVisitor action ){
+ if( action.shouldVisitDeclSpecifiers ){
+ switch( action.visit( this ) ){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ default : break;
+ }
+ }
+ if( blockSizeExpression != null) if( !blockSizeExpression.accept( action ) ) return false;
+
+ if( action.shouldVisitDeclSpecifiers ){
+ switch( action.leave( this ) ){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ default : break;
+ }
+ }
+ return true;
+ }
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSizeofExpression.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSizeofExpression.java
new file mode 100644
index 00000000000..766a92db06b
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSizeofExpression.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core.dom.parser.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSizeofExpression;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTUnaryExpression;
+
+public class UPCASTSizeofExpression extends CASTUnaryExpression implements IUPCASTSizeofExpression {
+
+ // TODO: don't really know if extending CASTUnaryExpression is the right thing to do
+ private int upcSizeofOperator;
+
+
+ public int getOperator() {
+ return IASTUnaryExpression.op_sizeof;
+ }
+
+
+ public void setUPCSizeofOperator(int upcSizeofOperator) {
+ this.upcSizeofOperator = upcSizeofOperator;
+ }
+
+
+ public int getUPCSizeofOperator() {
+ return upcSizeofOperator;
+ }
+
+
+}
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSynchronizationStatement.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSynchronizationStatement.java
new file mode 100644
index 00000000000..7a7e945e5b7
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTSynchronizationStatement.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core.dom.parser.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSynchronizationStatement;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTNode;
+
+public class UPCASTSynchronizationStatement extends CASTNode implements IUPCASTSynchronizationStatement {
+
+ private int statmentKind;
+ private IASTExpression barrierExpression = null;
+
+ public IASTExpression getBarrierExpression() {
+ return barrierExpression;
+ }
+
+ public int getStatementKind() {
+ return statmentKind;
+ }
+
+ public void setBarrierExpression(IASTExpression expr) {
+ this.barrierExpression = expr;
+
+ }
+
+ public void setStatementKind(int kind) {
+ this.statmentKind = kind;
+ }
+
+
+ public boolean accept(ASTVisitor visitor) {
+ if(visitor.shouldVisitStatements) {
+ switch(visitor.visit(this)) {
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ }
+ }
+
+ if(barrierExpression != null) {
+ boolean abort = !barrierExpression.accept(visitor);
+ if(abort)
+ return false;
+ }
+
+ if(visitor.shouldVisitStatements) {
+ switch(visitor.leave(this)) {
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ }
+ }
+
+ return true;
+ }
+} \ No newline at end of file
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypedefNameSpecifier.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypedefNameSpecifier.java
new file mode 100644
index 00000000000..5955bbcbc07
--- /dev/null
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/internal/core/dom/parser/upc/ast/UPCASTTypedefNameSpecifier.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.core.dom.parser.upc.ast;
+
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
+import org.eclipse.cdt.core.dom.ast.IASTExpression;
+import org.eclipse.cdt.core.dom.upc.ast.IUPCASTTypedefNameSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTTypedefNameSpecifier;
+
+public class UPCASTTypedefNameSpecifier extends CASTTypedefNameSpecifier
+ implements IUPCASTTypedefNameSpecifier {
+
+
+ private int referenceType;
+ private int sharedQualifier;
+ private IASTExpression blockSizeExpression;
+
+
+ public IASTExpression getBlockSizeExpression() {
+ return blockSizeExpression;
+ }
+
+ public int getReferenceType() {
+ return referenceType;
+ }
+
+ public int getSharedQualifier() {
+ return sharedQualifier;
+ }
+
+ public void setBlockSizeExpression(IASTExpression expr) {
+ this.blockSizeExpression = expr;
+ }
+
+ public void setReferenceType(int referenceType) {
+ this.referenceType = referenceType;
+ }
+
+ public void setSharedQualifier(int shared) {
+ this.sharedQualifier = shared;
+ }
+
+
+ public boolean accept( ASTVisitor action ){
+ if( action.shouldVisitDeclSpecifiers ){
+ switch( action.visit( this ) ){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ default : break;
+ }
+ }
+ if( getName() != null ) if( !getName().accept( action ) ) return false;
+ if( blockSizeExpression != null) if( !blockSizeExpression.accept( action ) ) return false;
+
+ if( action.shouldVisitDeclSpecifiers ){
+ switch( action.leave( this ) ){
+ case ASTVisitor.PROCESS_ABORT : return false;
+ case ASTVisitor.PROCESS_SKIP : return true;
+ default : break;
+ }
+ }
+ return true;
+ }
+
+}

Back to the top