Skip to content

Commit 0ee807b

Browse files
committed
regen
1 parent 0a99e30 commit 0ee807b

File tree

6 files changed

+437
-350
lines changed

6 files changed

+437
-350
lines changed

org/w3c/css/parser/analyzer/CssParser.java

Lines changed: 300 additions & 268 deletions
Large diffs are not rendered by default.

org/w3c/css/parser/analyzer/CssParserTokenManager.java

Lines changed: 93 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
import java.util.ArrayList;
8080

8181
/** Token Manager. */
82-
@SuppressWarnings("unused")public class CssParserTokenManager implements CssParserConstants {
82+
public class CssParserTokenManager implements CssParserConstants {
8383

8484
/** Debug output. */
8585
public java.io.PrintStream debugStream = System.out;
@@ -7936,7 +7936,7 @@ else if ((0x10000000100L & l) != 0L)
79367936
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
79377937
{ jjCheckNAddTwoStates(951, 952); }
79387938
break;
7939-
default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
7939+
default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
79407940
}
79417941
} while(i != startsAt);
79427942
}
@@ -7972,6 +7972,44 @@ else if (jjmatchedPos == strPos && jjmatchedKind > strKind)
79727972

79737973
return toRet;
79747974
}
7975+
7976+
/** Token literal values. */
7977+
public static final String[] jjstrLiteralImages = {
7978+
"", null, null, null, null, null, null, null, null, null, null, null, null,
7979+
null, null, null, null, null, null, null, null, null, "\57\52", "\74\41\55\55",
7980+
"\55\55\76", null, "\174\75", null, null, "\55", null, null, null, null, null, null, null,
7981+
null, null, null, null, null, null, null, null, null, "\175", "\136\75", "\44\75",
7982+
"\52\75", "\75", "\73", "\57", "\133", "\135", "\52", "\56", "\51", "\50", "\72", null,
7983+
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
7984+
null, null, null, "\72\72", null, null, null, null, null, null, null, null, null,
7985+
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
7986+
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
7987+
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
7988+
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
7989+
null, null, "\41", "\44", "\45", "\46", "\140", "\77", "\74", "\174", "\74\75", };
7990+
protected Token jjFillToken()
7991+
{
7992+
final Token t;
7993+
final String curTokenImage;
7994+
final int beginLine;
7995+
final int endLine;
7996+
final int beginColumn;
7997+
final int endColumn;
7998+
String im = jjstrLiteralImages[jjmatchedKind];
7999+
curTokenImage = (im == null) ? input_stream.GetImage() : im;
8000+
beginLine = input_stream.getBeginLine();
8001+
beginColumn = input_stream.getBeginColumn();
8002+
endLine = input_stream.getEndLine();
8003+
endColumn = input_stream.getEndColumn();
8004+
t = Token.newToken(jjmatchedKind, curTokenImage);
8005+
8006+
t.beginLine = beginLine;
8007+
t.endLine = endLine;
8008+
t.beginColumn = beginColumn;
8009+
t.endColumn = endColumn;
8010+
8011+
return t;
8012+
}
79758013
static final int[] jjnextStates = {
79768014
989, 990, 991, 670, 673, 675, 992, 993, 994, 677, 680, 682, 995, 996, 997, 684,
79778015
687, 690, 998, 999, 1000, 692, 695, 697, 1001, 1002, 1003, 699, 702, 704, 1004, 1005,
@@ -8133,44 +8171,6 @@ private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, lo
81338171
}
81348172
}
81358173

8136-
/** Token literal values. */
8137-
public static final String[] jjstrLiteralImages = {
8138-
"", null, null, null, null, null, null, null, null, null, null, null, null,
8139-
null, null, null, null, null, null, null, null, null, "\57\52", "\74\41\55\55",
8140-
"\55\55\76", null, "\174\75", null, null, "\55", null, null, null, null, null, null, null,
8141-
null, null, null, null, null, null, null, null, null, "\175", "\136\75", "\44\75",
8142-
"\52\75", "\75", "\73", "\57", "\133", "\135", "\52", "\56", "\51", "\50", "\72", null,
8143-
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
8144-
null, null, null, "\72\72", null, null, null, null, null, null, null, null, null,
8145-
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
8146-
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
8147-
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
8148-
null, null, null, null, null, null, null, null, null, null, null, null, null, null,
8149-
null, null, "\41", "\44", "\45", "\46", "\140", "\77", "\74", "\174", "\74\75", };
8150-
protected Token jjFillToken()
8151-
{
8152-
final Token t;
8153-
final String curTokenImage;
8154-
final int beginLine;
8155-
final int endLine;
8156-
final int beginColumn;
8157-
final int endColumn;
8158-
String im = jjstrLiteralImages[jjmatchedKind];
8159-
curTokenImage = (im == null) ? input_stream.GetImage() : im;
8160-
beginLine = input_stream.getBeginLine();
8161-
beginColumn = input_stream.getBeginColumn();
8162-
endLine = input_stream.getEndLine();
8163-
endColumn = input_stream.getEndColumn();
8164-
t = Token.newToken(jjmatchedKind, curTokenImage);
8165-
8166-
t.beginLine = beginLine;
8167-
t.endLine = endLine;
8168-
t.beginColumn = beginColumn;
8169-
t.endColumn = endColumn;
8170-
8171-
return t;
8172-
}
8173-
81748174
int curLexState = 0;
81758175
int defaultLexState = 0;
81768176
int jjnewStateCnt;
@@ -8192,7 +8192,7 @@ public Token getNextToken()
81928192
{
81938193
curChar = input_stream.BeginToken();
81948194
}
8195-
catch(java.io.IOException e)
8195+
catch(Exception e)
81968196
{
81978197
jjmatchedKind = 0;
81988198
jjmatchedPos = -1;
@@ -8253,6 +8253,31 @@ public Token getNextToken()
82538253
}
82548254
}
82558255

8256+
void SkipLexicalActions(Token matchedToken)
8257+
{
8258+
switch(jjmatchedKind)
8259+
{
8260+
default :
8261+
break;
8262+
}
8263+
}
8264+
void MoreLexicalActions()
8265+
{
8266+
jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
8267+
switch(jjmatchedKind)
8268+
{
8269+
default :
8270+
break;
8271+
}
8272+
}
8273+
void TokenLexicalActions(Token matchedToken)
8274+
{
8275+
switch(jjmatchedKind)
8276+
{
8277+
default :
8278+
break;
8279+
}
8280+
}
82568281
private void jjCheckNAdd(int state)
82578282
{
82588283
if (jjrounds[state] != jjround)
@@ -8296,9 +8321,14 @@ public CssParserTokenManager (SimpleCharStream stream, int lexState){
82968321
}
82978322

82988323
/** Reinitialise parser. */
8324+
82998325
public void ReInit(SimpleCharStream stream)
83008326
{
8301-
jjmatchedPos = jjnewStateCnt = 0;
8327+
8328+
8329+
jjmatchedPos =
8330+
jjnewStateCnt =
8331+
0;
83028332
curLexState = defaultLexState;
83038333
input_stream = stream;
83048334
ReInitRounds();
@@ -8314,6 +8344,7 @@ private void ReInitRounds()
83148344

83158345
/** Reinitialise parser. */
83168346
public void ReInit(SimpleCharStream stream, int lexState)
8347+
83178348
{
83188349
ReInit(stream);
83198350
SwitchTo(lexState);
@@ -8328,10 +8359,22 @@ public void SwitchTo(int lexState)
83288359
curLexState = lexState;
83298360
}
83308361

8362+
83318363
/** Lexer state names. */
83328364
public static final String[] lexStateNames = {
83338365
"DEFAULT",
83348366
};
8367+
8368+
/** Lex State array. */
8369+
public static final int[] jjnewLexState = {
8370+
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
8371+
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
8372+
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
8373+
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
8374+
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
8375+
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
8376+
-1, -1, -1, -1, -1,
8377+
};
83358378
static final long[] jjtoToken = {
83368379
0xffffffffffe00001L, 0xff803fffffffffffL, 0x7ffffffL,
83378380
};
@@ -8340,12 +8383,17 @@ public void SwitchTo(int lexState)
83408383
};
83418384
static final long[] jjtoSpecial = {
83428385
0x2L, 0x0L, 0x0L,
8386+
};
8387+
static final long[] jjtoMore = {
8388+
0x0L, 0x0L, 0x0L,
83438389
};
83448390
protected SimpleCharStream input_stream;
83458391

83468392
private final int[] jjrounds = new int[1082];
83478393
private final int[] jjstateSet = new int[2 * 1082];
8348-
8349-
8350-
protected char curChar;
8394+
private final StringBuilder jjimage = new StringBuilder();
8395+
private StringBuilder image = jjimage;
8396+
private int jjimageLen;
8397+
private int lengthOfMatch;
8398+
protected int curChar;
83518399
}

org/w3c/css/parser/analyzer/ParseException.java

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 6.0 */
2-
/* JavaCCOptions:KEEP_LINE_COL=null */
1+
/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 7.0 */
2+
/* JavaCCOptions:KEEP_LINE_COLUMN=true */
33
package org.w3c.css.parser.analyzer;
44

55
/**
@@ -20,6 +20,11 @@ public class ParseException extends Exception {
2020
*/
2121
private static final long serialVersionUID = 1L;
2222

23+
/**
24+
* The end of line string for this machine.
25+
*/
26+
protected static String EOL = System.getProperty("line.separator", "\n");
27+
2328
/**
2429
* This constructor is used by the method "generateParseException"
2530
* in the generated parser. Calling this constructor generates
@@ -88,7 +93,7 @@ public ParseException(String message) {
8893
private static String initialise(Token currentToken,
8994
int[][] expectedTokenSequences,
9095
String[] tokenImage) {
91-
String eol = System.getProperty("line.separator", "\n");
96+
9297
StringBuffer expected = new StringBuffer();
9398
int maxSize = 0;
9499
for (int i = 0; i < expectedTokenSequences.length; i++) {
@@ -101,7 +106,7 @@ private static String initialise(Token currentToken,
101106
if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
102107
expected.append("...");
103108
}
104-
expected.append(eol).append(" ");
109+
expected.append(EOL).append(" ");
105110
}
106111
String retval = "Encountered \"";
107112
Token tok = currentToken.next;
@@ -118,20 +123,23 @@ private static String initialise(Token currentToken,
118123
tok = tok.next;
119124
}
120125
retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
121-
retval += "." + eol;
122-
if (expectedTokenSequences.length == 1) {
123-
retval += "Was expecting:" + eol + " ";
126+
retval += "." + EOL;
127+
128+
129+
if (expectedTokenSequences.length == 0) {
130+
// Nothing to add here
124131
} else {
125-
retval += "Was expecting one of:" + eol + " ";
132+
if (expectedTokenSequences.length == 1) {
133+
retval += "Was expecting:" + EOL + " ";
134+
} else {
135+
retval += "Was expecting one of:" + EOL + " ";
136+
}
137+
retval += expected.toString();
126138
}
127-
retval += expected.toString();
139+
128140
return retval;
129141
}
130142

131-
/**
132-
* The end of line string for this machine.
133-
*/
134-
protected String eol = System.getProperty("line.separator", "\n");
135143

136144
/**
137145
* Used to convert raw characters to their escaped version
@@ -144,8 +152,6 @@ static String add_escapes(String str) {
144152
for (int i = 0; i < str.length(); i++) {
145153
switch (str.charAt(i))
146154
{
147-
case 0 :
148-
continue;
149155
case '\b':
150156
retval.append("\\b");
151157
continue;
@@ -184,4 +190,4 @@ static String add_escapes(String str) {
184190
}
185191

186192
}
187-
/* JavaCC - OriginalChecksum=6b814b86a7f83d7302418ed01d10c383 (do not edit this line) */
193+
/* JavaCC - OriginalChecksum=7d68a6a068da3c9ac8d23a9a0983a253 (do not edit this line) */

org/w3c/css/parser/analyzer/SimpleCharStream.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 6.0 */
1+
/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 7.0 */
22
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
33
package org.w3c.css.parser.analyzer;
44

@@ -30,13 +30,14 @@ public class SimpleCharStream
3030
protected char[] buffer;
3131
protected int maxNextCharInd = 0;
3232
protected int inBuf = 0;
33-
protected int tabSize = 8;
34-
protected boolean trackLineColumn = false;
33+
protected int tabSize = 1;
34+
protected boolean trackLineColumn = true;
3535

3636
public void setTabSize(int i) { tabSize = i; }
3737
public int getTabSize() { return tabSize; }
3838

3939

40+
4041
protected void ExpandBuff(boolean wrapAround)
4142
{
4243
char[] newbuffer = new char[bufsize + 2048];
@@ -467,8 +468,7 @@ public void adjustBeginLineColumn(int newLine, int newCol)
467468
line = bufline[j];
468469
column = bufcolumn[j];
469470
}
470-
471471
boolean getTrackLineColumn() { return trackLineColumn; }
472-
void setTrackLineColumn(boolean trackLineColumn) { this.trackLineColumn = trackLineColumn; }
472+
void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; }
473473
}
474-
/* JavaCC - OriginalChecksum=e2781e1a6e95beb7efed54cdfe328ade (do not edit this line) */
474+
/* JavaCC - OriginalChecksum=ddaf552144d8059b9d34162bcfbf9de7 (do not edit this line) */

org/w3c/css/parser/analyzer/Token.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* Generated By:JavaCC: Do not edit this line. Token.java Version 6.0 */
2-
/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
1+
/* Generated By:JavaCC: Do not edit this line. Token.java Version 7.0 */
2+
/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COLUMN=true,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
33
package org.w3c.css.parser.analyzer;
44

55
/**
@@ -97,6 +97,7 @@ public Token(int kind, String image)
9797
/**
9898
* Returns the image.
9999
*/
100+
@Override
100101
public String toString()
101102
{
102103
return image;
@@ -128,4 +129,4 @@ public static Token newToken(int ofKind)
128129
}
129130

130131
}
131-
/* JavaCC - OriginalChecksum=7af9a5dffce9b3c54b5b20fb3ae238c7 (do not edit this line) */
132+
/* JavaCC - OriginalChecksum=36fc9b16b8ca0d6418e40ba2b00d4428 (do not edit this line) */

0 commit comments

Comments
 (0)