/[bison]/bison/src/muscle_tab.h
ViewVC logotype

Diff of /bison/src/muscle_tab.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by eggert, Thu Oct 17 06:27:41 2002 UTC revision 1.7 by akim, Sat Oct 19 14:38:06 2002 UTC
# Line 1  Line 1 
1  /* Definitions for macrotab.c and callers, part of bison,  /* Muscle table manager for Bison,
2     Copyright (C) 2001, 2002 Free Software Foundation, Inc.     Copyright (C) 2001, 2002 Free Software Foundation, Inc.
3    
4     This file is part of Bison, the GNU Compiler Compiler.     This file is part of Bison, the GNU Compiler Compiler.
# Line 21  Line 21 
21  #ifndef MUSCLE_TAB_H_  #ifndef MUSCLE_TAB_H_
22  # define MUSCLE_TAB_H_  # define MUSCLE_TAB_H_
23    
 # define MTABSIZE 101  
   
24  typedef struct muscle_entry_s  typedef struct muscle_entry_s
25  {  {
26    const char *key;    const char *key;
27    const char *value;    char *value;
28  } muscle_entry_t;  } muscle_entry_t;
29    
30  void muscle_init PARAMS ((void));  void muscle_init PARAMS ((void));
31  void muscle_insert PARAMS ((const char *key, const char *value));  void muscle_insert PARAMS ((const char *key, char *value));
32  const char *muscle_find PARAMS ((const char *key));  char *muscle_find PARAMS ((const char *key));
33  void muscle_free PARAMS ((void));  void muscle_free PARAMS ((void));
34    
35    
# Line 59  extern struct obstack muscle_obstack; Line 57  extern struct obstack muscle_obstack;
57    muscle_insert (Key, obstack_finish (&muscle_obstack));        \    muscle_insert (Key, obstack_finish (&muscle_obstack));        \
58  }  }
59    
60  #define MUSCLE_INSERT_PREFIX(Key, Value)                                \  #define MUSCLE_GROW_STRING_PAIR(Key, Value1, Value2)            \
61  {                                                                       \  {                                                               \
62    obstack_fgrow2 (&muscle_obstack, "%s%s",                              \    obstack_sgrow (&muscle_obstack, Value1);                      \
63                    spec_name_prefix ? spec_name_prefix : "yy", Value);   \    obstack_1grow (&muscle_obstack, 0);                           \
64    obstack_1grow (&muscle_obstack, 0);                                   \    muscle_insert (Key, obstack_finish (&muscle_obstack));        \
   muscle_insert (Key, obstack_finish (&muscle_obstack));                \  
65  }  }
66    
67    /* Insert (KEY, VALUE).  If KEY already existed, overwrite the
68       previous value.  Uses MUSCLE_OBSTACK.  De-allocates the previously
69       associated value.  VALUE and SEPARATOR are copied.  */
70    
71    void muscle_grow PARAMS ((const char *key,
72                              const char *value, const char *separator));
73    
74    /* MUSCLE is an M4 list of pairs.  Create or extend it with the pair
75       (A1, A2).  Note that because the muscle values are output *double*
76       quoted, one needs to strip the first level of quotes to reach the
77       list itself.  */
78    
79    void muscle_pair_list_grow PARAMS ((const char *muscle,
80                                        const char *a1, const char *a2));
81    
82  void muscles_m4_output PARAMS ((FILE *out));  void muscles_m4_output PARAMS ((FILE *out));
83    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26