Changeset f2c53c0 in git for Singular/libparse.h


Ignore:
Timestamp:
Jan 29, 2010, 2:17:17 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
319f7948b5d13ad1012fdfd9c4113b6aced44bd4
Parents:
20d4b60dbf3e6336262bc0f3909917d6f602bbe6
Message:
libparse fixed

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

Legend:

Unmodified
Added
Removed
  • Singular/libparse.h

    r20d4b6 rf2c53c0  
    88* ABSTRACT: lib parsing
    99*/
    10 #  include "structs.h"
    11 #  include "subexpr.h"
     10typedef enum { OLD_LIBSTYLE, NEW_LIBSTYLE } lib_style_types;
    1211typedef enum { LOAD_LIB, GET_INFO } lp_modes;
    13 typedef enum { OLD_LIBSTYLE, NEW_LIBSTYLE } lib_style_types;
    1412
    15 procinfo *iiInitSingularProcinfo(procinfov pi, const char *libname,
     13#ifdef STANDALONE_PARSER
     14
     15
     16#define idhdl void*
     17#define leftv void*
     18#define package void*
     19#define BOOLEAN int
     20
     21typedef enum { LANG_NONE, LANG_TOP, LANG_SINGULAR, LANG_C, LANG_MAX} language_defs;
     22// LANG_TOP     : Toplevel package only
     23// LANG_SINGULAR:
     24// LANG_C       :
     25//
     26
     27class proc_singular
     28{
     29public:
     30  long   proc_start;       // position where proc is starting
     31  long   def_end;          // position where proc header is ending
     32  long   help_start;       // position where help is starting
     33  long   help_end;         // position where help is starting
     34  long   body_start;       // position where proc-body is starting
     35  long   body_end;         // position where proc-body is ending
     36  long   example_start;    // position where example is starting
     37  long   proc_end;         // position where proc is ending
     38  int    proc_lineno;
     39  int    body_lineno;
     40  int    example_lineno;
     41  char   *body;
     42  long help_chksum;
     43};
     44
     45struct proc_object
     46{
     47//public:
     48  BOOLEAN (*function)(leftv res, leftv v);
     49};
     50union uprocinfodata
     51{
     52public:
     53  proc_singular  s;        // data of Singular-procedure
     54  struct proc_object    o; // pointer to binary-function
     55};
     56
     57typedef union uprocinfodata procinfodata;
     58
     59class procinfo;
     60typedef procinfo *         procinfov;
     61
     62class procinfo
     63{
     64public:
     65  char          *libname;
     66  char          *procname;
     67  package       pack;
     68  language_defs language;
     69  short         ref;
     70  char          is_static;        // if set, proc not accessible for user
     71  char          trace_flag;
     72  procinfodata  data;
     73};
     74#else
     75#include "febase.h"
     76#endif
     77
     78procinfo *iiInitSingularProcinfo(procinfo* pi, const char *libname,
    1679              const char *procname, int line, long pos, BOOLEAN pstatic=FALSE);
    1780
Note: See TracChangeset for help on using the changeset viewer.