From: Finn B. <bc...@us...> - 2001-10-30 20:37:37
|
Update of /cvsroot/jython/jython/org/python/parser In directory usw-pr-cvs1:/tmp/cvs-serv26174 Modified Files: PythonGrammar.java PythonGrammarConstants.java PythonGrammarTokenManager.java Log Message: Commiting generated files. Fix for "[ #475445 ] incompatibility with python". Explicit ignore newlines in single-line-comments and make a special case for trailing comments where the newline isn't ignored. Index: PythonGrammar.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/parser/PythonGrammar.java,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -d -r2.13 -r2.14 *** PythonGrammar.java 2001/07/20 13:43:03 2.13 --- PythonGrammar.java 2001/10/30 20:37:33 2.14 *************** *** 55,59 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: simple_stmt(); break; --- 55,59 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: simple_stmt(); break; *************** *** 147,151 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: ; break; --- 147,151 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: ; break; *************** *** 194,198 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: stmt(); break; --- 194,198 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: stmt(); break; *************** *** 644,648 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: simple_stmt(); break; --- 644,648 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: simple_stmt(); break; *************** *** 707,711 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: expr_stmt(); break; --- 707,711 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: expr_stmt(); break; *************** *** 1349,1353 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: SmartTestList(); break; --- 1349,1353 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: SmartTestList(); break; *************** *** 1406,1410 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: test(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { --- 1406,1410 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: test(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { *************** *** 2134,2138 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: test(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { --- 2134,2138 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: test(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { *************** *** 2211,2215 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: simple_stmt(); break; --- 2211,2215 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: simple_stmt(); break; *************** *** 2257,2261 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: ; break; --- 2257,2261 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: ; break; *************** *** 2317,2321 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: and_test(); label_16: --- 2317,2321 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: and_test(); label_16: *************** *** 2456,2460 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: comparison(); break; --- 2456,2460 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: comparison(); break; *************** *** 3194,3198 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: power(); break; --- 3194,3198 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: power(); break; *************** *** 3394,3398 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: SmartTestList(); break; --- 3394,3398 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: SmartTestList(); break; *************** *** 3429,3433 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: listmaker(); break; --- 3429,3433 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: listmaker(); break; *************** *** 3484,3488 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: dictmaker(); break; --- 3484,3488 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: dictmaker(); break; *************** *** 3513,3518 **** } break; ! case 112: ! jj_consume_token(112); SmartTestList(); SimpleNode jjtn004 = new SimpleNode(JJTSTR_1OP); --- 3513,3518 ---- } break; ! case 113: ! jj_consume_token(113); SmartTestList(); SimpleNode jjtn004 = new SimpleNode(JJTSTR_1OP); *************** *** 3521,3525 **** jjtreeOpenNodeScope(jjtn004); try { ! jj_consume_token(112); } finally { if (jjtc004) { --- 3521,3525 ---- jjtreeOpenNodeScope(jjtn004); try { ! jj_consume_token(113); } finally { if (jjtc004) { *************** *** 3723,3727 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: SimpleNode jjtn002 = new SimpleNode(JJTSLICE); boolean jjtc002 = true; --- 3723,3727 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: SimpleNode jjtn002 = new SimpleNode(JJTSLICE); boolean jjtc002 = true; *************** *** 3816,3820 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: test(); break; --- 3816,3820 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: test(); break; *************** *** 3845,3849 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: test(); break; --- 3845,3849 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: test(); break; *************** *** 4308,4312 **** case TRIPLE_STRING: case TRIPLE_STRING2: ! case 112: normalargs(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { --- 4308,4312 ---- case TRIPLE_STRING: case TRIPLE_STRING2: ! case 113: normalargs(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { *************** *** 5463,5478 **** } - final private boolean jj_3_22() { - if (jj_3R_44()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - - final private boolean jj_3_21() { - if (jj_3R_44()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - return false; - } - final private boolean jj_3_20() { if (jj_scan_token(COMMA)) return true; --- 5463,5466 ---- *************** *** 5700,5704 **** final private boolean jj_3R_139() { ! if (jj_scan_token(112)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; --- 5688,5692 ---- final private boolean jj_3R_139() { ! if (jj_scan_token(113)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; *************** *** 6599,6602 **** --- 6587,6602 ---- } + final private boolean jj_3_22() { + if (jj_3R_44()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + + final private boolean jj_3_21() { + if (jj_3R_44()) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + return false; + } + public PythonGrammarTokenManager token_source; public Token token, jj_nt; *************** *** 6608,6615 **** private int jj_gen; final private int[] jj_la1 = new int[104]; ! final private int[] jj_la1_0 = {0x182a0040,0x182a0040,0x182a0040,0x40,0xa0020000,0x1000000,0x1000000,0xa0000000,0xa0020000,0xa0000000,0x0,0x20000,0x1000000,0x182a0000,0x800000,0x182a0000,0x0,0x0,0x1000000,0x1000000,0x1000000,0x0,0x0,0x182a0000,0x1000000,0x1000000,0x182a0000,0x0,0x1000000,0x1000000,0x20000000,0x0,0x2000000,0x0,0x1000000,0x1000000,0x0,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x182a0000,0x182a0000,0x182a0040,0x0,0x182a0000,0x0,0x182a0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000000,0x18000000,0x60000000,0x60000000,0x182a0000,0x2220000,0x20000,0x2220000,0x182a0000,0x182a0000,0x182a0000,0x0,0x2a0000,0xa0020000,0x1000000,0x4000000,0x1e2a0000,0x182a0000,0x182a0000,0x4000000,0x1000000,0x1000000,0x1000000,0x1000000,0x1000000,0x0,0x0,0x0,0x20000,0x1000000,0xa0000000,0xa0000000,0x1000000,0x1000000,0xa0000000,0xa0000000,0x182a0000,0xa0000000,0x0,0x0,0x0,0x0,}; ! final private int[] jj_la1_1 = {0x90000008,0x90000008,0x90000008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x90000008,0x0,0x90000008,0x80,0x3ff8000,0x0,0x0,0x0,0x0,0x0,0x90000008,0x0,0x0,0x90000008,0x0,0x0,0x0,0xfc000000,0x0,0x0,0x0,0x0,0x0,0x40000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x90000008,0x90000008,0x90000008,0x4000000,0x90000008,0x8000000,0x10000008,0x70007f00,0x50007f00,0x20000000,0x20,0x10,0x40,0x3,0x3,0x0,0x0,0x4,0x4,0x8,0x0,0x0,0x0,0x90000008,0x90000008,0x90000008,0x0,0x0,0x0,0x0,0x0,0x90000008,0x90000008,0x90000008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfc000008,0x0,0x0,0x0,0x0,0xfc000000,}; ! final private int[] jj_la1_2 = {0x1efffdb9,0x1efffdb9,0x1efffdb9,0x0,0xc00000,0x0,0x0,0x0,0xc00000,0x0,0x0,0xc00000,0x0,0x1efffdb9,0x0,0x1efffc00,0x0,0x0,0x0,0x0,0x0,0x400,0x47000,0x1ec00000,0x0,0x0,0x1ec00000,0x18000,0x0,0x0,0xffffff,0x400000,0x0,0x400000,0x0,0x0,0x0,0x0,0x1b9,0x4,0x2,0x2,0x2,0x40,0x2,0x240,0x0,0x1ec00000,0x1efffdb9,0x1efffc00,0x0,0x1ec00000,0x0,0x1ec00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1ec00000,0x0,0x0,0x0,0x1ec00000,0x1ec00000,0x1ec00000,0x0,0x1ec00000,0xc00000,0x0,0x0,0x1ec00000,0x1ec00000,0x1ec00000,0x0,0x0,0x0,0x0,0x0,0x0,0x10,0x11,0x11,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1effffff,0x0,0x1e000000,0xc00000,0x0,0xffffff,}; ! final private int[] jj_la1_3 = {0x10078,0x10078,0x10078,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10078,0x0,0x10078,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10078,0x0,0x0,0x10078,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10078,0x10078,0x10078,0x0,0x10078,0x0,0x10078,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10078,0x0,0x0,0x0,0x10078,0x10078,0x10078,0x78,0x10078,0x0,0x0,0x0,0x10078,0x10078,0x10078,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10078,0x0,0x0,0x0,0x78,0x0,}; final private JJCalls[] jj_2_rtns = new JJCalls[24]; private boolean jj_rescan = false; --- 6608,6615 ---- private int jj_gen; final private int[] jj_la1 = new int[104]; ! final private int[] jj_la1_0 = {0x30540040,0x30540040,0x30540040,0x40,0x40040000,0x2000000,0x2000000,0x40000000,0x40040000,0x40000000,0x0,0x40000,0x2000000,0x30540000,0x1000000,0x30540000,0x0,0x0,0x2000000,0x2000000,0x2000000,0x0,0x0,0x30540000,0x2000000,0x2000000,0x30540000,0x0,0x2000000,0x2000000,0x40000000,0x0,0x4000000,0x0,0x2000000,0x2000000,0x0,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x30540000,0x30540000,0x30540040,0x0,0x30540000,0x0,0x30540000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x30000000,0xc0000000,0xc0000000,0x30540000,0x4440000,0x40000,0x4440000,0x30540000,0x30540000,0x30540000,0x0,0x540000,0x40040000,0x2000000,0x8000000,0x3c540000,0x30540000,0x30540000,0x8000000,0x2000000,0x2000000,0x2000000,0x2000000,0x2000000,0x0,0x0,0x0,0x40000,0x2000000,0x40000000,0x40000000,0x2000000,0x2000000,0x40000000,0x40000000,0x30540000,0x40000000,0x0,0x0,0x0,0x0,}; ! final private int[] jj_la1_1 = {0x20000010,0x20000010,0x20000010,0x0,0x1,0x0,0x0,0x1,0x1,0x1,0x100,0x0,0x0,0x20000010,0x0,0x20000010,0x100,0x7ff0000,0x0,0x0,0x0,0x0,0x0,0x20000010,0x0,0x0,0x20000010,0x0,0x0,0x0,0xf8000000,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000010,0x20000010,0x20000010,0x8000000,0x20000010,0x10000000,0x20000010,0xe000fe00,0xa000fe00,0x40000000,0x40,0x20,0x80,0x6,0x6,0x0,0x0,0x8,0x8,0x10,0x0,0x0,0x0,0x20000010,0x20000010,0x20000010,0x0,0x0,0x1,0x0,0x0,0x20000010,0x20000010,0x20000010,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x1,0x1,0xf8000010,0x1,0x0,0x0,0x0,0xf8000000,}; ! final private int[] jj_la1_2 = {0x3dfffb73,0x3dfffb73,0x3dfffb73,0x0,0x1800000,0x0,0x0,0x0,0x1800000,0x0,0x0,0x1800000,0x0,0x3dfffb73,0x0,0x3dfff801,0x0,0x0,0x0,0x0,0x0,0x800,0x8e000,0x3d800001,0x0,0x0,0x3d800001,0x30000,0x0,0x0,0x1ffffff,0x800000,0x0,0x800000,0x0,0x0,0x0,0x0,0x372,0x8,0x4,0x4,0x4,0x80,0x4,0x480,0x0,0x3d800001,0x3dfffb73,0x3dfff801,0x0,0x3d800001,0x0,0x3d800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3d800000,0x0,0x0,0x0,0x3d800001,0x3d800001,0x3d800001,0x0,0x3d800000,0x1800000,0x0,0x0,0x3d800001,0x3d800001,0x3d800001,0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x22,0x22,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3dffffff,0x0,0x3c000000,0x1800000,0x0,0x1ffffff,}; ! final private int[] jj_la1_3 = {0x200f0,0x200f0,0x200f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200f0,0x0,0x200f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200f0,0x0,0x0,0x200f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200f0,0x200f0,0x200f0,0x0,0x200f0,0x0,0x200f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200f0,0x0,0x0,0x0,0x200f0,0x200f0,0x200f0,0xf0,0x200f0,0x0,0x0,0x0,0x200f0,0x200f0,0x200f0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200f0,0x0,0x0,0x0,0xf0,0x0,}; final private JJCalls[] jj_2_rtns = new JJCalls[24]; private boolean jj_rescan = false; *************** *** 6757,6762 **** final public ParseException generateParseException() { jj_expentries.removeAllElements(); ! boolean[] la1tokens = new boolean[113]; ! for (int i = 0; i < 113; i++) { la1tokens[i] = false; } --- 6757,6762 ---- final public ParseException generateParseException() { jj_expentries.removeAllElements(); ! boolean[] la1tokens = new boolean[114]; ! for (int i = 0; i < 114; i++) { la1tokens[i] = false; } *************** *** 6783,6787 **** } } ! for (int i = 0; i < 113; i++) { if (la1tokens[i]) { jj_expentry = new int[1]; --- 6783,6787 ---- } } ! for (int i = 0; i < 114; i++) { if (la1tokens[i]) { jj_expentry = new int[1]; Index: PythonGrammarConstants.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/parser/PythonGrammarConstants.java,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -d -r2.6 -r2.7 *** PythonGrammarConstants.java 2001/04/25 18:56:18 2.6 --- PythonGrammarConstants.java 2001/10/30 20:37:33 2.7 *************** *** 14,100 **** int DEDENT = 14; int INDENT = 15; ! int SINGLE_LINE_COMMENT = 16; ! int LPAREN = 17; ! int RPAREN = 18; ! int LBRACE = 19; ! int RBRACE = 20; ! int LBRACKET = 21; ! int RBRACKET = 22; ! int SEMICOLON = 23; ! int COMMA = 24; ! int DOT = 25; ! int COLON = 26; ! int PLUS = 27; ! int MINUS = 28; ! int MULTIPLY = 29; ! int DIVIDE = 30; ! int POWER = 31; ! int LSHIFT = 32; ! int RSHIFT = 33; ! int MODULO = 34; ! int NOT = 35; ! int XOR = 36; ! int OR = 37; ! int AND = 38; ! int EQUAL = 39; ! int GREATER = 40; ! int LESS = 41; ! int EQEQUAL = 42; ! int EQLESS = 43; ! int EQGREATER = 44; ! int LESSGREATER = 45; ! int NOTEQUAL = 46; ! int PLUSEQ = 47; ! int MINUSEQ = 48; ! int MULTIPLYEQ = 49; ! int DIVIDEEQ = 50; ! int MODULOEQ = 51; ! int ANDEQ = 52; ! int OREQ = 53; ! int XOREQ = 54; ! int LSHIFTEQ = 55; ! int RSHIFTEQ = 56; ! int POWEREQ = 57; ! int OR_BOOL = 58; ! int AND_BOOL = 59; ! int NOT_BOOL = 60; ! int IS = 61; ! int IN = 62; ! int LAMBDA = 63; ! int IF = 64; ! int ELSE = 65; ! int ELIF = 66; ! int WHILE = 67; ! int FOR = 68; ! int TRY = 69; ! int EXCEPT = 70; ! int DEF = 71; ! int CLASS = 72; ! int FINALLY = 73; ! int PRINT = 74; ! int PASS = 75; ! int BREAK = 76; ! int CONTINUE = 77; ! int RETURN = 78; ! int IMPORT = 79; ! int FROM = 80; ! int DEL = 81; ! int RAISE = 82; ! int GLOBAL = 83; ! int EXEC = 84; ! int ASSERT = 85; ! int AS = 86; ! int NAME = 87; ! int LETTER = 88; ! int DECNUMBER = 89; ! int HEXNUMBER = 90; ! int OCTNUMBER = 91; ! int FLOAT = 92; ! int EXPONENT = 93; ! int DIGIT = 94; ! int SINGLE_STRING = 99; ! int SINGLE_STRING2 = 100; ! int TRIPLE_STRING = 101; ! int TRIPLE_STRING2 = 102; int DEFAULT = 0; --- 14,101 ---- int DEDENT = 14; int INDENT = 15; ! int TRAILING_COMMENT = 16; ! int SINGLE_LINE_COMMENT = 17; ! int LPAREN = 18; ! int RPAREN = 19; ! int LBRACE = 20; ! int RBRACE = 21; ! int LBRACKET = 22; ! int RBRACKET = 23; ! int SEMICOLON = 24; ! int COMMA = 25; ! int DOT = 26; ! int COLON = 27; ! int PLUS = 28; ! int MINUS = 29; ! int MULTIPLY = 30; ! int DIVIDE = 31; ! int POWER = 32; ! int LSHIFT = 33; ! int RSHIFT = 34; ! int MODULO = 35; ! int NOT = 36; ! int XOR = 37; ! int OR = 38; ! int AND = 39; ! int EQUAL = 40; ! int GREATER = 41; ! int LESS = 42; ! int EQEQUAL = 43; ! int EQLESS = 44; ! int EQGREATER = 45; ! int LESSGREATER = 46; ! int NOTEQUAL = 47; ! int PLUSEQ = 48; ! int MINUSEQ = 49; ! int MULTIPLYEQ = 50; ! int DIVIDEEQ = 51; ! int MODULOEQ = 52; ! int ANDEQ = 53; ! int OREQ = 54; ! int XOREQ = 55; ! int LSHIFTEQ = 56; ! int RSHIFTEQ = 57; ! int POWEREQ = 58; ! int OR_BOOL = 59; ! int AND_BOOL = 60; ! int NOT_BOOL = 61; ! int IS = 62; ! int IN = 63; ! int LAMBDA = 64; ! int IF = 65; ! int ELSE = 66; ! int ELIF = 67; ! int WHILE = 68; ! int FOR = 69; ! int TRY = 70; ! int EXCEPT = 71; ! int DEF = 72; ! int CLASS = 73; ! int FINALLY = 74; ! int PRINT = 75; ! int PASS = 76; ! int BREAK = 77; ! int CONTINUE = 78; ! int RETURN = 79; ! int IMPORT = 80; ! int FROM = 81; ! int DEL = 82; ! int RAISE = 83; ! int GLOBAL = 84; ! int EXEC = 85; ! int ASSERT = 86; ! int AS = 87; ! int NAME = 88; ! int LETTER = 89; ! int DECNUMBER = 90; ! int HEXNUMBER = 91; ! int OCTNUMBER = 92; ! int FLOAT = 93; ! int EXPONENT = 94; ! int DIGIT = 95; ! int SINGLE_STRING = 100; ! int SINGLE_STRING2 = 101; ! int TRIPLE_STRING = 102; ! int TRIPLE_STRING2 = 103; int DEFAULT = 0; *************** *** 127,130 **** --- 128,132 ---- "\"\"", "\"<INDENT>\"", + "<TRAILING_COMMENT>", "<SINGLE_LINE_COMMENT>", "\"(\"", *************** *** 206,213 **** "<EXPONENT>", "<DIGIT>", - "<token of kind 95>", "<token of kind 96>", "<token of kind 97>", "<token of kind 98>", "\"\\\'\"", "\"\\\"\"", --- 208,215 ---- "<EXPONENT>", "<DIGIT>", "<token of kind 96>", "<token of kind 97>", "<token of kind 98>", + "<token of kind 99>", "\"\\\'\"", "\"\\\"\"", *************** *** 215,226 **** "\"\\\"\\\"\\\"\"", "\"\\\\\\r\\n\"", - "<token of kind 104>", "<token of kind 105>", "<token of kind 106>", "\"\\r\\n\"", "\"\\n\"", "\"\\r\"", - "<token of kind 110>", "<token of kind 111>", "\"`\"", }; --- 217,228 ---- "\"\\\"\\\"\\\"\"", "\"\\\\\\r\\n\"", "<token of kind 105>", "<token of kind 106>", + "<token of kind 107>", "\"\\r\\n\"", "\"\\n\"", "\"\\r\"", "<token of kind 111>", + "<token of kind 112>", "\"`\"", }; Index: PythonGrammarTokenManager.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/parser/PythonGrammarTokenManager.java,v retrieving revision 2.12 retrieving revision 2.13 diff -C2 -d -r2.12 -r2.13 *** PythonGrammarTokenManager.java 2001/07/21 09:16:12 2.12 --- PythonGrammarTokenManager.java 2001/10/30 20:37:33 2.13 *************** *** 52,67 **** { case 0: ! if ((active1 & 0x4000000000L) != 0L) { ! jjmatchedKind = 110; return -1; } return -1; case 1: ! if ((active1 & 0x4000000000L) != 0L) [...2586 lines suppressed...] image = new StringBuffer(new String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)))); --- 2923,2927 ---- matchedToken.image = image.toString(); break; ! case 102 : if (image == null) image = new StringBuffer(new String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)))); *************** *** 2934,2938 **** matchedToken.image = image.toString(); break; ! case 102 : if (image == null) image = new StringBuffer(new String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)))); --- 2930,2934 ---- matchedToken.image = image.toString(); break; ! case 103 : if (image == null) image = new StringBuffer(new String(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)))); |