absyntax/absyntax.hh
changeset 1041 56ebe2a31b5b
parent 1000 556b74055518
child 1043 4165b7189c32
equal deleted inserted replaced
1040:e8563dcaefca 1041:56ebe2a31b5b
   258   public:
   258   public:
   259     /* WARNING: only use this method for debugging purposes!! */
   259     /* WARNING: only use this method for debugging purposes!! */
   260     virtual const char *absyntax_cname(void) {return "list_c";};
   260     virtual const char *absyntax_cname(void) {return "list_c";};
   261 
   261 
   262     int c,n; /* c: current capacity of list (malloc'd memory);  n: current number of elements in list */
   262     int c,n; /* c: current capacity of list (malloc'd memory);  n: current number of elements in list */
       
   263   private:
   263     symbol_c **elements;
   264     symbol_c **elements;
   264 
   265 
   265   public:
   266   public:
   266     list_c(int fl = 0, int fc = 0, const char *ffile = NULL /* filename */, long int forder=0, /* order in which it is read by lexcial analyser */
   267     list_c(int fl = 0, int fc = 0, const char *ffile = NULL /* filename */, long int forder=0, /* order in which it is read by lexcial analyser */
   267            int ll = 0, int lc = 0, const char *lfile = NULL /* filename */, long int lorder=0  /* order in which it is read by lexcial analyser */
   268            int ll = 0, int lc = 0, const char *lfile = NULL /* filename */, long int lorder=0  /* order in which it is read by lexcial analyser */
   269 
   270 
   270     list_c(symbol_c *elem, 
   271     list_c(symbol_c *elem, 
   271            int fl = 0, int fc = 0, const char *ffile = NULL /* filename */, long int forder=0, /* order in which it is read by lexcial analyser */
   272            int fl = 0, int fc = 0, const char *ffile = NULL /* filename */, long int forder=0, /* order in which it is read by lexcial analyser */
   272            int ll = 0, int lc = 0, const char *lfile = NULL /* filename */, long int lorder=0  /* order in which it is read by lexcial analyser */
   273            int ll = 0, int lc = 0, const char *lfile = NULL /* filename */, long int lorder=0  /* order in which it is read by lexcial analyser */
   273           );
   274           );
       
   275      /* get element in position pos of the list */
       
   276     virtual symbol_c *get_element(int pos);
   274      /* append a new element to the end of the list */
   277      /* append a new element to the end of the list */
   275     virtual void add_element(symbol_c *elem);
   278     virtual void add_element(symbol_c *elem);
   276      /* insert a new element before position pos. */
   279      /* insert a new element before position pos. */
   277      /* To insert into the begining of list, call with pos=0  */
   280      /* To insert into the begining of list, call with pos=0  */
   278      /* To insert into the end of list, call with pos=list->n */
   281      /* To insert into the end of list, call with pos=list->n */