Commit 08949e8e authored by Arpad Lovassy's avatar Arpad Lovassy
Browse files

Changed ANTLR Runtime version from 4.3 to 4.7.1


Signed-off-by: Arpad Lovassy's avatarzlovarp <arpad.lovassy@semcon.com>
parent 7b9acd94
bin
Semantic_Analizer_Tests/.cache/
**/*.interp
**/*.pdf
.settings
\ No newline at end of file
.settings
......@@ -16,26 +16,26 @@ Java 1.6 or higher, recommended: 1.7. To compile Titanium, Java 1.8 is required.
XText 2.7.3 (Prerequisite for antlr), available at http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/
ANTLR 4 SDK 0.3.5, available on Eclipse Marketplace
ANTLR Runtime 4.3, recommended: 4.3, available at Eclipse Orbit
ANTLR Runtime 4.7.1, recommended: 4.7.1, available at Eclipse Orbit
Ant 1.9.2 or higher
NOTE: Build will not work below 1.8 for sure!
Eclipse IDE for Eclipse Committers 4.7.0 or higher, recommended: 4.18.0
ANTLR 4.3
ANTLR 4.7.1
----------------------------------------------------------------------
2. SETTING UP ECLIPSE FOR TITAN PLUGIN DEVELOPMENT
----------------------------------------------------------------------
2.0 Download ANTLR 4.3.0 (and not higher!!!) from http://www.antlr.org/download/antlr-4.3-complete.jar for example to $HOME/antlr/.
2.0 Download ANTLR 4.7.1 (and not higher!!!) from http://www.antlr.org/download/antlr-4.7.1-complete.jar for example to $HOME/antlr/.
2.1. Installing Eclipse plug-ins:
-Eclipse -> Help -> Install New Software...
Contact all update sites during install to find required software -> ALWAYS SWITCH OFF (it can cause problems), except of installing XText!!!
-Install XText 2.7.3, ANTLR 4 SDK, ANTLR Runtime 4.3.0 and Ant according to 1. by filtering the product name.
-Install XText 2.7.3, ANTLR 4 SDK, ANTLR Runtime 4.7.1 and Ant according to 1. by filtering the product name.
/* ANTLR UI : http://antlreclipse.sourceforge.net/updates/ (not necessary???) */
2.1.1 After installing ANTLRs, go to Windows->Preferences-> ANTLR 4->Tools and
-Under ANTLR Tool
set yes for "Tool is activated".
select ANTLR 4.3 from the distribution list (or add $HOME/antlr/antlr-4.3-complete if is not in the list, see 2.0)
select ANTLR 4.7.1 from the distribution list (or add $HOME/antlr/antlr-4.7.1-complete if is not in the list, see 2.0)
-Under Options
type into the "Directory" field:./src
set the other fields no,no,yes,yes,"UTF-8"
......@@ -89,12 +89,12 @@ It modifies the source, you need to rebuild org.eclipse.titan.common plug-in pro
5. BUILDING AND INSTALLING TITAN PLUG-INS FROM COMMAND LINE WITH ANT
----------------------------------------------------------------------
5.1. EXTERNAL JAR DEPENDENCIES
ANTLR 4.3 SDK 0.3.5
ANTLR 4.7.1 SDK 0.3.5
available at Eclipse Orbit
http://download.eclipse.org/tools/orbit/downloads/drops/S20150519210750/
NOTE: The drop version changes very often.
antlr-4.3-complete.jar
available at: http://www.antlr.org/download/antlr-4.3-complete.jar
antlr-4.7.1-complete.jar
available at: http://www.antlr.org/download/antlr-4.7.1-complete.jar
junit.jar (JUnit4)
These jars are needed by help.plugin to create pdf documentation
......@@ -173,7 +173,7 @@ ant \
-DJAVA_HOME=$HOME/jdk/ \
-DECLIPSE_HOME=$HOME/eclipse/ \
-Dcompiler.location=$HOME/git/titan/ \
-Dantlr4.jar.location=${LIB_DIR_LOCAL}/antlr-4.3-complete.jar \
-Dantlr4.jar.location=${LIB_DIR_LOCAL}/antlr-4.7.1-complete.jar \
-Ddoc2pdf.jar=${LIB_DIR_GIT}/doc2pdf.jar \
-Djava6=$HOME/jdk/bin/java \
-lib ${LIB_DIR_GIT}/edu.uci.ics.jung/jung-graph-impl-2.1.jar \
......@@ -197,7 +197,7 @@ ant \
-f build_main.xml \
-DJAVA_HOME=$HOME/jdk/ \
-DECLIPSE_HOME=$HOME/eclipse/ \
-Dantlr4.jar.location=$HOME/lib/antlr-4.3-complete.jar \
-Dantlr4.jar.location=$HOME/lib/antlr-4.7.1-complete.jar \
-Dcompiler.location=$HOME/git/titan/ \
designer.plugin
......@@ -217,7 +217,7 @@ Copy these *.jar files to $ECLIPSE_HOME/plugins/ directory.
jung-algorithms-2.1.jar
jung-io-2.1.jar
com.google.guava_21.0.0.v20170206-1425.jar
org.antlr.runtime_4.3.0.v201502022030.jar
org.antlr.runtime_4.7.1.v20181120-0808.jar
org.apache.poi_3.9.0.v201405241750.jar
6.1.3. Titan jars are also copied to eclipse/plugins
cp -f result/plugins/* ${ECLIPSE_INSTALLED}/plugins
......
......@@ -4,7 +4,7 @@ Bundle-Name: Regression_Test_java
Bundle-SymbolicName: Regression_Test_java;singleton:=true
Bundle-Version: 8.0.0._20210527-1000
Require-Bundle: org.eclipse.titan.runtime;bundle-version="1.0.0",
org.antlr.runtime;bundle-version="4.3.0"
org.antlr.runtime;bundle-version="4.7.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.titan.Regression_Test_java.generated,
......
......@@ -160,7 +160,7 @@ You may add additional accurate notices of copyright ownership.
<import plugin="org.eclipse.ui.forms"/>
<import plugin="org.eclipse.ui.navigator"/>
<import plugin="org.eclipse.ui.views"/>
<import plugin="org.antlr.runtime" version="4.3.0"/>
<import plugin="org.antlr.runtime" version="4.7.1"/>
<import plugin="org.eclipse.debug.ui"/>
<import plugin="org.eclipse.ui.navigator.resources"/>
<import plugin="org.eclipse.core.filesystem"/>
......
......@@ -159,7 +159,7 @@ You may add additional accurate notices of copyright ownership.
<import plugin="org.eclipse.core.expressions"/>
<import plugin="org.eclipse.core.filesystem"/>
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.antlr.runtime" version="4.3.0" match="greaterOrEqual"/>
<import plugin="org.antlr.runtime" version="4.7.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.jface.text"/>
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
......
......@@ -5,7 +5,7 @@
version="8.0.0._20210527-1000">
<description>
This feature packages the ANTLR 4.3 runtime from ORBIT, to ease
This feature packages the ANTLR 4.7.1 runtime from ORBIT, to ease
installation
</description>
......@@ -42,7 +42,7 @@ Examples and documentation as well as updated source code for ANTLR is available
id="org.antlr.runtime"
download-size="0"
install-size="0"
version="4.3.0.v201502022030"
version="4.7.1.v20181120-0808"
unpack="false"/>
</feature>
......@@ -169,7 +169,7 @@ You may add additional accurate notices of copyright ownership.
<import plugin="org.eclipse.ui.navigator.resources"/>
<import plugin="org.eclipse.core.filesystem" version="1.3.200" match="greaterOrEqual"/>
<import plugin="org.eclipse.debug.core"/>
<import plugin="org.antlr.runtime" version="4.3.0" match="greaterOrEqual"/>
<import plugin="org.antlr.runtime" version="4.7.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.ltk.ui.refactoring"/>
<import plugin="org.eclipse.search"/>
<import plugin="org.eclipse.core.resources" version="3.6.0" match="greaterOrEqual"/>
......
......@@ -25,7 +25,7 @@
@echo off
@set ANTLR_VERSION=4.3
@set ANTLR_VERSION=4.7.1
:loop
@if not "%1"=="" (
......
......@@ -21,7 +21,7 @@
set -e
set -o pipefail
ANTLR_VERSION=4.3
ANTLR_VERSION=4.7.1
while :
do
......
......@@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.debug.core,
org.eclipse.core.filesystem,
org.eclipse.ui.ide,
org.antlr.runtime;bundle-version="4.3.0"
org.antlr.runtime;bundle-version="4.7.1"
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Eclipse-LazyStart: true
......
......@@ -8,7 +8,7 @@
Installing the requirements:
- install antlr plugin "antlr4ide" as described here: https://github.com/jknack/antlr4ide
- download an antlr compiler of version 4.3: http://www.antlr.org/download/antlr-4.3-complete.jar
- download an antlr compiler of version 4.7.1: http://www.antlr.org/download/antlr-4.7.1-complete.jar
- to be able to try it out you need to install antlr runtime from orbit: http://download.eclipse.org/tools/orbit/downloads/drops/R20151221205849/repository/
Setting up antlr4IDE
......@@ -19,7 +19,7 @@ Some of the default settings of antlr4ide need to be changed.
Go to Window / Preferences / ANTLR4 / Tool
2)
In the antlr tool region of the preference page ass and enable the antlr compiler (version 4.3)
In the antlr tool region of the preference page ass and enable the antlr compiler (version 4.7.1)
3)
In the Options section:
......
......@@ -8,6 +8,7 @@
package org.eclipse.titan.common.parsers;
import org.antlr.v4.runtime.Parser;
import org.antlr.v4.runtime.RuleContext;
import org.antlr.v4.runtime.misc.Interval;
import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
......@@ -80,9 +81,9 @@ public class AddedParseTree implements ParseTree {
mText = aText;
}
public void setParent( final ParseTree aParent ) {
@Override
public void setParent( final RuleContext aParent ) {
mParent = aParent;
}
}
......@@ -591,7 +591,7 @@ BEGINCHAR: '{'
ENDCHAR: '}'
{ popInterval();
};
MACRORVALUE: [0-9|A-Z|a-z|.|_|-]+;
MACRORVALUE: [0-9A-Za-z._|-]+;
ASSIGNMENTCHAR5: ':'? '=' -> type(ASSIGNMENTCHAR);
COLON: ':';
STRING5: FR_STRING -> type(STRING);
......
......@@ -23,7 +23,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.filesystem,
org.eclipse.debug.core,
org.eclipse.titan.common;bundle-version="8.0.0",
org.antlr.runtime;bundle-version="4.3.0",
org.antlr.runtime;bundle-version="4.7.1",
org.eclipse.jdt.core;bundle-version="3.10.2",
org.eclipse.core.expressions;bundle-version="3.4.600",
org.eclipse.pde.core;bundle-version="3.10.2",
......@@ -32,7 +32,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.externaltools,
org.eclipse.ant.launching,
org.eclipse.jdt.launching;bundle-version="2.0.0",
org.eclipse.jdt.ui
org.eclipse.jdt.ui,
org.eclipse.titan.common
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Bundle-ClassPath: .
......
......@@ -7,7 +7,7 @@
###############################################################################
Installing the requirements:
- install antlr plugin "antlr4ide" as described here: https://github.com/jknack/antlr4ide
- download an antlr compiler of version 4.3: http://www.antlr.org/download/antlr-4.3-complete.jar
- download an antlr compiler of version 4.7.1: http://www.antlr.org/download/antlr-4.7.1-complete.jar
- to be able to try it out you need to install antlr runtime from orbit: http://download.eclipse.org/tools/orbit/downloads/drops/R20151221205849/repository/
Setting up antlr4IDE
......@@ -18,7 +18,7 @@ Some of the default settings of antlr4ide need to be changed.
Go to Window / Preferences / ANTLR4 / Tool
2)
In the antlr tool region of the preference page add and enable the antlr compiler (version 4.3)
In the antlr tool region of the preference page add and enable the antlr compiler (version 4.7.1)
3)
In the Options section:
......
......@@ -85,7 +85,7 @@ public void setEndToken(final Token p_endToken) {
fragment
WS
:
[ \t\n\x0B\f\r]+
[ \t\n\u000B\f\r]+
;
fragment
NEWLINE
......@@ -162,7 +162,7 @@ REFERENCE_RULE : '{' (WS)? IDENTIFIER (( (WS)? '.' (WS)? IDENTIFIER ) | ( (WS)?
}
}
;
INVALID_REFERENCE_RULE : '{' [ ^} ]* '}' {
INVALID_REFERENCE_RULE : '{' [^}]* '}' {
Location location = new Location(actualFile, actualLine, startToken.getStartIndex() + 1, startToken.getStopIndex());
location.reportSyntacticError(String.format("Invalid reference expression: %s", tokenStr));
};
......@@ -430,13 +430,13 @@ SQUARE_BRACES : ( '{'|'}' ) {
ps.addString(getText());
actualColumn++;
};
QUOTE_MARKS : ('\\\"' |'\"\"') {
QUOTE_MARKS : ('\\"' |'""') {
ps.addChar('\\');
ps.addChar('"');
actualColumn += 2;
};
//metachars and escaped metachars
METACHARS : '\\'[dwtnrsb?*\\\[\]\-\^|()#+-] {
METACHARS : '\\'[dwtnrsb?*\\[\]^|()#+-] {
ps.addChar('\\');
ps.addString(getText());
actualColumn += 2;
......
......@@ -48,7 +48,7 @@ fragment OCT: HEX HEX;
BSTRING: '\'' WS? ( BIN WS? )* '\'B';
HSTRING: '\'' WS? ( HEX WS? )* '\'H';
OSTRING: '\'' WS? ( OCT WS? )* '\'O';
XSTRING: '\'' ~[\']* '\'';
XSTRING: '\'' ~[']* '\'';
fragment DIGIT: [0-9];
fragment INT: [1-9] DIGIT* | '0';
......@@ -62,7 +62,7 @@ FLOATVALUE:
DQUOTE: ('""' | '\\"');
CHAR: (['"\\'] | '\\'['"'] | DQUOTE DQUOTE);
CHAR: (['"\\] | '\\'['"] | DQUOTE DQUOTE);
......@@ -289,7 +289,7 @@ FLOATVALUE1:
DQUOTE1: ('""' | '\\"') -> type(DQUOTE);
CHAR1: (['"\\'] | '\\'['"'] | DQUOTE DQUOTE) -> type(CHAR);
CHAR1: (['"\\] | '\\'['"] | DQUOTE DQUOTE) -> type(CHAR);
//MATCH_CHAR1: ('\'\\'| '\'\'' | '\\' '\n') -> type(MATCH_CHAR); //?
......
......@@ -241,7 +241,7 @@ public class NewTITANJavaProjectWizard extends BasicNewResourceWizard implements
content.append("Bundle-SymbolicName: " + newProject.getName() + "; singleton:=true\n");
content.append("Bundle-Version: 1.0.0\n");
content.append("Require-Bundle: org.eclipse.titan.runtime;bundle-version=\"1.0.0\",\n");
content.append(" org.antlr.runtime;bundle-version=\"4.3.0\"\n");
content.append(" org.antlr.runtime;bundle-version=\"4.7.1\"\n");
content.append("Bundle-RequiredExecutionEnvironment: JavaSE-1.6\n");
content.append("Bundle-ActivationPolicy: lazy\n");
content.append("Export-Package: " + ProjectSourceCompiler.getPackageGeneratedRoot(newProject) + ",\n");
......
......@@ -62,7 +62,7 @@ This document uses the following typographical conventions:
* Eclipse IDE 4.7.0 (Oxygen) and all its dependencies, for example, GTK2, must be installed. Any later version is supported. Recommended: the latest Eclipse IDE for Java Developers or Eclipse IDE for C/C++ Developers depending on the user preferences
* ANTLR Runtime 4.3
* ANTLR Runtime 4.7.1
* TITAN TTCN-3 Toolset installed. (Only needed if Eclipse is used for project compilation and test execution. Editing does not require it.)
......@@ -84,7 +84,7 @@ https://github.com/google/guava
* Apache POI 3.9.0
* ANTLR Runtime 4.3.0
* ANTLR Runtime 4.7.1
== Cygwin on Windows
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment