Changeset 5c3283 in git for Singular


Ignore:
Timestamp:
Jul 26, 2005, 7:09:57 PM (19 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd735977bc4c759f0ed30bd5cdc57a5b212075497')
Children:
0cbc03bb27f9fe962c2afb4faaaa825bdb7bed7c
Parents:
111cfec78a96d9c4422cb1db65444db1eac6191a
Message:
*hannes: MWERKS


git-svn-id: file:///usr/local/Singular/svn/trunk@8455 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/libparse.cc

    r111cfe r5c3283  
    2020
    2121/* Scanner skeleton version:
    22  * $Header: /exports/cvsroot-2/cvsroot/Singular/libparse.cc,v 1.6 2005-05-23 08:46:17 Singular Exp $
     22 * $Header: /exports/cvsroot-2/cvsroot/Singular/libparse.cc,v 1.7 2005-07-26 17:09:57 Singular Exp $
    2323 */
    2424
     
    10031003*  Computer Algebra System SINGULAR     *
    10041004****************************************/
    1005 /* $Id: libparse.cc,v 1.6 2005-05-23 08:46:17 Singular Exp $ */
     1005/* $Id: libparse.cc,v 1.7 2005-07-26 17:09:57 Singular Exp $ */
    10061006#include <stdio.h>
    10071007#include <string.h>
     
    10771077};
    10781078int yylp_errno = 0;
    1079 
    1080 #ifdef __MWERKS__
    1081 #ifdef __cplusplus
    1082 extern "C" {
    1083 #endif
    1084 long   ftell(FILE *fp);
    1085 #ifdef macintosh
    1086 int    fileno(FILE *stream);
    1087 FILE   *fdopen(int filedes, char *type);
    1088 int    isatty(int filedes);
    1089 #else
    1090 int    _fileno(FILE *stream);
    1091 FILE   *_fdopen(int filedes, char *type);
    1092 int    _isatty(int filedes);
    1093 #define fileno  _fileno
    1094 #define fdopen  _fdopen
    1095 #define isatty  _isatty
    1096 #endif /* macintosh */
    1097 #ifdef __cplusplus
    1098 }
    1099 #endif
    1100 #endif
    11011079
    11021080#ifdef STANDALONE_PARSER
     
    13921370        register int yy_act;
    13931371
    1394 #line 258 "libparse.l"
     1372#line 236 "libparse.l"
    13951373
    13961374
     
    14851463case 1:
    14861464YY_RULE_SETUP
    1487 #line 259 "libparse.l"
     1465#line 237 "libparse.l"
    14881466{ }
    14891467        YY_BREAK
    14901468case 2:
    14911469YY_RULE_SETUP
    1492 #line 260 "libparse.l"
     1470#line 238 "libparse.l"
    14931471{ old_state = YYSTATE; BEGIN(comment); }
    14941472        YY_BREAK
    14951473case 3:
    14961474YY_RULE_SETUP
    1497 #line 262 "libparse.l"
     1475#line 240 "libparse.l"
    14981476{
    14991477         yyless(4); old_state = YYSTATE; BEGIN(info);
     
    15021480case 4:
    15031481YY_RULE_SETUP
    1504 #line 265 "libparse.l"
     1482#line 243 "libparse.l"
    15051483{
    15061484         yyless(8); old_state = YYSTATE; BEGIN(category);
     
    15091487case 5:
    15101488YY_RULE_SETUP
    1511 #line 268 "libparse.l"
     1489#line 246 "libparse.l"
    15121490{
    15131491             found_version++;
     
    15461524case 6:
    15471525YY_RULE_SETUP
    1548 #line 302 "libparse.l"
     1526#line 280 "libparse.l"
    15491527{ p_static=TRUE; }
    15501528        YY_BREAK
    15511529case 7:
    15521530YY_RULE_SETUP
    1553 #line 304 "libparse.l"
     1531#line 282 "libparse.l"
    15541532{
    15551533             char proc[256];
     
    16281606case 8:
    16291607YY_RULE_SETUP
    1630 #line 377 "libparse.l"
     1608#line 355 "libparse.l"
    16311609{
    16321610             BEGIN(pexample);
     
    16431621case 9:
    16441622YY_RULE_SETUP
    1645 #line 389 "libparse.l"
     1623#line 367 "libparse.l"
    16461624{ quote++;
    16471625             BEGIN(libcmd);
     
    16501628case 10:
    16511629YY_RULE_SETUP
    1652 #line 393 "libparse.l"
     1630#line 371 "libparse.l"
    16531631{ quote++; brace2++;
    16541632             BEGIN(libcmd2);
     
    16571635case 11:
    16581636YY_RULE_SETUP
    1659 #line 397 "libparse.l"
     1637#line 375 "libparse.l"
    16601638{
    16611639             make_version(yytext, 0);
     
    16671645case 12:
    16681646YY_RULE_SETUP
    1669 #line 403 "libparse.l"
     1647#line 381 "libparse.l"
    16701648{
    16711649             #if YYLPDEBUG
     
    16761654case 13:
    16771655YY_RULE_SETUP
    1678 #line 408 "libparse.l"
     1656#line 386 "libparse.l"
    16791657{
    16801658             #if YYLPDEBUG > 1
     
    16851663case 14:
    16861664YY_RULE_SETUP
    1687 #line 413 "libparse.l"
     1665#line 391 "libparse.l"
    16881666{ yyless(0);
    16891667             BEGIN(INITIAL);
     
    16931671case 15:
    16941672YY_RULE_SETUP
    1695 #line 417 "libparse.l"
     1673#line 395 "libparse.l"
    16961674{
    16971675             yyless(0);
     
    17031681case 16:
    17041682YY_RULE_SETUP
    1705 #line 424 "libparse.l"
     1683#line 402 "libparse.l"
    17061684{ quote++;
    17071685             BEGIN(libcmd);
     
    17101688case 17:
    17111689YY_RULE_SETUP
    1712 #line 427 "libparse.l"
     1690#line 405 "libparse.l"
    17131691{ quote++; brace2++;
    17141692             BEGIN(libcmd2);
     
    17171695case 18:
    17181696YY_RULE_SETUP
    1719 #line 430 "libparse.l"
     1697#line 408 "libparse.l"
    17201698{ yylplineno++; }
    17211699        YY_BREAK
    17221700case 19:
    17231701YY_RULE_SETUP
    1724 #line 431 "libparse.l"
     1702#line 409 "libparse.l"
    17251703{
    17261704             #if YYLPDEBUG > 1
     
    17331711case 20:
    17341712YY_RULE_SETUP
    1735 #line 438 "libparse.l"
     1713#line 416 "libparse.l"
    17361714{
    17371715             #if YYLPDEBUG > 1
     
    17421720case 21:
    17431721YY_RULE_SETUP
    1744 #line 443 "libparse.l"
     1722#line 421 "libparse.l"
    17451723{
    17461724             #if YYLPDEBUG > 1
     
    17521730case 22:
    17531731YY_RULE_SETUP
    1754 #line 449 "libparse.l"
     1732#line 427 "libparse.l"
    17551733{
    17561734             yyless(0);
     
    17621740case 23:
    17631741YY_RULE_SETUP
    1764 #line 455 "libparse.l"
     1742#line 433 "libparse.l"
    17651743{
    17661744             yyless(0);
     
    17721750case 24:
    17731751YY_RULE_SETUP
    1774 #line 461 "libparse.l"
     1752#line 439 "libparse.l"
    17751753{ quote++;
    17761754             BEGIN(libcmd);
     
    17791757case 25:
    17801758YY_RULE_SETUP
    1781 #line 464 "libparse.l"
     1759#line 442 "libparse.l"
    17821760{ quote++; brace2++;
    17831761             BEGIN(libcmd2);
     
    17861764case 26:
    17871765YY_RULE_SETUP
    1788 #line 468 "libparse.l"
     1766#line 446 "libparse.l"
    17891767{ yylplineno++; }
    17901768        YY_BREAK
    17911769case 27:
    17921770YY_RULE_SETUP
    1793 #line 469 "libparse.l"
     1771#line 447 "libparse.l"
    17941772{
    17951773             #if YYLPDEBUG
     
    18001778case 28:
    18011779YY_RULE_SETUP
    1802 #line 474 "libparse.l"
     1780#line 452 "libparse.l"
    18031781{
    18041782             found_oldhelp=1;
     
    18101788case 29:
    18111789YY_RULE_SETUP
    1812 #line 482 "libparse.l"
     1790#line 460 "libparse.l"
    18131791{ quote--;
    18141792             yytext[yyleng-1] = '\0';
     
    18271805case 30:
    18281806YY_RULE_SETUP
    1829 #line 495 "libparse.l"
     1807#line 473 "libparse.l"
    18301808{ quote--; brace2--;
    18311809             yytext[yyleng-1] = '\0';
     
    18441822case 31:
    18451823YY_RULE_SETUP
    1846 #line 509 "libparse.l"
     1824#line 487 "libparse.l"
    18471825{ }
    18481826        YY_BREAK
    18491827case 32:
    18501828YY_RULE_SETUP
    1851 #line 510 "libparse.l"
     1829#line 488 "libparse.l"
    18521830{
    18531831             brace2++;
     
    18591837case 33:
    18601838YY_RULE_SETUP
    1861 #line 516 "libparse.l"
     1839#line 494 "libparse.l"
    18621840{
    18631841             brace2--;
     
    18781856case 34:
    18791857YY_RULE_SETUP
    1880 #line 531 "libparse.l"
     1858#line 509 "libparse.l"
    18811859{
    18821860             if(brace2>0)
     
    19001878case 35:
    19011879YY_RULE_SETUP
    1902 #line 549 "libparse.l"
     1880#line 527 "libparse.l"
    19031881{ yylplineno++;
    19041882              if(brace2<=0)
     
    19131891case 36:
    19141892YY_RULE_SETUP
    1915 #line 558 "libparse.l"
     1893#line 536 "libparse.l"
    19161894{ }
    19171895        YY_BREAK
    19181896case 37:
    19191897YY_RULE_SETUP
    1920 #line 559 "libparse.l"
     1898#line 537 "libparse.l"
    19211899{ old_state = YYSTATE; BEGIN(comment); }
    19221900        YY_BREAK
    19231901case 38:
    19241902YY_RULE_SETUP
    1925 #line 560 "libparse.l"
     1903#line 538 "libparse.l"
    19261904{
    19271905             if(brace2<=0)
     
    19341912case 39:
    19351913YY_RULE_SETUP
    1936 #line 568 "libparse.l"
     1914#line 546 "libparse.l"
    19371915{
    19381916              #if YYLPDEBUG
     
    19511929case 40:
    19521930YY_RULE_SETUP
    1953 #line 581 "libparse.l"
     1931#line 559 "libparse.l"
    19541932{
    19551933              #if YYLPDEBUG
     
    19621940case 41:
    19631941YY_RULE_SETUP
    1964 #line 588 "libparse.l"
     1942#line 566 "libparse.l"
    19651943{
    19661944              if(check && yyleng>2)
     
    19801958case 42:
    19811959YY_RULE_SETUP
    1982 #line 602 "libparse.l"
     1960#line 580 "libparse.l"
    19831961{ printf("[%s]", yytext); }
    19841962        YY_BREAK
    19851963case 43:
    19861964YY_RULE_SETUP
    1987 #line 604 "libparse.l"
     1965#line 582 "libparse.l"
    19881966{ }
    19891967        YY_BREAK
    19901968case 44:
    19911969YY_RULE_SETUP
    1992 #line 605 "libparse.l"
     1970#line 583 "libparse.l"
    19931971{
    19941972                SET_HELP_END(mode, pi, current_pos(0));
     
    20121990case 45:
    20131991YY_RULE_SETUP
    2014 #line 623 "libparse.l"
     1992#line 601 "libparse.l"
    20151993{ yylplineno++; }
    20161994        YY_BREAK
    20171995case 46:
    20181996YY_RULE_SETUP
    2019 #line 624 "libparse.l"
     1997#line 602 "libparse.l"
    20201998{ }
    20211999        YY_BREAK
    20222000case 47:
    20232001YY_RULE_SETUP
    2024 #line 626 "libparse.l"
     2002#line 604 "libparse.l"
    20252003{
    20262004             old_state = YYSTATE;
     
    20312009case 48:
    20322010YY_RULE_SETUP
    2033 #line 631 "libparse.l"
     2011#line 609 "libparse.l"
    20342012{}
    20352013        YY_BREAK
    20362014case 49:
    20372015YY_RULE_SETUP
    2038 #line 632 "libparse.l"
     2016#line 610 "libparse.l"
    20392017{
    20402018             brace1++; BEGIN(pbody);
     
    20572035case 50:
    20582036YY_RULE_SETUP
    2059 #line 649 "libparse.l"
     2037#line 627 "libparse.l"
    20602038{ yylplineno++;}
    20612039        YY_BREAK
    20622040case 51:
    20632041YY_RULE_SETUP
    2064 #line 651 "libparse.l"
     2042#line 629 "libparse.l"
    20652043{ }
    20662044        YY_BREAK
    20672045case 52:
    20682046YY_RULE_SETUP
    2069 #line 652 "libparse.l"
     2047#line 630 "libparse.l"
    20702048{ quote++; old_state = YYSTATE;
    20712049                 BEGIN(string); /* printf("%s", yytext); */
     
    20742052case 53:
    20752053YY_RULE_SETUP
    2076 #line 656 "libparse.l"
     2054#line 634 "libparse.l"
    20772055{
    20782056             if(check) printf("*** found 2 proc whithin procedure '%s'.\n",
     
    20832061case 54:
    20842062YY_RULE_SETUP
    2085 #line 661 "libparse.l"
     2063#line 639 "libparse.l"
    20862064{
    20872065             if(check) printf("*** found 1 proc whithin procedure '%s'.\n",
     
    20922070case 55:
    20932071YY_RULE_SETUP
    2094 #line 666 "libparse.l"
     2072#line 644 "libparse.l"
    20952073{
    20962074                 brace1++;
     
    21022080case 56:
    21032081YY_RULE_SETUP
    2104 #line 672 "libparse.l"
     2082#line 650 "libparse.l"
    21052083{
    21062084                           #if YYLPDEBUG > 1
     
    21322110case 57:
    21332111YY_RULE_SETUP
    2134 #line 698 "libparse.l"
     2112#line 676 "libparse.l"
    21352113{
    21362114                           brace2++; /* printf("%s", yytext); */
     
    21392117case 58:
    21402118YY_RULE_SETUP
    2141 #line 701 "libparse.l"
     2119#line 679 "libparse.l"
    21422120{
    21432121                           brace2--; /* printf("%s", yytext); */
     
    21502128case 59:
    21512129YY_RULE_SETUP
    2152 #line 708 "libparse.l"
     2130#line 686 "libparse.l"
    21532131{
    21542132                           brace3++; /* printf("%s", yytext); */
     
    21572135case 60:
    21582136YY_RULE_SETUP
    2159 #line 711 "libparse.l"
     2137#line 689 "libparse.l"
    21602138{
    21612139                           brace3--; /* printf("%s", yytext); */
     
    21682146case 61:
    21692147YY_RULE_SETUP
    2170 #line 718 "libparse.l"
     2148#line 696 "libparse.l"
    21712149{ yylplineno++; }
    21722150        YY_BREAK
    21732151case 62:
    21742152YY_RULE_SETUP
    2175 #line 719 "libparse.l"
     2153#line 697 "libparse.l"
    21762154{ }
    21772155        YY_BREAK
    21782156case 63:
    21792157YY_RULE_SETUP
    2180 #line 721 "libparse.l"
     2158#line 699 "libparse.l"
    21812159{
    21822160             quote++; BEGIN(string);
     
    21892167case 64:
    21902168YY_RULE_SETUP
    2191 #line 728 "libparse.l"
     2169#line 706 "libparse.l"
    21922170{ yylplineno++; }
    21932171        YY_BREAK
    21942172case 65:
    21952173YY_RULE_SETUP
    2196 #line 729 "libparse.l"
     2174#line 707 "libparse.l"
    21972175{ }
    21982176        YY_BREAK
    21992177case 66:
    22002178YY_RULE_SETUP
    2201 #line 731 "libparse.l"
     2179#line 709 "libparse.l"
    22022180{
    22032181             quote++; BEGIN(string);
     
    22102188case 67:
    22112189YY_RULE_SETUP
    2212 #line 738 "libparse.l"
     2190#line 716 "libparse.l"
    22132191{ yylplineno++; }
    22142192        YY_BREAK
    22152193case 68:
    22162194YY_RULE_SETUP
    2217 #line 739 "libparse.l"
     2195#line 717 "libparse.l"
    22182196{ }
    22192197        YY_BREAK
    22202198case 69:
    22212199YY_RULE_SETUP
    2222 #line 741 "libparse.l"
     2200#line 719 "libparse.l"
    22232201{ quote--;
    22242202                           copy_string(mode);
     
    22332211case 70:
    22342212YY_RULE_SETUP
    2235 #line 750 "libparse.l"
     2213#line 728 "libparse.l"
    22362214{ if (old_state == phelp) IncrCheckSum(*yytext);}
    22372215        YY_BREAK
    22382216case 71:
    22392217YY_RULE_SETUP
    2240 #line 751 "libparse.l"
     2218#line 729 "libparse.l"
    22412219{ yylplineno++; if (old_state == phelp) IncrCheckSum('\n');}
    22422220        YY_BREAK
    22432221case 72:
    22442222YY_RULE_SETUP
    2245 #line 752 "libparse.l"
     2223#line 730 "libparse.l"
    22462224{ if (old_state == phelp) IncrCheckSum(*yytext);}
    22472225        YY_BREAK
    22482226case 73:
    22492227YY_RULE_SETUP
    2250 #line 754 "libparse.l"
     2228#line 732 "libparse.l"
    22512229{ }
    22522230        YY_BREAK
    22532231case 74:
    22542232YY_RULE_SETUP
    2255 #line 755 "libparse.l"
     2233#line 733 "libparse.l"
    22562234{ quote++; old_state = YYSTATE;
    22572235                           BEGIN(string); /* printf("%s", yytext); */
     
    22602238case 75:
    22612239YY_RULE_SETUP
    2262 #line 758 "libparse.l"
     2240#line 736 "libparse.l"
    22632241{
    22642242                           brace1++; /* printf("(%d)%s", brace1, yytext); */
     
    22672245case 76:
    22682246YY_RULE_SETUP
    2269 #line 761 "libparse.l"
     2247#line 739 "libparse.l"
    22702248{
    22712249                           brace1--; /* printf("(%d)%s", brace1, yytext); */
     
    22802258case 77:
    22812259YY_RULE_SETUP
    2282 #line 770 "libparse.l"
     2260#line 748 "libparse.l"
    22832261{
    22842262                           brace2++; /* printf("%s", yytext); */
     
    22872265case 78:
    22882266YY_RULE_SETUP
    2289 #line 773 "libparse.l"
     2267#line 751 "libparse.l"
    22902268{
    22912269                           brace2--; /* printf("%s", yytext); */
     
    22942272case 79:
    22952273YY_RULE_SETUP
    2296 #line 776 "libparse.l"
     2274#line 754 "libparse.l"
    22972275{
    22982276                           brace3++; /* printf("%s", yytext); */
     
    23012279case 80:
    23022280YY_RULE_SETUP
    2303 #line 779 "libparse.l"
     2281#line 757 "libparse.l"
    23042282{
    23052283                           brace3--; /* printf("%s", yytext); */
     
    23082286case 81:
    23092287YY_RULE_SETUP
    2310 #line 782 "libparse.l"
     2288#line 760 "libparse.l"
    23112289{ yylplineno++; }
    23122290        YY_BREAK
    23132291case 82:
    23142292YY_RULE_SETUP
    2315 #line 783 "libparse.l"
     2293#line 761 "libparse.l"
    23162294{ }
    23172295        YY_BREAK
    23182296case 83:
    23192297YY_RULE_SETUP
    2320 #line 785 "libparse.l"
     2298#line 763 "libparse.l"
    23212299{ quote--;
    23222300                           BEGIN(pexample); /* printf("%s", yytext); */
     
    23252303case 84:
    23262304YY_RULE_SETUP
    2327 #line 788 "libparse.l"
     2305#line 766 "libparse.l"
    23282306{ }
    23292307        YY_BREAK
    23302308case 85:
    23312309YY_RULE_SETUP
    2332 #line 789 "libparse.l"
     2310#line 767 "libparse.l"
    23332311{ }
    23342312        YY_BREAK
    23352313case 86:
    23362314YY_RULE_SETUP
    2337 #line 790 "libparse.l"
     2315#line 768 "libparse.l"
    23382316{ yylplineno++; }
    23392317        YY_BREAK
    23402318case 87:
    23412319YY_RULE_SETUP
    2342 #line 791 "libparse.l"
     2320#line 769 "libparse.l"
    23432321{ }
    23442322        YY_BREAK
    23452323case 88:
    23462324YY_RULE_SETUP
    2347 #line 793 "libparse.l"
     2325#line 771 "libparse.l"
    23482326{ BEGIN(old_state); }
    23492327        YY_BREAK
    23502328case 89:
    23512329YY_RULE_SETUP
    2352 #line 794 "libparse.l"
     2330#line 772 "libparse.l"
    23532331{ yylplineno++; }
    23542332        YY_BREAK
    23552333case 90:
    23562334YY_RULE_SETUP
    2357 #line 795 "libparse.l"
     2335#line 773 "libparse.l"
    23582336{ }
    23592337        YY_BREAK
    23602338case 91:
    23612339YY_RULE_SETUP
    2362 #line 797 "libparse.l"
     2340#line 775 "libparse.l"
    23632341{ yylplineno++; }
    23642342        YY_BREAK
    23652343case 92:
    23662344YY_RULE_SETUP
    2367 #line 798 "libparse.l"
     2345#line 776 "libparse.l"
    23682346{ }
    23692347        YY_BREAK
    23702348case 93:
    23712349YY_RULE_SETUP
    2372 #line 799 "libparse.l"
     2350#line 777 "libparse.l"
    23732351{ p_static = FALSE;
    23742352                            #if YYLPDEBUG > 1
     
    23792357case 94:
    23802358YY_RULE_SETUP
    2381 #line 804 "libparse.l"
     2359#line 782 "libparse.l"
    23822360{ p_static = FALSE;
    23832361                           yylp_errno = YYLP_BAD_CHAR;
     
    23972375case 95:
    23982376YY_RULE_SETUP
    2399 #line 819 "libparse.l"
     2377#line 797 "libparse.l"
    24002378ECHO;
    24012379        YY_BREAK
     
    33043282        }
    33053283#endif
    3306 #line 819 "libparse.l"
     3284#line 797 "libparse.l"
    33073285
    33083286
Note: See TracChangeset for help on using the changeset viewer.