Changeset 4130
- Timestamp:
- Dec 20, 2009, 4:07:13 PM (11 years ago)
- Location:
- devel-tools/trunk/eclipse
- Files:
-
- 2 added
- 7 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/parser/AbstractParser.java
r4129 r4130 1 1 package org.refal.rfpdt.parser; 2 3 import java.io.Reader;4 2 5 3 import org.refal.rfpdt.compiler.MsgCode; 6 4 import org.refal.rfpdt.compiler.MsgHandler; 7 import org.refal.rfpdt.compiler.RfpResource;8 5 import org.refal.rfpdt.compiler.SrcPosition; 9 6 10 public abstract class RParser {11 final RfpScanner scanner;7 public abstract class AbstractParser { 8 final AbstractScanner scanner; 12 9 final MsgHandler msgHandler; 13 10 … … 17 14 SrcPosition prevTkPos; 18 15 19 RParser (RfpResource rfpResource, Reader reader, MsgHandler msgHandler) {20 this.scanner = new RfpScanner(rfpResource, reader, msgHandler);16 AbstractParser (AbstractScanner scanner, MsgHandler msgHandler) { 17 this.scanner = scanner; 21 18 this.msgHandler = msgHandler; 22 19 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/parser/Rf5Parser.java
r4129 r4130 66 66 import org.refal.rfpdt.compiler.SrcPosition; 67 67 68 public final class Rf5Parser extends RParser {68 public final class Rf5Parser extends AbstractParser { 69 69 /** May return <code>null</code>! */ 70 70 public static AstImplem parseProgram (String moduleName, Reader reader, MsgHandler msgHandler) { … … 82 82 83 83 private Rf5Parser (RfpResource rfpResource, Reader reader, MsgHandler msgHandler) { 84 super( rfpResource, reader, msgHandler);84 super(new Rf5Scanner(rfpResource, reader, msgHandler), msgHandler); 85 85 } 86 86 -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/parser/RfpCharacter.java
r3570 r4130 8 8 public static boolean isIdInternalChar (int c) { 9 9 return isAlphanum(c) || c == '.'; 10 } 11 12 public static boolean isLetter (int c) { 13 return ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z'); 14 } 15 16 public static boolean isRf5IdInternalChar (int c) { 17 return isLetter(c) || isDigit(c) || c == '_' || c == '-'; 10 18 } 11 19 -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/parser/RfpParser.java
r4129 r4130 117 117 import org.refal.rfpdt.compiler.SrcPosition; 118 118 119 public final class RfpParser extends RParser {119 public final class RfpParser extends AbstractParser { 120 120 /** May return <code>null</code>! */ 121 121 public static AstInterf parseInterf (String moduleName, Reader reader, MsgHandler msgHandler) { … … 146 146 147 147 private RfpParser (RfpResource rfpResource, Reader reader, MsgHandler msgHandler) { 148 super( rfpResource, reader, msgHandler);148 super(new RfpScanner(rfpResource, reader, msgHandler), msgHandler); 149 149 } 150 150 -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/parser/RfpScanner.java
r4128 r4130 37 37 import static org.refal.rfpdt.parser.TkTags.WORD; 38 38 39 import java.io.EOFException;40 39 import java.io.IOException; 41 import java.io.PushbackReader;42 40 import java.io.Reader; 43 import java.math.BigInteger;44 import java.util.TreeMap;45 41 46 42 import org.refal.rfpdt.ast.AstAlt.FailMode; … … 51 47 import org.refal.rfpdt.compiler.MsgHandler; 52 48 import org.refal.rfpdt.compiler.RfpResource; 53 import org.refal.rfpdt.compiler.SrcPosition; 54 55 public final class RfpScanner { 56 private final PushbackReader reader; 57 private final RfpResource rfpResource; 58 private final MsgHandler msgHandler; 59 60 public RfpScanner (RfpResource rfpResource, Reader reader, MsgHandler msgHandler) { 61 this.reader = new PushbackReader(reader); 62 this.rfpResource = rfpResource; 63 this.msgHandler = msgHandler; 64 chPosition = -1; 65 } 66 67 /* errors */ 68 69 private int ch; 70 private int chLineStart; 71 private int chLine; 72 private int chPosition; // Zero-based 73 private int tkLine; 74 private int tkLineStart; 75 private int tkCharStart; 76 private int tkCharEnd; 77 private int beginOfCharacetrs = -1; 78 79 /* Current token and values associated with it */ 80 81 public SrcPosition tkPos = null; 82 public long tk; 83 public int tkInt; 84 public char tkChar; 85 public String tkString; 86 public Enum<?> tkKind; 87 public BigInteger tkBigInteger; 88 89 private void resetToken () { 90 tk = 0; 91 tkInt = 0; 92 tkKind = null; 93 tkChar = 0; 94 tkString = null; 95 tkBigInteger = null; 96 } 97 98 private void scanError (int line, int lineStart, int charStart, int charEnd, MsgCode msgCode, Object... args) { 99 SrcPosition pos = new SrcPosition(rfpResource, line, lineStart, charStart, charEnd); 100 msgHandler.send(pos, msgCode, args); 101 } 102 103 private void getFirstChar () throws IOException { 104 chLineStart = 0; 105 chPosition = 0; 106 chLine = 1; 107 ch = reader.read(); 108 return; 109 } 110 111 private void nextCh () throws IOException { 112 if (ch == -1) 113 throw new EOFException(); 114 int prevCh = ch; 115 ch = reader.read(); 116 chPosition++; 117 if (ch == '\n' && prevCh == '\r') { 118 ch = reader.read(); 119 chPosition++; 120 } 121 if (prevCh == '\r' || prevCh == '\n') { 122 chLineStart = chPosition; 123 chLine++; 124 } 125 return; 126 } 127 128 private void prevCh (int c) throws IOException { 129 reader.unread(ch); 130 ch = c; 131 chPosition--; 132 } 133 134 /* keyword table */ 135 136 private static final class KwEntry { 137 final long kwToken; 138 final Enum<?> kwKind; 139 140 public KwEntry (long kwToken, Enum<?> kwKind) { 141 this.kwToken = kwToken; 142 this.kwKind = kwKind; 143 } 144 } 145 146 private static final TreeMap<String, KwEntry> keyword_table = new TreeMap<String, KwEntry>(); 147 148 private static void kw (String keyword, long kwToken, Enum<?> kwKind) { 149 keyword_table.put(keyword, new KwEntry(kwToken, kwKind)); 150 } 151 49 50 public final class RfpScanner extends AbstractScanner { 51 // init keyword table 152 52 static { 153 53 kw("box", OBJ_DECL, ObjKind.Box); … … 174 74 } 175 75 176 private static int cvFromHex (int i) { 177 if (i >= '0' && i <= '9') 178 return i - '0'; 179 if (i >= 'a' && i <= 'f') 180 return i - 'a' + 10; 181 if (i >= 'A' && i <= 'F') 182 return i - 'A' + 10; 183 return -1; 184 } 185 186 private int decodeChar () throws IOException { 187 int bspos = chPosition - 1; 188 switch (ch) { 189 case 'n': 190 return '\n'; 191 case 't': 192 return '\t'; 193 case 'b': 194 return '\b'; 195 case 'r': 196 return '\r'; 197 case 'f': 198 return '\f'; 199 case '\\': 200 case '\'': 201 case '\"': 202 return ch; 203 case 'x': 204 int hh, 205 hl; 206 nextCh(); 207 hh = cvFromHex(ch); 208 if (hh >= 0) { 209 nextCh(); 210 hl = cvFromHex(ch); 211 } else 212 hl = -1; 213 if (hl >= 0) 214 return (hh << 4) + hl; 215 scanError(chLine, chLineStart, bspos, chPosition + 1, MsgCode.InvalidEscapeSequence); 216 return '?'; 217 default: 218 scanError(chLine, chLineStart, bspos, chPosition + 1, MsgCode.InvalidEscapeSequence); 219 return ch; 220 } 221 } 222 223 private void skipSingleLineComment () throws IOException { 224 for (;;) { 225 if (ch == -1) 226 return; 227 if (ch == '\n' || ch == '\r') { 228 nextCh(); 229 return; 230 } else 231 nextCh(); 232 } 233 } 234 235 private void skipMultilineComment (int chLine, int chLineStart, int chStart) throws IOException { 236 for (;;) { 237 if (ch == -1) { 238 scanError(chLine, chLineStart, chStart, chPosition, MsgCode.UnexpectedEndOfComment); 239 return; 240 } else if (ch == '*') { 241 nextCh(); 242 if (ch == '/') { 243 nextCh(); 244 return; 245 } else { 246 continue; 76 public RfpScanner (RfpResource rfpResource, Reader reader, MsgHandler msgHandler) { 77 super(rfpResource, reader, msgHandler); 78 } 79 80 81 protected void nextTk () throws IOException { 82 read_token: for (;;) { 83 skipComm(); 84 initTkPosition(); 85 tkCharEnd++; 86 switch (ch) { 87 case -1: 88 tk = EOP; 89 tkCharEnd = tkCharStart; // No char after end of stream? 90 return; 91 case '(': 92 tk = LPAR; 93 nextCh(); 94 return; 95 case ')': 96 tk = RPAR; 97 nextCh(); 98 return; 99 case '<': 100 tk = LANGU; 101 nextCh(); 102 return; 103 case '>': 104 tk = RANGU; 105 nextCh(); 106 return; 107 case '}': 108 tk = RCURL; 109 nextCh(); 110 return; 111 case '{': 112 tkKind = FailMode.Error; 113 tk = LCURL; 114 nextCh(); 115 return; 116 case ';': 117 tk = SC; 118 nextCh(); 119 return; 120 case ',': 121 tk = COMMA; 122 nextCh(); 123 return; 124 case '=': 125 tk = EQL; 126 nextCh(); 127 return; 128 case '#': 129 tk = NOT; 130 nextCh(); 131 return; 132 case '&': 133 tk = REF; 134 nextCh(); 135 return; 136 case '-': 137 case '+': 138 tk = NUMB; 139 tkBigInteger = scanNumber(); 140 tkCharEnd = chPosition; 141 return; 142 case '\'': 143 if (beginOfCharacetrs == -1) 144 beginOfCharacetrs = chPosition; 145 nextCh(); 146 tkLine = chLine; 147 tkLineStart = chLineStart; 148 tkCharStart = chPosition; 149 if (ch == -1) { 150 scanError(chLine, chLineStart, beginOfCharacetrs, chPosition, MsgCode.UnexpectedEndOfCharacters); 151 tk = EOP; 152 tkCharEnd = chPosition; 153 beginOfCharacetrs = -1; 154 return; 155 } 156 if (ch == '\n' || ch == '\r') { 157 scanError(chLine, chLineStart, beginOfCharacetrs, chPosition, MsgCode.UnexpectedEndOfCharacters); 158 nextCh(); 159 beginOfCharacetrs = -1; 160 continue read_token; 161 } 162 if (ch == '\'') { 163 nextCh(); 164 beginOfCharacetrs = -1; 165 continue read_token; 166 } 167 if (ch == '\\') { 168 nextCh(); 169 if (ch == '\n' || ch == '\r') { 170 scanError(chLine, chLineStart, tkCharStart, chPosition, MsgCode.UnexpectedEndOfCharacters); 171 nextCh(); 172 continue read_token; 173 } 174 ch = decodeChar(); 175 } 176 tkChar = (char) ch; 177 tk = CHAR; 178 ch = '\''; 179 tkCharEnd = chPosition; 180 return; 181 case 's': 182 case 't': 183 case 'e': 184 case 'v': 185 tkChar = (char) ch; 186 nextCh(); 187 if (ch == '.') 188 nextCh(); 189 tkString = scanVarIndex(); 190 tk = VAR; 191 tkCharEnd = chPosition; 192 return; 193 case '\"': 194 tk = WORD; 195 tkString = scanWord(); 196 tkCharEnd = chPosition; 197 return; 198 case '$': { 199 nextCh(); 200 String key = scanKeyword(); 201 tkCharEnd = chPosition; 202 KwEntry kwInfo = keyword_table.get(key); 203 if (kwInfo == null) { 204 scanError(tkLine, tkLineStart, tkCharStart, tkCharEnd, MsgCode.InvalidKeyword); 205 continue read_token; 206 } 207 tk = kwInfo.kwToken; 208 tkKind = kwInfo.kwKind; 209 return; 247 210 } 248 } else { 249 nextCh(); 250 continue; 211 case ':': 212 nextCh(); 213 if (ch == ':') { 214 nextCh(); 215 tk = LET; 216 tkCharEnd = chPosition; 217 return; 218 } 219 tkCharEnd = chPosition; 220 lookAheadForCurL(); 221 return; 222 case '\\': 223 nextCh(); 224 switch (ch) { 225 case '{': 226 tkKind = FailMode.Fail; 227 tk = LCURL; 228 nextCh(); 229 tkCharEnd = chPosition; 230 return; 231 case '?': 232 tk = FENCE; 233 nextCh(); 234 tkCharEnd = chPosition; 235 return; 236 case '!': 237 tk = CUT; 238 nextCh(); 239 tkCharEnd = chPosition; 240 return; 241 default: 242 nextCh(); 243 tkCharEnd = chPosition; 244 // TODO: change message 245 scanError(tkLine, tkLineStart, tkCharStart, tkCharEnd, MsgCode.InvalidCharacterAfterBS); 246 continue read_token; 247 } 248 default: 249 // Other cases with more sophisticated predicates 250 if (RfpCharacter.isDigit(ch)) { 251 tk = NUMB; 252 tkBigInteger = scanNumber(); 253 tkCharEnd = chPosition; 254 return; 255 } 256 if (RfpCharacter.isIdStartChar(ch)) { 257 tk = WORD; 258 tkString = scanIdentifier(); 259 tkCharEnd = chPosition; 260 return; 261 } 262 nextCh(); 263 tkCharEnd = chPosition; 264 scanError(tkLine, tkLineStart, tkCharStart, tkCharEnd, MsgCode.InvalidCharacter); 265 continue read_token; 251 266 } 252 267 } … … 278 293 } 279 294 280 private void scanNumber () throws IOException {281 tk = NUMB;282 StringBuffer sb = new StringBuffer();283 int radix = 10;284 if (ch == '+') {285 nextCh();286 } else if (ch == '-') {287 sb.append('-');288 nextCh();289 } else if (ch == '0') {290 nextCh();291 if (ch == 'x') {292 radix = 16;293 nextCh();294 } else {295 prevCh('0');296 }297 }298 if (radix == 10) {299 if (!RfpCharacter.isDigit(ch)) {300 scanError(tkLine, tkLineStart, tkCharStart, chPosition, MsgCode.InvalidNumber);301 sb.append('0');302 } else {303 do {304 sb.append((char) ch);305 nextCh();306 } while (RfpCharacter.isDigit(ch));307 }308 } else { // radix == 16309 if (!RfpCharacter.isHexDigit(ch)) {310 scanError(tkLine, tkLineStart, tkCharStart, chPosition, MsgCode.InvalidHexLiteralNumber);311 sb.append('0');312 } else {313 do {314 sb.append((char) ch);315 nextCh();316 } while (RfpCharacter.isHexDigit(ch));317 }318 }319 if (RfpCharacter.isAlphanum(ch)) {320 scanError(tkLine, tkLineStart, tkCharStart, chPosition,321 MsgCode.NumberImmediatelyFollowedByIdentifierOrVariable); // TODO: change message322 }323 tkBigInteger = new BigInteger(sb.toString(), radix);324 return;325 }326 327 private String scanVarIndex () throws IOException {328 StringBuilder sb = new StringBuilder();329 while (RfpCharacter.isAlphanum(ch)) {330 sb.append((char) ch);331 nextCh();332 }333 return sb.toString();334 }335 336 private String scanIdentifier () throws IOException {337 assert RfpCharacter.isIdStartChar(ch);338 StringBuilder sb = new StringBuilder();339 sb.append((char) ch);340 nextCh();341 while (RfpCharacter.isIdInternalChar(ch)) {342 sb.append((char) ch);343 nextCh();344 }345 return sb.toString();346 }347 348 private String scanWord () throws IOException {349 assert ch == '\"';350 StringBuilder sb = new StringBuilder();351 for (;;) {352 nextCh();353 if (ch == -1) {354 scanError(chLine, chLineStart, tkCharStart, chPosition, MsgCode.UnexpectedEndOfWord);355 break;356 } else if (ch == '\n' || ch == '\r') {357 scanError(chLine, chLineStart, tkCharStart, chPosition, MsgCode.UnexpectedEndOfWord);358 break;359 } else if (ch == '\"') {360 nextCh();361 break;362 } else if (ch == '\\') {363 nextCh();364 if (ch == '\n' || ch == '\r') {365 scanError(chLine, chLineStart, tkCharStart, chPosition, MsgCode.UnexpectedEndOfWord);366 nextCh();367 break;368 }369 sb.append((char) decodeChar());370 } else {371 sb.append((char) ch);372 }373 }374 return sb.toString();375 }376 377 private String scanKeyword () throws IOException {378 StringBuilder sb = new StringBuilder();379 while (RfpCharacter.isAlphanum(ch) || ch == '?') {380 sb.append((char) ch);381 nextCh();382 }383 return sb.toString();384 }385 386 private void initTkPosition () {387 tkLine = chLine;388 tkLineStart = chLineStart;389 tkCharStart = chPosition;390 tkCharEnd = tkCharStart;391 }392 393 public void getNextToken () {394 resetToken();395 try {396 if (chPosition == -1)397 getFirstChar();398 nextTk();399 } catch (IOException e) {400 scanError(chLine, chLineStart, tkCharStart, chPosition, MsgCode.IOExceptionThrown, e.getMessage());401 initTkPosition();402 tk = EOP;403 }404 tkPos = new SrcPosition(rfpResource, tkLine, tkLineStart, tkCharStart, tkCharEnd);405 }406 407 private void nextTk () throws IOException {408 read_token: for (;;) {409 skipComm();410 initTkPosition();411 tkCharEnd++;412 switch (ch) {413 case -1:414 tk = EOP;415 tkCharEnd = tkCharStart; // No char after end of stream?416 return;417 case '(':418 nextCh();419 tk = LPAR;420 return;421 case ')':422 nextCh();423 tk = RPAR;424 return;425 case '<':426 nextCh();427 tk = LANGU;428 return;429 case '>':430 nextCh();431 tk = RANGU;432 return;433 case '}':434 nextCh();435 tk = RCURL;436 return;437 case '{':438 tkKind = FailMode.Error;439 tk = LCURL;440 nextCh();441 return;442 case ';':443 nextCh();444 tk = SC;445 return;446 case ',':447 nextCh();448 tk = COMMA;449 return;450 case '=':451 nextCh();452 tk = EQL;453 return;454 case '#':455 nextCh();456 tk = NOT;457 return;458 case '&':459 nextCh();460 tk = REF;461 return;462 case '-':463 case '+':464 scanNumber();465 tkCharEnd = chPosition;466 return;467 case '\'':468 if (beginOfCharacetrs == -1)469 beginOfCharacetrs = chPosition;470 nextCh();471 tkLine = chLine;472 tkLineStart = chLineStart;473 tkCharStart = chPosition;474 if (ch == -1) {475 scanError(chLine, chLineStart, beginOfCharacetrs, chPosition, MsgCode.UnexpectedEndOfCharacters);476 tk = EOP;477 tkCharEnd = chPosition;478 beginOfCharacetrs = -1;479 return;480 }481 if (ch == '\n' || ch == '\r') {482 scanError(chLine, chLineStart, beginOfCharacetrs, chPosition, MsgCode.UnexpectedEndOfCharacters);483 nextCh();484 beginOfCharacetrs = -1;485 continue read_token;486 }487 if (ch == '\'') {488 nextCh();489 beginOfCharacetrs = -1;490 continue read_token;491 }492 if (ch == '\\') {493 nextCh();494 if (ch == '\n' || ch == '\r') {495 scanError(chLine, chLineStart, tkCharStart, chPosition, MsgCode.UnexpectedEndOfCharacters);496 nextCh();497 continue read_token;498 }499 ch = decodeChar();500 }501 tkChar = (char) ch;502 tk = CHAR;503 ch = '\'';504 tkCharEnd = chPosition;505 return;506 case 's':507 case 't':508 case 'e':509 case 'v':510 tkChar = (char) ch;511 nextCh();512 if (ch == '.')513 nextCh();514 tkString = scanVarIndex();515 tk = VAR;516 tkCharEnd = chPosition;517 return;518 case '\"':519 tk = WORD;520 tkString = scanWord();521 tkCharEnd = chPosition;522 return;523 case '$': {524 nextCh();525 String key = scanKeyword();526 tkCharEnd = chPosition;527 KwEntry kwInfo = keyword_table.get(key);528 if (kwInfo == null) {529 scanError(tkLine, tkLineStart, tkCharStart, tkCharEnd, MsgCode.InvalidKeyword);530 continue read_token;531 }532 tk = kwInfo.kwToken;533 tkKind = kwInfo.kwKind;534 return;535 }536 case ':':537 nextCh();538 if (ch == ':') {539 nextCh();540 tk = LET;541 tkCharEnd = chPosition;542 return;543 }544 tkCharEnd = chPosition;545 lookAheadForCurL();546 return;547 case '\\':548 nextCh();549 switch (ch) {550 case '{':551 tkKind = FailMode.Fail;552 tk = LCURL;553 nextCh();554 tkCharEnd = chPosition;555 return;556 case '?':557 tk = FENCE;558 nextCh();559 tkCharEnd = chPosition;560 return;561 case '!':562 tk = CUT;563 nextCh();564 tkCharEnd = chPosition;565 return;566 default:567 nextCh();568 tkCharEnd = chPosition;569 // TODO: change message570 scanError(tkLine, tkLineStart, tkCharStart, tkCharEnd, MsgCode.InvalidCharacterAfterBS);571 continue read_token;572 }573 default:574 // Other cases with more sophisticated predicates575 if (RfpCharacter.isDigit(ch)) {576 scanNumber();577 tkCharEnd = chPosition;578 return;579 }580 if (RfpCharacter.isIdStartChar(ch)) {581 tk = WORD;582 tkString = scanIdentifier();583 tkCharEnd = chPosition;584 return;585 }586 nextCh();587 tkCharEnd = chPosition;588 scanError(tkLine, tkLineStart, tkCharStart, tkCharEnd, MsgCode.InvalidCharacter);589 continue read_token;590 }591 }592 }593 594 295 private void lookAheadForCurL () throws IOException { 595 296 skipComm(); … … 609 310 } 610 311 } 611 } 312 313 private String scanVarIndex () throws IOException { 314 StringBuilder sb = new StringBuilder(); 315 while (RfpCharacter.isAlphanum(ch)) { 316 sb.append((char) ch); 317 nextCh(); 318 } 319 return sb.toString(); 320 } 321 322 private String scanIdentifier () throws IOException { 323 assert RfpCharacter.isIdStartChar(ch); 324 StringBuilder sb = new StringBuilder(); 325 sb.append((char) ch); 326 nextCh(); 327 while (RfpCharacter.isIdInternalChar(ch)) { 328 sb.append((char) ch); 329 nextCh(); 330 } 331 return sb.toString(); 332 }} -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/parser/TkTags.java
r4129 r4130 9 9 public final class TkTags { 10 10 public static final long CHAR = (1L << 0); 11 public static final long CHARS = (1L << 0); 11 12 public static final long COL = (1L << 1); 12 13 public static final long COL_CURL = (1L << 2); … … 46 47 public static final long EXTERNAL = (1L << 36); // For Refal 5 47 48 48 private static final HashMap<Long, String> tkImages = new HashMap<Long, String>( );49 private static final HashMap<Long, String> tkImages = new HashMap<Long, String>(64); 49 50 50 51 private static void tk (long tk, String image) { -
devel-tools/trunk/eclipse/org.refal.rfpdt.test/src/org/refal/rfpdt/test/comp/Token.java
r3566 r4130 13 13 import org.refal.rfpdt.ast.AstPattern.MatchDir; 14 14 import org.refal.rfpdt.compiler.SrcPosition; 15 import org.refal.rfpdt.parser.Tk Images;15 import org.refal.rfpdt.parser.TkTags; 16 16 17 17 public final class Token { … … 99 99 @Override 100 100 public String toString() { 101 return Tk Images.getTkImage(tk);101 return TkTags.getTkImage(tk); 102 102 } 103 103 -
devel-tools/trunk/eclipse/org.refal.rfpdt.test/src/org/refal/rfpdt/test/comp/Util.java
r3566 r4130 57 57 for (;;) { 58 58 scanner.getNextToken(); 59 Token t = new Token(scanner.tkPos, scanner.tk, scanner.tkInt,59 Token t = new Token(scanner.tkPos, scanner.tk, 0, 60 60 scanner.tkKind, scanner.tkChar, scanner.tkString, 61 61 scanner.tkBigInteger);
Note: See TracChangeset
for help on using the changeset viewer.