001// lexical analyzer for GSQLParser component java version 002 003/****************************************************} 004{ Lexical analizer for GSQLParser component java version } 005{ Copyright (c) 2004-2013 by Gudu software } 006{****************************************************/ 007 008package gudusoft.gsqlparser; 009 010import java.util.HashMap; 011import java.io.InputStreamReader; 012 013import java.util.Locale; 014import java.io.BufferedReader; 015import java.io.IOException; 016 017 018 019public class TLexerInformix extends TCustomLexer{ 020 021 static int yynmarks = 0 ; 022 static int yynmatches ; 023 static int yyntrans ; 024 static int yynstates ; 025 static int[] yyk,yym ; // 1 based 026 static int[] yytint; // 1 based 027 static TYytRec[] yyt ; // 1 based 028 static int[] yykl,yykh,yyml,yymh,yytl,yyth ; // 0 based 029 private static String[] keywordlist; 030 static String table_file; 031 static HashMap<String, Integer> keywordValueList; 032 static HashMap<Integer, Integer> keywordTypeList; 033 static int[][] yystateTable; 034 035 static { 036 keywordValueList = new HashMap<String, Integer>(); 037 keywordTypeList = new HashMap<Integer, Integer>(); 038 table_file = "/gudusoft/gsqlparser/parser/informix/informix_lex_table.txt"; 039 if (TBaseType.enterprise_edition||TBaseType.informix_edition){ 040 inittable(); 041 } 042 } 043 044 public TLexerInformix(){ 045 super(); 046 dbvendor = EDbVendor.dbvinformix; 047 sourcetokens = new TSourceTokenList(); 048 } 049 050 051 public TSourceTokenList sourcetokens; 052 053 054public boolean canBeColumnName(int tokencode){ 055 //http://blog.csdn.net/superbeck/article/details/5387476 056 boolean ret = false; 057 int modifiers = keyword_type_identifier | keyword_type_column ; 058 Integer s = keywordTypeList.get(tokencode); 059 if (s != null){ 060 int modifier = s; 061 ret = (modifiers & modifier) == modifier; 062 } 063 064 return ret; 065} 066 067 public int iskeyword(String str){ 068 int ret = -1; 069 Integer s = keywordValueList.get(str.toUpperCase(Locale.ENGLISH)); 070 if( s != null){ 071 ret = s; 072 } 073 return ret;// -1 means not a keyword 074 } 075 076 public int getkeywordvalue(String keyword){ 077 int ret = 0; 078 Integer s = keywordValueList.get(keyword.toUpperCase(Locale.ENGLISH)); 079 if( s != null){ 080 ret = s; 081 } 082 return ret;// 0 means not a keyword 083 } 084 085 public static EKeywordType getKeywordType(String keyword){ 086 return TCustomLexer.getKeywordType(keyword,keywordValueList,keywordTypeList); 087 } 088 089 int issystemvariable(String str){ 090 return -1;// -1 means not a system variable 091 } 092 093 static void yystateLookupConfigure() { 094 int yystates = yytl.length; 095 yystateTable = new int[257][yystates]; 096 097 // initialize to empty 098 for(int i = 0; i < yystates; i++) { 099 for (int j = 0; j < 257; j++) 100 yystateTable[j][i] = -1; 101 } 102 103 for(int i = 0; i < yystates; i++) { 104 int low = yytl[i]; 105 int high = yyth[i]; 106 for (int j = low; j <= high; j++) { 107 for (char c: yyt[j].cc) { 108 yystateTable[c][i] = j; 109 } 110 } 111 } 112 } 113 114 int yylex(){ 115 int yyn; 116 while (true) { // top level while 117 yynew(); 118 while (true){ //scan 119 for(yyn = yykl[yystate]; yyn <= yykh[yystate]; yyn++){ 120 yymark(yyk[yyn]); 121 } 122 123 for(yyn=yymh[yystate]; yyn>= yyml[yystate]; yyn--){ 124 yymatch(yym[yyn]); 125 } 126 127 if(yytl[yystate] > yyth[yystate]){ 128 break; 129 } 130 131 yyscan(); 132// yyn = yytl[yystate]; 133 totablechar(); 134// while( (yyn <= yyth[yystate]) && (!(charinarray(yytablechar,yyt[yyn].cc))) ){ 135// yyn++; 136// } 137// if (yyn > yyth[yystate]){ 138// break; 139// } 140 141 yyn = yystateTable[yytablechar][yystate]; 142 if (yyn == -1) 143 break; 144 145 yystate = yyt[yyn].s; 146 } //scan 147 148 while (true){ //action 149 int yyrule; 150 if ( (yyrule = yyfind()) != -1 ){ 151 yyaction(yyrule); 152 if (yyreject){ 153 continue; 154 } 155 }else if( (!yydefault() ) && (yywrap()) ){ 156 yyclear(); 157 returni(0); 158 } 159 break; 160 } 161 162 if (!yydone) { 163 continue; 164 } 165 break; 166 } // top level while 167 168 return yyretval; 169 } 170 171 static void inittable(){ 172 173 //if (yynmarks > 0) return; //init table already 174 175 String line; 176 boolean inyyk=false,inyym=false,inyykl=false,inyykh=false,inyyml=false,inyymh=false,inyytl=false,inyyth=false,inyytint=false,inyyt=false,inkeyword=false; 177 int yyk_count=0,yym_count=0,yykl_count=0,yykh_count=0,yyml_count=0,yymh_count=0,yytl_count=0,yyth_count=0,yytint_count=0,yyt_count=0; 178 int c=0; 179 keywordValueList.clear(); 180 keywordTypeList.clear(); 181 182 BufferedReader br = new BufferedReader(new InputStreamReader(TLexerInformix.class.getResourceAsStream(table_file))); 183 184 try{ 185 while( (line = br.readLine()) != null){ 186 if (line.trim().startsWith("yynmarks=")){ 187 String[] ss = line.split("[=;]"); 188 yynmarks=Integer.parseInt(ss[1].trim()); 189 yyk = new int[yynmarks+1]; 190 }else if (line.trim().startsWith("yynmatches=")){ 191 String[] ss = line.split("[=;]"); 192 yynmatches=Integer.parseInt(ss[1].trim()); 193 yym = new int[yynmatches+1]; 194 }else if (line.trim().startsWith("yyntrans=")){ 195 String[] ss = line.split("[=;]"); 196 yyntrans=Integer.parseInt(ss[1].trim()); 197 yytint = new int[yyntrans+1]; 198 yyt = new TYytRec[yyntrans+1]; 199 }else if (line.trim().startsWith("yynstates=")){ 200 String[] ss = line.split("[=;]"); 201 yynstates=Integer.parseInt(ss[1].trim()); 202 yykl = new int[yynstates]; 203 yykh = new int[yynstates]; 204 yyml = new int[yynstates]; 205 yymh = new int[yynstates]; 206 yytl = new int[yynstates]; 207 yyth = new int[yynstates]; 208 }else if (line.trim().startsWith("<end>")){ 209 if (inyyk){ 210 inyyk = false; 211 if (yynmarks+1 != yyk_count ){ 212 System.out.println("required1:"+(yynmarks)+" actually:"+(yyk_count-1)); 213 } 214 } 215 else if(inyym){ 216 inyym = false; 217 if (yynmatches+1 != yym_count ){ 218 System.out.println("required2:"+(yynmatches)+" actually:"+(yym_count-1)); 219 } 220 } 221 else if(inyykl){ 222 inyykl = false; 223 if (yynstates != yykl_count ){ 224 System.out.println("required3:"+(yynstates)+" actually:"+(yykl_count)); 225 } 226 } 227 else if(inyykh){ 228 inyykh = false; 229 if (yynstates != yykh_count ){ 230 System.out.println("required4:"+(yynstates)+" actually:"+(yykh_count)); 231 } 232 } 233 else if(inyyml){ 234 inyyml = false; 235 if (yynstates != yyml_count ){ 236 System.out.println("required5:"+(yynstates)+" actually:"+(yyml_count)); 237 } 238 } 239 else if(inyymh){ 240 inyymh = false; 241 if (yynstates != yymh_count ){ 242 System.out.println("required:"+(yynstates)+" actually:"+(yymh_count)); 243 } 244 } 245 else if(inyytl){ 246 inyytl = false; 247 if (yynstates != yytl_count ){ 248 System.out.println("required6:"+(yynstates)+" actually:"+(yytl_count)); 249 } 250 } 251 else if(inyyth){ 252 inyyth = false; 253 if (yynstates != yyth_count ){ 254 System.out.println("required7:"+(yynstates)+" actually:"+(yyth_count)); 255 } 256 } 257 else if(inyytint){ 258 inyytint = false; 259 if (yyntrans + 1 != yytint_count ){ 260 System.out.println("required8:"+(yyntrans)+" actually:"+(yytint_count-1)); 261 } 262 } 263 else if(inyyt){ 264 inyyt = false; 265 if (yyntrans+1 != yyt_count ){ 266 System.out.println("required9:"+(yyntrans)+" actually:"+(yyt_count-1)); 267 } 268 } 269 else if(inkeyword){ 270 inkeyword = false; 271 } 272 }else if(line.trim().startsWith("yyk =")){ 273 inyyk = true; 274 }else if(line.trim().startsWith("yym =")){ 275 inyym = true; 276 }else if(line.trim().startsWith("yykl =")){ 277 inyykl = true; 278 }else if(line.trim().startsWith("yykh =")){ 279 inyykh = true; 280 }else if(line.trim().startsWith("yyml =")){ 281 inyyml = true; 282 }else if(line.trim().startsWith("yymh =")){ 283 inyymh = true; 284 }else if(line.trim().startsWith("yytl =")){ 285 inyytl = true; 286 }else if(line.trim().startsWith("yyth =")){ 287 inyyth = true; 288 }else if(line.trim().startsWith("yytint =")){ 289 inyytint = true; 290 }else if(line.trim().startsWith("yyt =")){ 291 inyyt = true; 292 }else if(line.trim().startsWith("keywordsvalue =")){ 293 inkeyword = true; 294 }else if(inyyk){ 295 String[] ss = line.split("[,]"); 296 for(int j=0;j<ss.length;j++){ 297 // System.out.println(ss[j].trim()); 298 yyk[yyk_count++] = Integer.parseInt(ss[j].trim()); 299 } 300 }else if(inyym){ 301 String[] ss = line.split("[,]"); 302 for(int j=0;j<ss.length;j++){ 303 // System.out.println(ss[j].trim()); 304 yym[yym_count++] = Integer.parseInt(ss[j].trim()); 305 } 306 }else if(inyykl){ 307 String[] ss = line.split("[,]"); 308 for(int j=0;j<ss.length;j++){ 309 // System.out.println(ss[j].trim()); 310 yykl[yykl_count++] = Integer.parseInt(ss[j].trim()); 311 } 312 }else if(inyykh){ 313 String[] ss = line.split("[,]"); 314 for(int j=0;j<ss.length;j++){ 315 // System.out.println(ss[j].trim()); 316 yykh[yykh_count++] = Integer.parseInt(ss[j].trim()); 317 } 318 }else if(inyyml){ 319 String[] ss = line.split("[,]"); 320 for(int j=0;j<ss.length;j++){ 321 // System.out.println(ss[j].trim()); 322 yyml[yyml_count++] = Integer.parseInt(ss[j].trim()); 323 } 324 }else if(inyymh){ 325 String[] ss = line.split("[,]"); 326 for(int j=0;j<ss.length;j++){ 327 // System.out.println(ss[j].trim()); 328 yymh[yymh_count++] = Integer.parseInt(ss[j].trim()); 329 } 330 }else if(inyytl){ 331 String[] ss = line.split("[,]"); 332 for(int j=0;j<ss.length;j++){ 333 // System.out.println(ss[j].trim()); 334 yytl[yytl_count++] = Integer.parseInt(ss[j].trim()); 335 } 336 }else if(inyyth){ 337 String[] ss = line.split("[,]"); 338 for(int j=0;j<ss.length;j++){ 339 // System.out.println(ss[j].trim()); 340 yyth[yyth_count++] = Integer.parseInt(ss[j].trim()); 341 } 342 }else if(inyytint){ 343 String[] ss = line.split("[,]"); 344 for(int j=0;j<ss.length;j++){ 345 // System.out.println(ss[j].trim()); 346 yytint[yytint_count++] = Integer.parseInt(ss[j].trim()); 347 } 348 }else if(inyyt){ 349 //System.out.println(line.trim()); 350 351 c = 0; 352 String[] st = line.trim().split(",,"); 353 char[] tmp = new char[st.length]; 354 for(int i=0;i<st.length;i++){ 355 356 if(st[i].startsWith("\'")) { 357 if(st[i].length() == 3){ // 'a' 358 tmp[c++] = st[i].charAt(1); 359 }else if(st[i].length() == 4) { // '\\' 360 tmp[c++] = st[i].charAt(2); 361 }else{ 362 System.out.println(" read yytstr error, error string is "+st[i]+ "line: "+ yyt_count); 363 } 364 }else{ 365 try{ 366 tmp[c++] = (char)Integer.parseInt(st[i]); // char in number like 32 that represent space 367 } catch (NumberFormatException nfe) { 368 System.out.println("NumberFormatException: " + nfe.getMessage()); 369 } 370 } 371 } //while hasmoreTokens 372 373 //yyt[lineno] = new YYTrec(tmp,yytint[lineno]); 374 yyt[yyt_count] = new TYytRec(tmp,yytint[yyt_count]); 375 yyt_count++; 376 377 }else if(inkeyword){ 378 String[] ss =line.split("[=]"); 379 380 int val1 = -1; 381 int val2 = -1; 382 try { 383 val1 = Integer.parseInt(ss[1]); 384 val2 = Integer.parseInt(ss[2]); 385 } 386 catch (NumberFormatException nfe) { 387 System.out.println("NumberFormatException: " + nfe.getMessage()); 388 } 389 keywordValueList.put(ss[0].toUpperCase(),val1); 390 keywordTypeList.put(val1,val2); 391 } 392 } 393 }catch(IOException e){ 394 System.out.println(e.toString()); 395 } 396 397 yystateLookupConfigure(); 398 399 } 400 401 402 403 void yyaction(int yyruleno){ 404 405 406 407 int ic; 408 char[] tmparray = {'=','+','-','*','/','>','<'}; 409 410 yylvalstr = getyytext(); 411 /* actions: */ 412 switch(yyruleno){ 413 case 1: 414 415 { 416 addlit(yylvalstr,yytextlen); 417 if (xcdepth <= 0) 418 { 419 start(init); 420 yylvalstr = litbufdup(); 421 returni(cmtslashstar); 422 } 423 else 424 xcdepth--; 425 426 break; 427 } 428 429 430 case 2: 431 432 { 433 xcdepth++; 434 yyless(2); 435 addlit(yylvalstr,yytextlen); 436 break; 437 } 438 439 case 3: 440 441 { 442 443 if (getyysstate() == xq) 444 { 445 nchars = yytextlen; 446 addlit(yylvalstr, yytextlen-1); 447 yyless(nchars-1); 448 return;//exit; 449 } 450 451 xcdepth = 0; 452 start(xc); 453 startlit(); 454 yyless(2); 455 addlit(yylvalstr,yytextlen); 456 457 break; 458 } 459 460 case 4: 461 462 { 463 addlit(yylvalstr,yytextlen); 464 break; 465 } 466 467 case 5: 468 469 { 470 addlitchar(yylvalstr.charAt(0)); 471 break; 472 } 473 474 case 6: 475 476 { 477 start(init); 478 addlit(yylvalstr, yytextlen); 479 yylvalstr = litbufdup(); 480 returni(sconst); 481 break; 482 } 483 484 case 7: 485 486 { 487 addlit(yylvalstr, yytextlen); 488 break; 489 } 490 491 case 8: 492 493 { 494 if (getyysstate() == xq) 495 { 496 nchars = yytextlen; 497 addlit(yylvalstr, yytextlen-1); 498 yyless(nchars-1); 499 return;//exit; 500 } 501 502 start(xq); 503 startlit(); 504 addlit(yylvalstr,yytextlen); 505 break; 506 } 507 508 case 9: 509 510 { 511 if (yysstate == xd) 512 { 513 addlit(yylvalstr, yytextlen); 514 } 515 else 516 { 517 start(xq); 518 startlit(); 519 addlit(yylvalstr, yytextlen); 520 } 521 522 break; 523 } 524 525 case 10: 526 527 { 528 addlit(yylvalstr, yytextlen); 529 break; 530 } 531 532 case 11: 533 534 { 535 dummych1 = get_char(); 536 unget_char(dummych1); 537 if (dummych1 == (char)10) 538 { 539 dummych1 = get_char(); 540 addlit(yylvalstr+dummych1, yytextlen+1); 541 } 542 else 543 addlit(yylvalstr, yytextlen); 544 545 break; 546 } 547 548 549 case 12: 550 551 { 552 start(init); 553 addlit(yylvalstr, yytextlen); 554 if (literallen == 0) returni (error); 555 if (literallen >= namedatalen) 556 { 557 setlengthofliteralbuf(namedatalen); 558 literallen = namedatalen; 559 } 560 yylvalstr = litbufdup(); 561 returni (ident); 562 563 break; 564 } 565 566 case 13: 567 568 { 569 addlit(yylvalstr, yytextlen); 570 break; 571 } 572 573 case 14: 574 575 { 576 start(xd); 577 startlit(); 578 addlit(yylvalstr, yytextlen); 579 break; 580 } 581 582 case 15: 583 584 { 585 dummych1 = get_char(); 586 unget_char(dummych1); 587 if (dummych1 == (char)10) 588 { 589 dummych1 = get_char(); 590 addlit(yylvalstr+dummych1, yytextlen+1); 591 } else 592 addlit(yylvalstr, yytextlen); 593 594 break; 595 } 596 597 598 case 16: 599 600 { 601 returni(lexnewline); 602 break; 603 } 604 605 case 17: 606 607 { 608 returni(lexspace); 609 break; 610 } 611 612 case 18: 613 614 { 615 if ((getyysstate() == xq) 616 || (getyysstate() == xd) 617 || (getyysstate() == xc) 618 ) 619 { 620 addlit(yylvalstr, 1); 621 yyless(1); 622 return;//exit; 623 } 624 625 returni(cmtdoublehyphen); 626 break; 627 } 628 629 case 19: 630 631 { 632 returni(castoperator); 633 break; 634 } 635 636 637 case 20: 638 639 { 640 returnc(yylvalstr.charAt(0)); 641 break; 642 } 643 644 case 21: 645 646 { 647 returni(cmpop); 648 break; 649 } 650 651 case 22: 652 653 { 654 655 if (getyysstate() == xc) 656 { 657 slashstar = yylvalstr.indexOf("*/"); 658 if (slashstar >= 0) 659 { 660 addlit(yylvalstr,slashstar+2); 661 yylvalstr = litbufdup(); 662 yyless(slashstar+2); 663 664 if (xcdepth <= 0){ 665 start(init); 666 returni(cmtslashstar); 667 }else{ 668 xcdepth--; 669 } 670 } 671 else 672 { 673 addlit(yylvalstr,1); 674 yyless(1); 675 } 676 } 677 else 678 { 679 nchars = yytextlen; 680 slashstar = yylvalstr.indexOf("/*"); 681 dashdash = yylvalstr.indexOf("--"); 682 if ((slashstar >= 0) && (dashdash >= 0)) 683 { 684 //if both appear, take the first one 685 if (slashstar > dashdash) 686 {slashstar = dashdash;} 687 } 688 else 689 { 690 // if slashstar=0 then slashstar := dashdash; 691 // add (getyysstate <> xc) to avoid something like this */--,here */ should be handled instead of -- 692 if ((slashstar > 0) && (getyysstate() != xc)) { 693 nchars = slashstar; 694 } 695 } 696 697 while ((nchars > 1) 698 && ( (yylvalstr.charAt(nchars-1) == '+' ) 699 || (yylvalstr.charAt(nchars-1) =='-')) 700 && (getyysstate() != xc)) 701 { 702 for (ic = nchars - 1; ic>=1; ic--) 703 { 704 if (isopchar(yylvalstr.charAt(ic-1))) break; 705 } 706 if (ic >= 1) break; 707 nchars--; 708 } 709 710 if (nchars < yytextlen) 711 { 712 //Strip the unwanted chars from the token 713 yyless(nchars); 714 yylvalstr = yylvalstr.substring(0,nchars); 715 } 716 717 ///* 718 // * If what we have left is only one char, and it's 719 // * one of the characters matching "self", then 720 // * return it as a character token the same way 721 // * that the "self" rule would have. 722 // * make sure @ return as self char, by james wang 723 // */ 724 if ((nchars == 1) && (isselfchar(yylvalstr.charAt(0)) || (yylvalstr.charAt(0) == '@'))) 725 { 726 returnc(yylvalstr.charAt(0)); 727 } 728 else if ( (nchars >= 2) && (yylvalstr.charAt(nchars-1-1) == '.') ) 729 { 730 yyless(1); 731 returnc(yylvalstr.charAt(0)); 732 } 733 else if ( 734 (nchars >= 2) 735 &&( 736 charinarray(yylvalstr.charAt(nchars-1-1), tmparray) 737 && (yylvalstr.charAt(nchars-1) == ':') 738 ) 739 ) 740 { 741 yyless(nchars-1); 742 yylvalstr = yylvalstr.substring(0,nchars-1); 743 if (nchars == 2) 744 returnc(yylvalstr.charAt(0)); 745 else 746 returni(op); 747 } 748 else if ( 749 (nchars >= 2) 750 && ( 751 charinarray(yylvalstr.charAt(nchars-1-1),tmparray) 752 && (yylvalstr.charAt(nchars-1) == '.') 753 ) 754 ) 755 { 756 yyless(nchars-1); 757 yylvalstr = yylvalstr.substring(0,nchars-1); 758 if (nchars == 2) 759 returnc(yylvalstr.charAt(0)); 760 else 761 returni(op); 762 } 763 else if ( (nchars >= 2) && (yylvalstr.charAt(nchars-1) == '@') ) 764 { 765 if (nchars == 2) 766 { // such as >@ 767 yyless(nchars-1); 768 yylvalstr = yylvalstr.substring(0,nchars-1); 769 returnc(yylvalstr.charAt(0)); 770 } 771 else 772 { 773 if (yylvalstr.charAt(nchars-1-1) == '@') 774 { //such as >@@,>=@@ 775 yyless(nchars-2); 776 yylvalstr = yylvalstr.substring(0,nchars-2); 777 if (nchars == 3) 778 returnc(yylvalstr.charAt(0)); 779 else 780 returni(cmpop); 781 } 782 else 783 { // >=@ 784 yyless(nchars-1); 785 yylvalstr = yylvalstr.substring(0,nchars-1); 786 returni(cmpop); 787 } 788 } 789 } 790 else if ( (nchars >= 2) && (yylvalstr.charAt(0)== '|') && (yylvalstr.charAt(1) == '|')) 791 { //||--sss ,just get || only 792 yyless(2); 793 yylvalstr = yylvalstr.substring(0,2); 794 returni(concatenationop); //return as concatenationop, this is used in sybase only 795 } 796 else if ((nchars >= 2) && ((yylvalstr.charAt(0) =='.') && ( (yylvalstr.charAt(1)=='*') || (yylvalstr.charAt(1) =='#')) )) 797 { 798 yyless(1); 799 returnc(yylvalstr.charAt(0)); 800 } 801 else if ((nchars == 2) && ((yylvalstr.charAt(0) == '=') && ( (yylvalstr.charAt(1) == '#')) )) 802 { 803 yyless(1); 804 returnc(yylvalstr.charAt(0)); 805 } 806 else if ((nchars == 2) && ((yylvalstr.charAt(0) == '=') && ( (yylvalstr.charAt(1) == '?')) )) 807 { 808 yyless(1); 809 returnc(yylvalstr.charAt(0)); 810 } 811 else if (((nchars > 2) && (yylvalstr.charAt(0) == '*')) 812 && (yylvalstr.charAt(1) == '/') 813 && (getyysstate() == xc) 814 ) 815 { //in comment, and find */ , then it must the end of comment 816 yyless(2); 817 addlit(yylvalstr,yytextlen); 818 if (xcdepth <= 0) 819 { 820 start(init); 821 yylvalstr = litbufdup(); 822 returni(cmtslashstar); 823 } 824 else 825 xcdepth--; 826 } 827 else 828 returni(op); 829 } 830 831 break; 832 } 833 834 case 23: 835 836 { 837 returni(iconst); 838 break; 839 } 840 841 case 24: 842 843 { 844 ///* for i in 1..5 loop, we can't recognize 1. as a decimal,but 1 as decimal 845 nchars = yytextlen; 846 if (yylvalstr.charAt(nchars-1) == '.') 847 { 848 dummych1 = get_char(); 849 unget_char(dummych1); 850 if (dummych1 == '.') 851 { 852 yyless(nchars-1); 853 yylvalstr = yylvalstr.substring(0,nchars - 1); 854 returni (iconst); 855 return;//exit; 856 } 857 } 858 returni (fconst); 859 break; 860 } 861 862 case 25: 863 864 { 865 returni (fconst); 866 break; 867 } 868 869 case 26: 870 871 { 872 int rw; 873 if ( (rw = iskeyword(yylvalstr)) != -1) { returni(rw);} 874 else 875 returni(ident); 876 break; 877 } 878 879 880 case 27: 881 882 { 883 returni( error); 884 break; 885 } 886 default:{ 887 System.out.println("fatal error in yyaction"); 888 } 889 }//switch 890}/*yyaction*/; 891 892 893 894 }