Changeset 799ce1 in git for Singular/libparse.l


Ignore:
Timestamp:
May 5, 1998, 3:46:39 PM (26 years ago)
Author:
Kai Krüger <krueger@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
8d525d24817ecbbf4965a24b18bdb2b1554fef76
Parents:
95ba43dd6254b9f183dccb7cc9ca1463c7f1f302
Message:
Modified Files:
	iplib.cc libparse.l mod2.h.in libparse.cc
Changed output of 'loading libraries'
enabled option(debugLib)


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

Legend:

Unmodified
Added
Removed
  • Singular/libparse.l

    r95ba43 r799ce1  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 /* $Id: libparse.l,v 1.18 1998-05-05 12:07:01 schmidt Exp $ */
     5/* $Id: libparse.l,v 1.19 1998-05-05 13:46:38 krueger Exp $ */
    66#include <stdio.h>
    77#include <string.h>
     
    248248               printf("Version:%s;\n", libnamebuf);
    249249#else
    250                //text_buffer = mstrdup(libnamebuf);
    251                print_version(mode, libnamebuf);
     250               text_buffer = mstrdup(libnamebuf);
    252251#endif
    253252             }
     
    260259             BEGIN(pdef);
    261260             found_proc_in_proc = 0;
     261             proc[0]='\0';
     262             sscanf( yytext, "%*[^p]proc %s", proc);
     263             if(strlen(proc)<1) sscanf( yytext, "proc %s", proc);
    262264#if YYLPDEBUG > 1
    263265             printf("Newlib:%s\n", newlib);
     
    269271               }
    270272               pi = (procinfo *)malloc(sizeof(procinfo));
    271                iiInitSingularProcinfo(pi, newlib, yytext+5, yylplineno,
     273               iiInitSingularProcinfo(pi, newlib, proc, yylplineno,
    272274                                        current_pos(0), p_static);
    273275#else STANDALONE_PARSER
    274276             if( mode == LOAD_LIB) {
    275                proc[0]='\0';
    276                sscanf( yytext, "%*[^p]proc %s", proc);
    277                if(strlen(proc)<1) sscanf( yytext, "proc %s", proc);
    278277               h0 = enterid( mstrdup(proc), myynest, PROC_CMD,
    279278                                   &idroot, FALSE );
     
    287286               SET_DEF_END(mode, pi, current_pos(yyleng+1));
    288287#if YYLPDEBUG
    289                if(lpverbose>1) printf("PROC %d at %d/%d: (%d) %s\n", p_static,
    290                       yylplineno, current_pos(0), brace1, yytext);
     288               if(lpverbose)
     289                  printf("// %s PROC '%s' at line %d,%d: (%d).\n",
     290                      p_static ? "local" : "global", proc,
     291                      yylplineno, current_pos(0), brace1);
    291292#endif
    292293               p_static=FALSE;
     
    299300             SET_EXAMPLE_START(mode, pi, yylplineno, current_pos(0));
    300301#if YYLPDEBUG
    301              if(lpverbose>1) printf("EXAMPLE at %d/%d (%d)\n", yylplineno,
     302             if(lpverbose)
     303                printf("//     EXAMPLE at line %d,%d (%d)\n", yylplineno,
    302304                    current_pos(0), brace1);
    303305#endif
     
    310312<header>({comment}+{tos}+{dolar}+Id:+{string}+[^\n]*)|({comment}+{tos}+{dolar}+Header:+{string}+[^\n]*) {
    311313             make_version(yytext, 0);
    312              //print_version(mode, "");
    313314#if YYLPDEBUG > 1
    314315             printf("+(id)HEAD:%s\n", yytext);
     
    326327           }
    327328<header>^proc\  { yyless(0);
    328              //print_version(mode, libfile);
    329329             BEGIN(INITIAL);
    330330             yymore();
     
    338338
    339339<header>^LIB[ \t]+"\""   { quote++;
    340              //print_version(mode, libfile);
    341340             BEGIN(libcmd);
    342341           }
     
    346345             printf(" HEAD:%s\n", yytext);
    347346#endif
    348              //print_version(mode, libfile);
    349347             yyless(0);
    350348             BEGIN(help);
     
    434432             } else {
    435433               brace1++; BEGIN(pbody);
     434               if(lpverbose)
     435                  printf("//     BODY at line %d,%d (%d)\n", yylplineno,
     436                      current_pos(0), brace1);
    436437               SET_BODY_START(mode, pi, yylplineno, current_pos(0));
    437438             }
     
    489490<poldhelp>"{" {
    490491                brace1++; BEGIN(pbody);
     492                if(lpverbose)
     493                   printf("//     BODY at line %d,%d (%d)\n", yylplineno,
     494                       current_pos(0), brace1);
    491495#if YYLPDEBUG > 1
    492496                printf("BEGIN(pbody){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
     
    508512<phelp>"{" {
    509513             brace1++; BEGIN(pbody);
     514             if(lpverbose)
     515                printf("//     BODY at line %d,%d (%d)\n", yylplineno,
     516                    current_pos(0), brace1);
    510517#if YYLPDEBUG > 1
    511518             printf("BEGIN(pbody){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
Note: See TracChangeset for help on using the changeset viewer.