Changeset d40d574 in git for Singular/libparse.l


Ignore:
Timestamp:
Dec 8, 1999, 5:58:34 PM (24 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c5facdfddea2addfd91babd8b9019161dea4b695')
Children:
4e4ece733801c7cfccc5608ce3ba27e782c16e93
Parents:
f4ecbe471974f4c2e100c437640bcde5f9b87b26
Message:
*hannes: LIB-proc will be global


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

Legend:

Unmodified
Added
Removed
  • Singular/libparse.l

    rf4ecbe4 rd40d574  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 /* $Id: libparse.l,v 1.36 1999-11-15 17:20:18 obachman Exp $ */
     5/* $Id: libparse.l,v 1.37 1999-12-08 16:58:34 Singular Exp $ */
    66#include <stdio.h>
    77#include <string.h>
     
    99#include <ctype.h>
    1010#ifdef STANDALONE_PARSER
    11 include "utils.h"
    12 include "getopt.h"
    13 define HAVE_LIBPARSER
    14 define YYLPDEBUG 1
     11  #include "utils.h"
     12  #include "getopt.h"
     13  #define HAVE_LIBPARSER
     14  #define YYLPDEBUG 1
    1515#else
    16 include "mod2.h"
    17 include "subexpr.h"
    18 include "grammar.h"
    19 include "ipshell.h"
    20 include "ipid.h"
    21 include "tok.h"
    22 include "febase.h"
    23 include "mmemory.h"
     16  #include "mod2.h"
     17  #include "subexpr.h"
     18  #include "grammar.h"
     19  #include "ipshell.h"
     20  #include "ipid.h"
     21  #include "tok.h"
     22  #include "febase.h"
     23  #include "mmemory.h"
    2424#endif
    2525#include "libparse.h"
    2626
    2727#ifdef HAVE_LIBPARSER
    28 #  define YY_SKIP_YYWRAP
     28#define YY_SKIP_YYWRAP
    2929
    3030typedef enum { LP_NONE, LP_INFO, LP_VERSION} lib_cmds;
     
    8181int yylp_errno = 0;
    8282
    83 #  ifdef __MWERKS__
    84 #    ifdef __cplusplus
     83#ifdef __MWERKS__
     84#ifdef __cplusplus
    8585extern "C" {
    86 #    endif
     86#endif
    8787long   ftell(FILE *fp);
    88 #    ifdef macintosh
     88#ifdef macintosh
    8989int    fileno(FILE *stream);
    9090FILE   *fdopen(int filedes, char *type);
     
    9494FILE   *_fdopen(int filedes, char *type);
    9595int    _isatty(int filedes);
    96 #      define fileno  _fileno
    97 #      define fdopen  _fdopen
    98 #      define isatty  _isatty
    99 #    endif /* macintosh */
    100 #    ifdef __cplusplus
    101 }
    102 #    endif
    103 #  endif
    104 
    105 #  ifdef STANDALONE_PARSER
     96#define fileno  _fileno
     97#define fdopen  _fdopen
     98#define isatty  _isatty
     99#endif /* macintosh */
     100#ifdef __cplusplus
     101}
     102#endif
     103#endif
     104
     105#ifdef STANDALONE_PARSER
    106106procinfov pi;
    107107printpi(procinfov pi);
     
    112112void main_init(int argc, char *argv[]);
    113113void main_result(char *libname);
    114 #  else /* STANDALONE_PARSER */
     114#else /* STANDALONE_PARSER */
    115115idhdl h0;
    116 #    ifdef HAVE_NAMESPACES
     116#ifdef HAVE_NAMESPACES
    117117idhdl h_top;
    118118extern namehdl namespaceroot;
    119 #    endif /* HAVE_NAMESPACES */
    120 #    define pi IDPROC(h0)
     119#endif /* HAVE_NAMESPACES */
     120#define pi IDPROC(h0)
    121121extern "C"
    122122{
     
    124124}
    125125extern libstackv library_stack;
    126 #  endif /* STANDALONE_PARSER */
     126#endif /* STANDALONE_PARSER */
    127127
    128128static unsigned long help_chksum;
    129 #  define SET_DEF_END(mode, pi, p) \
    130      if ( mode == LOAD_LIB) pi->data.s.def_end = p;
    131 #  define SET_HELP_START(mode, pi, p) \
    132      if ( mode == LOAD_LIB) {pi->data.s.help_start = p; help_chksum = 0;}
    133 #  define SET_HELP_END(mode, pi, p) \
    134      if ( mode == LOAD_LIB) {pi->data.s.help_end = p;  \
    135                              pi->data.s.help_chksum = help_chksum;}
    136 
    137 #  define SET_BODY_START(mode, pi, l, p) \
    138      if ( mode == LOAD_LIB) { \
    139        pi->data.s.body_lineno = l; \
    140        pi->data.s.body_start = p; \
     129
     130#define SET_DEF_END(mode, pi, p) \
     131  if ( mode == LOAD_LIB) pi->data.s.def_end = p;
     132#define SET_HELP_START(mode, pi, p) \
     133  if ( mode == LOAD_LIB) {pi->data.s.help_start = p; help_chksum = 0;}
     134#define SET_HELP_END(mode, pi, p) \
     135  if ( mode == LOAD_LIB) {pi->data.s.help_end = p;  \
     136              pi->data.s.help_chksum = help_chksum;}
     137
     138#define SET_BODY_START(mode, pi, l, p) \
     139     if ( mode == LOAD_LIB)            \
     140     {                                 \
     141       pi->data.s.body_lineno = l;     \
     142       pi->data.s.body_start = p;      \
    141143     }
    142 #  define SET_BODY_END(mode, pi, p) \
    143      if ( mode == LOAD_LIB) { \
     144#define SET_BODY_END(mode, pi, p) \
     145     if ( mode == LOAD_LIB)       \
     146     {                            \
    144147       pi->data.s.body_end = p-1; \
    145148       pi->data.s.proc_end = p-1; \
    146149     }
    147150
    148 #  define SET_EXAMPLE_START(mode, pi, l, p) \
    149      if ( mode == LOAD_LIB) { \
    150        pi->data.s.example_lineno = l; \
    151        pi->data.s.example_start = p; \
    152      }
    153 #  define SET_PROC_END(mode, pi, p) \
    154      if ( mode == LOAD_LIB) { \
    155        pi->data.s.proc_end = p-1; \
    156        if(pi->data.s.body_end==0) pi->data.s.body_end = p-1; \
     151#define SET_EXAMPLE_START(mode, pi, l, p) \
     152   if ( mode == LOAD_LIB)                 \
     153   {                                      \
     154     pi->data.s.example_lineno = l;       \
     155     pi->data.s.example_start = p;        \
     156   }
     157#define SET_PROC_END(mode, pi, p)   \
     158     if ( mode == LOAD_LIB)         \
     159     {                              \
     160       pi->data.s.proc_end = p-1;   \
     161       if(pi->data.s.body_end==0)   \
     162         pi->data.s.body_end = p-1; \
    157163     }
    158164
    159165#define ROTATE_RIGHT(c) if ((c) & 01) (c) = ((c) >>1) + 0x8000; else (c) >>= 1;
    160166#define IncrCheckSum(c)                          \
    161 do                                              \
    162 {                                               \
     167do                                            \
     168{                                             \
    163169  ROTATE_RIGHT(help_chksum);                  \
    164170  help_chksum += c;                           \
    165171  help_chksum &= 0xffff;                      \
    166 }                                               \
     172}                                             \
    167173while(0)
    168174
    169 #  undef YY_DECL
    170 #  ifdef HAVE_NAMESPACES
    171 #    define YY_DECL int yylex(char *newlib, char *libfile, \
    172                                lib_style_types *lib_style, \
    173                                idhdl pl, BOOLEAN autoexport, lp_modes mode)
    174 #  else /* HAVE_NAMESPACES */
    175 #    define YY_DECL int yylex(char *newlib, char *libfile, \
    176                                  lib_style_types *lib_style, \
    177                                  lp_modes mode)
    178 #  endif /* HAVE_NAMESPACES */
    179 
    180 #  undef YY_INPUT
    181 #  define YY_INPUT(buf,result,max_size) \
     175#undef YY_DECL
     176#ifdef HAVE_NAMESPACES
     177#define YY_DECL int yylex(char *newlib, char *libfile, \
     178                           lib_style_types *lib_style, \
     179                           idhdl pl, BOOLEAN autoexport, lp_modes mode)
     180#else /* HAVE_NAMESPACES */
     181#define YY_DECL int yylex(char *newlib, char *libfile, \
     182                           lib_style_types *lib_style, \
     183                           lp_modes mode)
     184#endif /* HAVE_NAMESPACES */
     185
     186#undef YY_INPUT
     187#define YY_INPUT(buf,result,max_size) \
    182188          if ( ((result = libread( (yyin), (char *) buf, max_size )) < 0 ) \
    183189                  && ferror( yyin ) ) \
    184190                YY_FATAL_ERROR( "read in flex scanner failed" );
    185191
    186 #  define YY_USER_INIT { \
     192#define YY_USER_INIT { \
    187193       BEGIN(header); \
    188194       yylplineno = 1; \
     
    192198     }
    193199
    194 #  if 0
     200#if 0
    195201<pbody>proc[ \t]+{name}  {
    196202                           printf("MISSING: PROC-cmd found. ERROR!\n"); }
     
    199205                           printf("MISSING: EXAMPLE-cmd found. ERROR!\n"); }
    200206info=+"\"" {
    201 #  endif
     207#endif
     208
    202209%}
    203210
     
    263270             {
    264271               make_version(yytext,1);
    265 #ifdef STANDALONE_PARSER
    266                if (texinfo_out) 
     272               #ifdef STANDALONE_PARSER
     273               if (texinfo_out)
    267274               {
    268275                 char *c = libnamebuf;
     
    272279                    if (*c  == '$' || *c  == '@') putchar('\\');
    273280                    if (*c != '\r') putchar(*c);
    274                     if (*c  == '\\') 
     281                    if (*c  == '\\')
    275282                    {
    276283                      c++;
     
    284291               else
    285292                 printf("Version:%s;\n", libnamebuf);
    286 #else
    287 ifdef HAVE_NAMESPACES
     293               #else
     294               #ifdef HAVE_NAMESPACES
    288295               h0 = enterid( mstrdup("version"), myynest, STRING_CMD,
    289296                                  &IDPACKAGE(pl)->idroot, FALSE );
    290                 if (h0!=NULL)
    291                 {
    292                    IDSTRING(h0) = mstrdup(libnamebuf);
    293                 }
    294 else /* HAVE_NAMESPACES */
     297               if (h0!=NULL)
     298               {
     299                  IDSTRING(h0) = mstrdup(libnamebuf);
     300               }
     301               #else /* HAVE_NAMESPACES */
    295302               if (text_buffer!=NULL) FreeL((ADDRESS)text_buffer);
    296303               text_buffer = mstrdup(libnamebuf);
    297 endif /* HAVE_NAMESPACES */
    298 #endif
     304               #endif /* HAVE_NAMESPACES */
     305               #endif
    299306             }
    300307           }
     
    309316             sscanf( yytext, "%*[^p]proc %s", proc);
    310317             if(strlen(proc)<1) sscanf( yytext, "proc %s", proc);
    311 #if YYLPDEBUG > 1
     318             #if YYLPDEBUG > 1
    312319             printf("Newlib:%s\n", newlib);
    313 #endif
    314 #ifdef STANDALONE_PARSER
    315                if ( pi != NULL )
    316                {
    317                  printpi(pi);
    318                  pi_clear(pi);
    319                }
    320                pi = (procinfo *)malloc(sizeof(procinfo));
    321                iiInitSingularProcinfo(pi, newlib, proc, yylplineno,
    322                                         current_pos(0), p_static);
    323 #else STANDALONE_PARSER
     320             #endif
     321             #ifdef STANDALONE_PARSER
     322             if ( pi != NULL )
     323             {
     324               printpi(pi);
     325               pi_clear(pi);
     326             }
     327             pi = (procinfo *)malloc(sizeof(procinfo));
     328             iiInitSingularProcinfo(pi, newlib, proc, yylplineno,
     329                                    current_pos(0), p_static);
     330             #else STANDALONE_PARSER
    324331             if( mode == LOAD_LIB)
    325332             {
    326 ifdef HAVE_NAMESPACES
    327                 h0 = enterid( mstrdup(proc), myynest, PROC_CMD,
     333                #ifdef HAVE_NAMESPACES
     334                h0 = enterid( mstrdup(proc), 0 /*myynest*/, PROC_CMD,
    328335                                  &IDPACKAGE(pl)->idroot, TRUE);
    329336                if(!p_static && autoexport)
     
    334341                   namespaceroot->pop();
    335342                }
    336 else /* HAVE_NAMESPACES */
    337                h0 = enterid( mstrdup(proc), myynest, PROC_CMD,
     343               #else /* HAVE_NAMESPACES */
     344               h0 = enterid( mstrdup(proc), 0 /*myynest*/, PROC_CMD,
    338345                                   &idroot, TRUE );
    339 endif /* HAVE_NAMESPACES */
     346               #endif /* HAVE_NAMESPACES */
    340347               if (h0!=NULL)
    341348               {
    342349                 iiInitSingularProcinfo(IDPROC(h0), newlib, proc,
    343350                                yylplineno, current_pos(0),p_static);
    344 ifdef HAVE_NAMESPACES
     351                 #ifdef HAVE_NAMESPACES
    345352                 if (!p_static && h_top != NULL && autoexport)
    346                 {
     353                {
    347354                   if(IDPROC(h_top)!=NULL) piCleanUp((procinfo *)IDPROC(h_top));
    348355                   IDPROC(h_top)=IDPROC(h0);
    349356                   IDPROC(h_top)->ref++;
    350357                 }
    351 endif /* HAVE_NAMESPACES */
     358                 #endif /* HAVE_NAMESPACES */
    352359                 if (BVERBOSE(V_LOAD_PROC))
    353360                   Warn( "     proc '%s' registered", proc );
    354361               }
    355 #endif STANDALONE_PARSER
     362               #endif STANDALONE_PARSER
    356363               SET_DEF_END(mode, pi, current_pos(yyleng+1));
    357 #if YYLPDEBUG
     364               #if YYLPDEBUG
    358365               if(lpverbose)
    359366               {
     
    363370                      yylplineno, current_pos(0), (int)pi->data.s.def_end, brace1);
    364371               }
    365 #endif
     372               #endif
    366373               p_static=FALSE;
    367 #ifndef STANDALONE_PARSER
     374             #ifndef STANDALONE_PARSER
    368375             }
    369 #endif STANDALONE_PARSER
     376             #endif STANDALONE_PARSER
    370377           }
    371378example    {
    372379             BEGIN(pexample);
    373380             SET_EXAMPLE_START(mode, pi, yylplineno, current_pos(0));
    374 #if YYLPDEBUG
     381             #if YYLPDEBUG
    375382             if(lpverbose)
    376383             {
     
    378385                    current_pos(0), brace1);
    379386             }
    380 #endif
     387             #endif
    381388           }
    382389
     
    387394<header>({comment}+{tos}+{dolar}+Id:+{string}+[^\n]*)|({comment}+{tos}+{dolar}+Header:+{string}+[^\n]*) {
    388395             make_version(yytext, 0);
    389 #if YYLPDEBUG > 1
     396             #if YYLPDEBUG > 1
    390397             printf("+(id)HEAD:%s\n", yytext);
    391 #endif
     398             #endif
    392399           }
    393400<header>(^{comment}+[^\n]*) {
    394 #if YYLPDEBUG
     401             #if YYLPDEBUG
    395402             printf("+(cmt)HEAD:%s\n", yytext);
    396 #endif
     403             #endif
    397404           }
    398405<header>(^#![^\n]*) {
    399 #if YYLPDEBUG > 1
     406             #if YYLPDEBUG > 1
    400407             printf("-HEAD:%s\n", yytext);
    401 #endif
     408             #endif
    402409           }
    403410<header>^proc\  { yyless(0);
     
    417424<header>\n { yylplineno++; }
    418425<header>.  {
    419 #if YYLPDEBUG > 1
     426             #if YYLPDEBUG > 1
    420427             printf(" HEAD:%s\n", yytext);
    421 #endif
     428             #endif
    422429             yyless(0);
    423430             BEGIN(help);
    424431           }
    425432<help>(^{comment}+[^\n]*)  {
    426 #if YYLPDEBUG > 1
     433             #if YYLPDEBUG > 1
    427434             printf(" HELP:%s\n", yytext);
    428 #endif
     435             #endif
    429436             BEGIN(INITIAL); }
    430437<help>(^#![^\n]*) {
    431 #if YYLPDEBUG > 1
     438             #if YYLPDEBUG > 1
    432439             printf(" HELP:%s\n", yytext);
    433 #endif
     440             #endif
    434441             BEGIN(INITIAL);
    435442           }
     
    452459<help>\n { yylplineno++; }
    453460<help>({tos}|{comment}+{fstring}) {
    454 #if YYLPDEBUG
     461             #if YYLPDEBUG
    455462             if(lpverbose>2) printf("--->%s<---\n", yytext);
    456 #endif
     463             #endif
    457464           }
    458465<help>.    {
    459466             found_oldhelp=1;
    460 #if YYLPDEBUG > 1
     467             #if YYLPDEBUG > 1
    461468             printf("-HELP:%s\n", yytext);
    462 #endif
     469             #endif
    463470           }
    464471
     
    466473<libcmd>{string}"\""     { quote--;
    467474             yytext[yyleng-1] = '\0';
    468 #ifndef STANDALONE_PARSER
    469              if ( mode == LOAD_LIB ) {
    470              library_stack->push(newlib, yytext);
    471            }
    472 #endif /* STANDALONE_PARSER */
    473 #if YYLPDEBUG
     475             #ifndef STANDALONE_PARSER
     476             if ( mode == LOAD_LIB )
     477             {
     478               library_stack->push(newlib, yytext);
     479             }
     480             #endif /* STANDALONE_PARSER */
     481             #if YYLPDEBUG
    474482             if(lpverbose>1) printf("LIB:'%s'\n", yytext);
    475 #endif
     483             #endif
    476484             BEGIN(INITIAL);
    477485           }
     
    480488<pdef>\(   {
    481489             brace2++;
    482 #if YYLPDEBUG > 1
     490             #if YYLPDEBUG > 1
    483491             printf("%s", yytext);
    484 #endif
     492             #endif
    485493           }
    486494<pdef>\)   {
    487495             brace2--;
    488 #if YYLPDEBUG > 1
     496             #if YYLPDEBUG > 1
    489497             printf(">%s<\n", yytext);
    490498             printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);
    491 #endif
     499             #endif
    492500             if(brace2<=0)
    493501             {
    494 #if YYLPDEBUG > 1
     502               #if YYLPDEBUG > 1
    495503               printf("BEGIN(phead){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
    496 #endif
     504               #endif
    497505               SET_DEF_END(mode, pi, current_pos(yyleng));
    498506               BEGIN(phead);
     
    502510             if(brace2>0)
    503511             {
    504 #if YYLPDEBUG > 1
     512               #if YYLPDEBUG > 1
    505513               printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);
    506 #endif
     514               #endif
    507515               yylp_errno = YYLP_DEF_BR2;
    508516               return(1);
     
    537545
    538546<phead>({tnl}+{quote}+{strings}+{escquote}+{tnl}+"{") {
    539 #if YYLPDEBUG
     547              #if YYLPDEBUG
    540548              if(lpverbose>2)printf("0-Len=%d;\n", yyleng);
    541 #endif
     549              #endif
    542550              if(check)
    543551              {
     
    550558           }
    551559<phead>({tnl}+{quote}+{strings}+{eos}) {
    552 #if YYLPDEBUG
     560              #if YYLPDEBUG
    553561              if(lpverbose>2)printf("1-Len=%d;\n", yyleng);
    554 #endif
     562              #endif
    555563              BEGIN(phelp);
    556564              yyless(0);
     
    562570                       pi->procname, pi->data.s.proc_lineno);
    563571              }
    564 #if YYLPDEBUG
     572              #if YYLPDEBUG
    565573              if(lpverbose>2 && yyleng>2)
    566574                 printf("2-Len=%d, %s;\n", yyleng, pi->procname);
    567 #endif
     575              #endif
    568576              SET_HELP_START(mode, pi, current_pos(0));
    569577              BEGIN(poldhelp);
     
    609617                    current_pos(0), brace1);
    610618             }
    611 #if YYLPDEBUG > 1
     619             #if YYLPDEBUG > 1
    612620             printf("BEGIN(pbody){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
    613 #endif
     621             #endif
    614622             SET_BODY_START(mode, pi, yylplineno, current_pos(0));
    615 #if YYLPDEBUG > 1
     623             #if YYLPDEBUG > 1
    616624             printf("BODY at %d/%d", yylplineno, current_pos(0));
    617 #endif
     625             #endif
    618626           }
    619627<phelp>\n  { yylplineno++;}
     
    636644<pbody>"{"     {
    637645                 brace1++;
    638 #if YYLPDEBUG > 1
     646                 #if YYLPDEBUG > 1
    639647                 printf("line: %d, (%d)%s\n", yylplineno, brace1, yytext);
    640 #endif
     648                 #endif
    641649                }
    642650<pbody>"}"               {
    643 #if YYLPDEBUG > 1
    644                            printf("line: %d, (%d)%s\n", yylplineno, brace1, yytext);
    645 #endif
     651                           #if YYLPDEBUG > 1
     652                           printf("line: %d, (%d)%s\n",
     653                             yylplineno, brace1, yytext);
     654                           #endif
    646655                           brace1--;
    647656                           if(brace2>0)
     
    659668                             SET_BODY_END(mode, pi, current_pos(yyleng));
    660669                             SET_PROC_END(mode, pi, current_pos(yyleng));
    661 #if YYLPDEBUG > 1
    662                              printf("-%d\n", current_pos(0));
    663 #endif
     670                             #if YYLPDEBUG > 1
     671                               printf("-%d\n", current_pos(0));
     672                             #endif
    664673                             BEGIN(INITIAL);
    665674                           }
     
    699708
    700709<string>"\""             { quote--;
    701 #ifdef HAVE_NAMESPACES
    702                             copy_string(mode, pl);
    703 #else /* HAVE_NAMESPACES */
    704                            copy_string(mode);
    705 #endif /* HAVE_NAMESPACES */
     710                           #ifdef HAVE_NAMESPACES
     711                             copy_string(mode, pl);
     712                           #else /* HAVE_NAMESPACES */
     713                             copy_string(mode);
     714                           #endif /* HAVE_NAMESPACES */
    706715                           last_cmd = LP_NONE;
    707716                           if(old_state==phelp)
    708                            {             
     717                           {
    709718                              SET_HELP_END(mode, pi, current_pos(0));
    710719                           }
     
    761770\r                       { }
    762771;                        { p_static = FALSE;
    763 #if YYLPDEBUG > 1
     772                            #if YYLPDEBUG > 1
    764773                            printf("%s", yytext);
    765 #endif
     774                            #endif
    766775                         }
    767776.                        { p_static = FALSE;
    768777                           yylp_errno = YYLP_BAD_CHAR;
    769 ifdef STANDALONE_PARSER
     778                           #ifdef STANDALONE_PARSER
    770779                           printf("[%d]", *yytext);
    771 else
     780                           #else
    772781                           if (text_buffer!=NULL) FreeL((ADDRESS)text_buffer);
    773782                           text_buffer = mstrdup(yytext);
    774 endif
    775 #if YYLPDEBUG > 1
    776                            printf("[%s]", yytext);
    777 #endif
     783                           #endif
     784                           #if YYLPDEBUG > 1
     785                             printf("[%s]", yytext);
     786                           #endif
    778787                           return(1);
    779788                         }
     
    791800  offset = ftell(f);
    792801  rc  = myfread( buf, 1, max_size, f );
    793 #if YYLPDEBUG >2
    794   printf("fread: %d of %d\n", rc, max_size);
    795 #endif
     802  #if YYLPDEBUG >2
     803    printf("fread: %d of %d\n", rc, max_size);
     804  #endif
    796805  yylp_buffer_start = buf;
    797806  return rc;
     
    854863    printf("$info = <<EOT;\n");
    855864    fseek (yylpin, i, SEEK_SET);
    856     while (i< current_location) 
    857     { 
     865    while (i< current_location)
     866    {
    858867      c = fgetc(yylpin);
    859       if (c == '\\') 
     868      if (c == '\\')
    860869      {
    861870        quote = (! quote);
     
    898907      if(offset>0) text_buffer[i-offset] = text_buffer[i];
    899908    }
    900 #    ifdef HAVE_NAMESPACES
     909    #ifdef HAVE_NAMESPACES
    901910    if( mode != GET_INFO ) {
    902911      h0 = enterid( mstrdup("info"), myynest, STRING_CMD,
     
    907916      }
    908917    }
    909 #    endif /* HAVE_NAMESPACES */
     918    #endif /* HAVE_NAMESPACES */
    910919  }
    911920#endif /* STANDALONE_PARSER */
     
    919928void print_version(lp_modes mode, char *p)
    920929{
    921 #  ifdef STANDALONE_PARSER
     930#ifdef STANDALONE_PARSER
    922931  //printf("loading %s%s", p, libnamebuf);
    923 #  else
     932#else
    924933  if ( mode == LOAD_LIB )
    925934  {
     
    927936       //Warn( "loading %s%s", p, libnamebuf);
    928937  }
    929 #  endif
    930 }
    931 
    932 #  ifdef STANDALONE_PARSER
     938#endif
     939}
     940
     941#ifdef STANDALONE_PARSER
    933942main( int argc, char *argv[] )
    934943{
     
    961970}
    962971
    963 #  endif /* STANDALONE_PARSER */
     972#endif /* STANDALONE_PARSER */
    964973#endif /* HAVE_LIBPARSE */
Note: See TracChangeset for help on using the changeset viewer.