This commit is contained in:
parent
31ccb94a70
commit
29e0e9c032
@ -1,6 +1,6 @@
|
|||||||
--- Main.java.orig 2003-03-26 11:47:18.000000000 +0100
|
--- Main.java.orig 2000-09-06 16:09:47.000000000 +0200
|
||||||
+++ Main.java 2003-03-26 11:47:21.000000000 +0100
|
+++ Main.java 2024-02-21 16:03:00.139049849 +0100
|
||||||
@@ -1072,8 +1072,15 @@
|
@@ -1068,8 +1068,15 @@
|
||||||
// Added 6/24/98 Raimondas Lencevicius
|
// Added 6/24/98 Raimondas Lencevicius
|
||||||
// May be made more efficient by replacing String operations
|
// May be made more efficient by replacing String operations
|
||||||
// Assumes correctly formed input String. Performs no error checking
|
// Assumes correctly formed input String. Performs no error checking
|
||||||
@ -16,7 +16,7 @@
|
|||||||
m_outstream.println("\t\tint colonIndex = -1;");
|
m_outstream.println("\t\tint colonIndex = -1;");
|
||||||
m_outstream.println("\t\tString lengthString;");
|
m_outstream.println("\t\tString lengthString;");
|
||||||
m_outstream.println("\t\tint sequenceLength = 0;");
|
m_outstream.println("\t\tint sequenceLength = 0;");
|
||||||
@@ -1216,13 +1223,23 @@
|
@@ -1212,13 +1219,23 @@
|
||||||
int[] yy_cmap = new int[m_spec.m_ccls_map.length];
|
int[] yy_cmap = new int[m_spec.m_ccls_map.length];
|
||||||
for (i = 0; i < m_spec.m_ccls_map.length; ++i)
|
for (i = 0; i < m_spec.m_ccls_map.length; ++i)
|
||||||
yy_cmap[i] = m_spec.m_col_map[m_spec.m_ccls_map[i]];
|
yy_cmap[i] = m_spec.m_col_map[m_spec.m_ccls_map[i]];
|
||||||
@ -40,8 +40,8 @@
|
|||||||
emit_table_as_string(new int[][] { m_spec.m_row_map });
|
emit_table_as_string(new int[][] { m_spec.m_row_map });
|
||||||
m_outstream.println(")[0];");
|
m_outstream.println(")[0];");
|
||||||
m_outstream.println();
|
m_outstream.println();
|
||||||
@@ -1237,8 +1254,14 @@
|
@@ -1233,8 +1250,14 @@
|
||||||
CUtility.ASSERT(dtrans.m_dtrans.length==m_spec.m_dtrans_ncols);
|
CUtility.assert(dtrans.m_dtrans.length==m_spec.m_dtrans_ncols);
|
||||||
yy_nxt[elem] = dtrans.m_dtrans;
|
yy_nxt[elem] = dtrans.m_dtrans;
|
||||||
}
|
}
|
||||||
+ if (Main.staticFlag) {
|
+ if (Main.staticFlag) {
|
||||||
@ -55,7 +55,7 @@
|
|||||||
emit_table_as_string(yy_nxt);
|
emit_table_as_string(yy_nxt);
|
||||||
m_outstream.println(");");
|
m_outstream.println(");");
|
||||||
m_outstream.println();
|
m_outstream.println();
|
||||||
@@ -3825,26 +3848,43 @@
|
@@ -3821,18 +3844,35 @@
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
Function: main
|
Function: main
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
@ -79,7 +79,6 @@
|
|||||||
- {
|
- {
|
||||||
- System.out.println("Usage: JLex.Main <filename>");
|
- System.out.println("Usage: JLex.Main <filename>");
|
||||||
- return;
|
- return;
|
||||||
- }
|
|
||||||
+ // Parse options starting with '-'
|
+ // Parse options starting with '-'
|
||||||
+ for (i = 0; i < arg.length && arg[i].charAt(0) == '-'; i++) {
|
+ for (i = 0; i < arg.length && arg[i].charAt(0) == '-'; i++) {
|
||||||
+ if (arg[i].equals("-static")) {
|
+ if (arg[i].equals("-static")) {
|
||||||
@ -93,10 +92,10 @@
|
|||||||
+ // Enough arguments left ?
|
+ // Enough arguments left ?
|
||||||
+ if (arg.length - i < 1) {
|
+ if (arg.length - i < 1) {
|
||||||
+ printUsage();
|
+ printUsage();
|
||||||
+ }
|
}
|
||||||
|
|
||||||
/* Note: For debuging, it may be helpful to remove the try/catch
|
/* Note: For debuging, it may be helpful to remove the try/catch
|
||||||
block and permit the Exception to propagate to the top level.
|
@@ -3840,7 +3880,7 @@
|
||||||
This gives more information. */
|
This gives more information. */
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
Wed Feb 21 12:51:43 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
Wed Feb 21 12:51:43 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
- Use %patch -P N instead of deprecated %patchN.
|
- Use %patch -P N instead of deprecated %patchN.
|
||||||
|
- Modified patch:
|
||||||
|
* jlex-1.2.6.static.patch
|
||||||
|
+ rediff to changed Main.java
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 18 16:44:59 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
Fri Mar 18 16:44:59 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
@ -45,6 +45,8 @@ JLex is a lexical analyzer generator for Java.
|
|||||||
%setup -q -c -T
|
%setup -q -c -T
|
||||||
cp %{SOURCE0} .
|
cp %{SOURCE0} .
|
||||||
%patch -P 0
|
%patch -P 0
|
||||||
|
# assert is keyword since 1.4
|
||||||
|
sed -i "s/assert/ASSERT/g" Main.java
|
||||||
cp %{SOURCE1} build.xml
|
cp %{SOURCE1} build.xml
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user