xapian-core  2.0.0
header.h
Go to the documentation of this file.
1 #include <stdio.h>
2 
3 #define SNOWBALL_VERSION "3.0.0"
4 
5 typedef unsigned char byte;
6 typedef unsigned short symbol;
7 
8 #define true 1
9 #define false 0
10 
11 #define MALLOC check_malloc
12 #define FREE check_free
13 
14 // Declare variable `V` of type `struct TYPE *` and dynamically allocate it.
15 // We exit on allocation failure so `V` is always non-NULL.
16 #define NEW(TYPE, V) struct TYPE * V = (struct TYPE *) MALLOC(sizeof(struct TYPE))
17 
18 // Similar to NEW() but allocates an array of N objects of type `struct TYPE *`.
19 #define NEWVEC(TYPE, V, N) struct TYPE * V = (struct TYPE *) MALLOC(sizeof(struct TYPE) * (N))
20 
21 #define SIZE(p) ((const int *)(p))[-1]
22 #define SET_SIZE(p, n) ((int *)(p))[-1] = (n)
23 #define ADD_TO_SIZE(p, n) ((int *)(p))[-1] += (n)
24 #define CAPACITY(p) ((int *)(p))[-2]
25 
26 extern symbol * create_b(int n);
27 extern void report_b(FILE * out, const symbol * p);
28 extern void lose_b(symbol * p);
29 extern symbol * increase_capacity_b(symbol * p, int n);
30 extern symbol * add_to_b(symbol * p, const symbol * q, int n);
31 extern symbol * copy_b(const symbol * p);
32 extern char * b_to_sz(const symbol * p);
34 
35 // These routines are like those above but work in byte instead of symbol.
36 
37 extern byte * create_s(int n);
38 extern byte * create_s_from_sz(const char * s);
39 extern byte * create_s_from_data(const char * s, int n);
40 
41 extern void report_s(FILE * out, const byte * p);
42 extern void lose_s(byte * p);
43 extern byte * increase_capacity_s(byte * p, int n);
44 extern byte * ensure_capacity_s(byte * p, int n);
45 extern byte * copy_s(const byte * p);
46 extern byte * add_s_to_s(byte * p, const byte * s);
47 extern byte * add_slen_to_s(byte * p, const char * s, int n);
48 extern byte * add_sz_to_s(byte * p, const char * s);
49 extern byte * add_char_to_s(byte * p, char ch);
50 // "" LIT is a trick to make compilation fail if LIT is not a string literal.
51 #define add_literal_to_s(P, LIT) add_slen_to_s(P, "" LIT, sizeof(LIT) - 1)
52 
53 struct str; /* defined in space.c */
54 
55 extern struct str * str_new(void);
56 extern void str_delete(struct str * str);
57 extern void str_append(struct str * str, const struct str * add);
58 extern void str_append_ch(struct str * str, char add);
59 extern void str_append_s(struct str * str, const byte * q);
60 extern void str_append_string(struct str * str, const char * s);
61 extern void str_append_int(struct str * str, int i);
62 extern void str_append_wchar_as_utf8(struct str * str, symbol ch);
63 extern void str_clear(struct str * str);
64 extern void str_assign(struct str * str, const char * s);
65 extern struct str * str_copy(const struct str * old);
66 extern byte * str_data(const struct str * str);
67 extern int str_len(const struct str * str);
68 extern int str_back(const struct str *str);
69 extern void str_pop(const struct str *str);
70 extern void str_pop_n(const struct str *str, int n);
71 extern void output_str(FILE * outfile, struct str * str);
72 
73 extern int get_utf8(const symbol * p, int * slot);
74 extern int put_utf8(int ch, symbol * p);
75 
76 typedef enum { ENC_SINGLEBYTE = 0, ENC_UTF8, ENC_WIDECHARS } enc;
77 
78 /* stringdef name and value */
79 struct m_pair {
80  struct m_pair * next;
81  byte * name;
83 
84 };
85 
86 /* struct input must be a prefix of struct tokeniser. */
87 struct input {
88  struct input * next;
89  byte * p;
90  int c;
91  char * file;
92  // -1 : Release file with: lose_s((byte *)file)
93  // 0 : We don't own file.
94  // 1 : Release file with: free(file)
97 
98 };
99 
100 struct include {
101  struct include * next;
102  byte * s;
103 
104 };
105 
107  /* The relational operator token values are chosen such that we can
108  * invert the relation with a simple xor with 1.
109  */
110  c_gt = 0, c_le,
113 
114  /* Other token values just need to be unique. */
128 
129  /* These token values don't directly correspond to a keyword. */
133 
134  /* These token values are synthesised by the analyser. */
146 
148 };
149 
154 };
155 
156 /* struct input must be a prefix of struct tokeniser. */
157 struct tokeniser {
158  struct input * next;
159  byte * p;
160  int c;
161  char * file;
162  // -1 : Release file with: lose_s((byte *)file)
163  // 0 : We don't own file.
164  // 1 : Release file with: free(file)
167 
168  // Used for c_literalstring values.
170  // Used for c_name names.
171  byte * s;
172  int number;
173  // String escape start character or -1.
174  int m_start;
175  // String escape end character.
176  int m_end;
177  // Link list of stringdefs.
178  struct m_pair * m_pairs;
179  // Nesting depth of get directives.
182  int token;
187 
188  struct include * includes;
189 
190  /* Mode in which U+ has been used:
191  * UPLUS_NONE - not used yet
192  * UPLUS_DEFINED - stringdef U+xxxx ....
193  * UPLUS_UNICODE - {U+xxxx} used with implicit meaning
194  */
196 
198 };
199 
200 extern byte * get_input(const char * filename);
201 extern struct tokeniser * create_tokeniser(byte * b, char * file);
202 extern int read_token(struct tokeniser * t);
203 extern int peek_token(struct tokeniser * t);
204 #define hold_token(T) ((T)->token_held = true)
205 extern const char * name_of_token(int code);
206 extern void disable_token(struct tokeniser * t, int code);
207 extern void close_tokeniser(struct tokeniser * t);
208 
209 extern int space_count;
210 extern void * check_malloc(size_t n);
211 extern void check_free(void * p);
212 
213 struct node;
214 
215 struct name {
216  struct name * next;
217  byte * s;
218  byte type; /* t_string etc */
219  byte mode; /* for routines, externals (m_forward, etc) */
220  byte value_used; /* (For variables) is its value ever used? */
221  byte initialised; /* (For variables) is it ever initialised? */
222  byte used_in_definition; /* (grouping) used in grouping definition? */
223  byte amongvar_needed; /* for routines, externals */
224  byte among_with_function; /* (routines/externals) contains among with func */
225  struct node * definition; /* (routines/externals) c_define node */
226  int used_in_among; /* (routines/externals) Count of uses in amongs */
227  // Initialised to -1; set to -2 if reachable from an external.
228  // Reachable names are then numbered 0, 1, 2, ... with separate numbering
229  // per type.
230  int count;
231  // Number of references to this name.
233  struct grouping * grouping; /* for grouping names */
234  struct node * used; /* First use, or NULL if not used */
235  struct name * local_to; /* Local to one routine/external */
236  int among_index; /* for functions used in among */
237  int declaration_line_number;/* Line number of declaration */
238 };
239 
241  struct literalstring * next;
243 };
244 
245 struct amongvec {
246  symbol * b; /* the string giving the case */
247  int size; /* - and its size */
248  struct node * action; /* the corresponding action */
249  int i; /* the amongvec index of the longest substring of b */
250  int result; /* the numeric result for the case */
251  int line_number; /* for diagnostics and stable sorting */
252  int function_index; /* 1-based */
253  struct name * function;
254 };
255 
256 struct among {
257  struct among * next;
258  struct amongvec * b; /* pointer to the amongvec */
259  int number; /* amongs are numbered 0, 1, 2 ... */
260  int literalstring_count; /* in this among */
261  int command_count; /* in this among (excludes "no command" entries) */
262  int nocommand_count; /* number of "no command" entries in this among */
263  int function_count; /* number of different functions in this among */
264  byte amongvar_needed; /* do we need to set among_var? */
265  byte always_matches; /* will this among always match? */
266  byte used; /* is this among in reachable code? */
267  int shortest_size; /* smallest non-zero string length in this among */
268  int longest_size; /* longest string length in this among */
269  struct node * substring; /* i.e. substring ... among ( ... ) */
270  struct node ** commands; /* array with command_count entries */
271  struct node * node; /* pointer to the node for this among */
272  struct name * in_routine; /* pointer to name for routine this among is in */
273 };
274 
275 struct grouping {
276  struct grouping * next;
277  symbol * b; /* the characters of this group */
278  int largest_ch; /* character with max code */
279  int smallest_ch; /* character with min code */
280  struct name * name; /* so g->name->grouping == g */
282 };
283 
284 struct node {
285  struct node * next;
286  struct node * left;
287  struct node * aux; /* used in setlimit */
288  struct among * among; /* used in among */
289  struct node * right;
290  byte type;
291  byte mode;
292  // We want to distinguish constant AEs which have the same value everywhere
293  // (e.g. 42, 2+2, lenof '{U+0246}') from constant AEs which can have a
294  // different value depending on platform and/or target language and/or
295  // Unicode mode (e.g. maxint, sizeof '{U+0246}') - some warnings which
296  // depend on a constant AEs value should only fire for the first set.
298  // Return 0 for always f.
299  // Return 1 for always t.
300  // Return -1 for don't know (or can raise t or f).
301  signed char possible_signals;
302  struct node * AE;
303  struct name * name;
305  int number;
307 };
308 
310  t_size = 6,
311 
313  t_grouping = 5
314 
315 /* If this list is extended, adjust write_varname in generator.c */
316 };
317 
318 struct analyser {
320  struct node * nodes;
321  struct name * names;
323  byte mode;
324  byte modifyable; /* false inside reverse(...) */
325  struct node * program;
326  struct node * program_end;
327  /* name_count[i] counts the number of names of type i, where i is an enum
328  * name_types value. These counts *EXCLUDE* localised variables and
329  * variables which optimised away (e.g. declared but never used).
330  */
332  /* name_count[t_string] + name_count[t_boolean] + name_count[t_integer] */
334  struct among * amongs;
335  struct among * amongs_end;
336  int among_with_function_count; /* number of amongs with functions */
337  struct grouping * groupings;
339  struct node * substring; /* pending 'substring' in current routine definition */
340  struct name * current_routine; /* routine/external we're currently on. */
342  byte int_limits_used; /* are maxint or minint used? */
343  byte debug_used; /* is the '?' command used? */
344 };
345 
347  // m_unknown is used as the initial value for struct node's mode member.
348  // When a routine (or external) is used or defined we check the mode
349  // member matches, but for the first use/definition we see we want to
350  // instead set it to the mode of that use/definition.
352 };
353 
354 extern void print_program(struct analyser * a);
355 extern struct analyser * create_analyser(struct tokeniser * t);
356 extern void close_analyser(struct analyser * a);
357 
362 extern void read_program(struct analyser * a, unsigned localise_mask);
363 
364 struct generator {
365  struct analyser * analyser;
366  struct options * options;
367  int unreachable; /* 0 if code can be reached, 1 if current code
368  * is unreachable. */
369  int var_number; /* Number of next variable to use. */
370  struct str * outbuf; /* temporary str to store output */
371  struct str * declarations; /* str storing variable declarations */
373  int max_label; /* Only used by Python */
374  int margin;
375 
376  /* Target language code to execute in case of failure. */
377  struct str * failure_str;
378 
379  int label_used; /* Keep track of whether the failure label is used. */
382  int copy_from_count; /* count of calls to copy_from() */
383 
384  const char * S[10]; /* strings */
385  byte * B[10]; /* byte blocks */
386  int I[10]; /* integers */
387 
388  int line_count; /* counts number of lines output */
389  int line_labelled; /* in ISO C, will need extra ';' if it is a block end */
391  int keep_count; /* used to number keep/restore pairs to avoid compiler warnings
392  about shadowed variables */
393  int temporary_used; /* track if temporary variable used (Ada and Pascal) */
394  char java_import_arrays; /* need `import java.util.Arrays;` */
395  char java_import_chararraysequence; /* need `import org.tartarus.snowball.CharArraySequence;` */
396 };
397 
398 /* Special values for failure_label in struct generator. */
400  x_return = -1
401 };
402 
403 struct options {
404  /* for the command line: */
405  byte * output_file;
406  // output_file but without any path.
407  byte * output_leaf;
408  // Extension specified in -o option (or NULL if none).
409  byte * extension;
410  byte * name;
411  FILE * output_src;
412  FILE * output_h;
414  byte comments;
416  enum {
417  LANG_C = 0, // We generate C by default.
428  LANG_RUST
430  const char * externals_prefix;
431  const char * variables_prefix;
432  const char * cheader;
433  const char * hheader;
434  const char * runtime_path;
435  const char * parent_class_name;
436  const char * package;
437  const char * go_snowball_runtime;
438  const char * string_class;
439  const char * among_class;
440  struct include * includes;
442 };
443 
444 /* Generator functions common to several backends. */
445 
446 extern struct generator * create_generator(struct analyser * a, struct options * o);
447 extern void close_generator(struct generator * g);
448 
449 extern void write_char(struct generator * g, int ch);
450 extern void write_newline(struct generator * g);
451 extern void write_string(struct generator * g, const char * s);
452 extern void write_wchar_as_utf8(struct generator * g, symbol ch);
453 extern void write_int(struct generator * g, int i);
454 extern void write_hex4(struct generator * g, int ch);
455 extern void write_symbol(struct generator * g, symbol s);
456 extern void write_s(struct generator * g, const byte * b);
457 extern void write_str(struct generator * g, struct str * str);
458 extern void write_c_relop(struct generator * g, int relop);
459 
460 extern void write_comment_content(struct generator * g, struct node * p,
461  const char * end);
463 extern void write_start_comment(struct generator * g,
464  const char * comment_start,
465  const char * comment_end);
466 
467 extern int K_needed(struct generator * g, struct node * p);
468 extern int repeat_restore(struct generator * g, struct node * p);
469 
470 extern int just_return_on_fail(struct generator * g);
471 extern int tailcallable(struct generator * g, struct node * p);
472 
473 /* Generator for C code. */
474 extern void generate_program_c(struct generator * g);
475 
476 /* Generator for Java code. */
477 extern void generate_program_java(struct generator * g);
478 
479 /* Generator for Dart code. */
480 extern void generate_program_dart(struct generator * g);
481 
482 /* Generator for C# code. */
483 extern void generate_program_csharp(struct generator * g);
484 
485 extern void generate_program_pascal(struct generator * g);
486 
487 extern void generate_program_php(struct generator * g);
488 
489 /* Generator for Python code. */
490 extern void generate_program_python(struct generator * g);
491 
492 extern void generate_program_js(struct generator * g);
493 
494 extern void generate_program_rust(struct generator * g);
495 
496 extern void generate_program_go(struct generator * g);
497 
498 extern void generate_program_ada(struct generator * g);
unsigned char symbol
Definition: api.h:4
Definition: unittest.cc:660
PositionList * p
void generate_program_c(struct generator *g)
void str_pop(const struct str *str)
void str_append_int(struct str *str, int i)
void str_clear(struct str *str)
byte * get_input(const char *filename)
unsigned char byte
Definition: header.h:5
void generate_program_csharp(struct generator *g)
symbol * add_to_b(symbol *p, const symbol *q, int n)
void generate_program_js(struct generator *g)
int K_needed(struct generator *g, struct node *p)
void str_delete(struct str *str)
void generate_program_php(struct generator *g)
void str_append_s(struct str *str, const byte *q)
void close_generator(struct generator *g)
void write_generated_comment_content(struct generator *g)
int just_return_on_fail(struct generator *g)
void generate_program_ada(struct generator *g)
int get_utf8(const symbol *p, int *slot)
byte * copy_s(const byte *p)
byte * increase_capacity_s(byte *p, int n)
void write_newline(struct generator *g)
special_labels
Definition: header.h:399
@ x_return
Definition: header.h:400
symbol * increase_capacity_b(symbol *p, int n)
void report_s(FILE *out, const byte *p)
void generate_program_dart(struct generator *g)
void write_int(struct generator *g, int i)
struct generator * create_generator(struct analyser *a, struct options *o)
analyser_modes
Definition: header.h:346
@ m_backward
Definition: header.h:351
@ m_unknown
Definition: header.h:351
@ m_forward
Definition: header.h:351
void disable_token(struct tokeniser *t, int code)
void write_char(struct generator *g, int ch)
uplus_modes
Definition: header.h:150
@ UPLUS_UNICODE
Definition: header.h:153
@ UPLUS_NONE
Definition: header.h:151
@ UPLUS_DEFINED
Definition: header.h:152
void write_s(struct generator *g, const byte *b)
void lose_s(byte *p)
Definition: utilities.cc:38
byte * create_s_from_data(const char *s, int n)
void output_str(FILE *outfile, struct str *str)
unsigned short symbol
Definition: header.h:6
void write_str(struct generator *g, struct str *str)
byte * add_sz_to_s(byte *p, const char *s)
void generate_program_python(struct generator *g)
int put_utf8(int ch, symbol *p)
symbol * add_symbol_to_b(symbol *p, symbol ch)
byte * add_char_to_s(byte *p, char ch)
void write_comment_content(struct generator *g, struct node *p, const char *end)
void str_append(struct str *str, const struct str *add)
void report_b(FILE *out, const symbol *p)
void generate_program_pascal(struct generator *g)
int str_back(const struct str *str)
int space_count
void str_append_wchar_as_utf8(struct str *str, symbol ch)
void print_program(struct analyser *a)
void str_assign(struct str *str, const char *s)
void write_hex4(struct generator *g, int ch)
void write_symbol(struct generator *g, symbol s)
void write_wchar_as_utf8(struct generator *g, symbol ch)
void str_append_ch(struct str *str, char add)
enc
Definition: header.h:76
@ ENC_UTF8
Definition: header.h:76
@ ENC_WIDECHARS
Definition: header.h:76
@ ENC_SINGLEBYTE
Definition: header.h:76
int str_len(const struct str *str)
void close_tokeniser(struct tokeniser *t)
int read_token(struct tokeniser *t)
void close_analyser(struct analyser *a)
void * check_malloc(size_t n)
byte * ensure_capacity_s(byte *p, int n)
void read_program(struct analyser *a, unsigned localise_mask)
Read and analyse the program.
void write_string(struct generator *g, const char *s)
void str_append_string(struct str *str, const char *s)
void check_free(void *p)
token_codes
Definition: header.h:106
@ c_unset
Definition: header.h:127
@ c_literalstring
Definition: header.h:132
@ c_substring
Definition: header.h:126
@ c_as
Definition: header.h:115
@ c_stringescapes
Definition: header.h:126
@ c_delete
Definition: header.h:118
@ c_neg
Definition: header.h:136
@ c_setlimit
Definition: header.h:125
@ c_plus
Definition: header.h:123
@ c_set
Definition: header.h:125
@ c_booltest
Definition: header.h:139
@ c_hex
Definition: header.h:120
@ c_setmark
Definition: header.h:125
@ c_loop
Definition: header.h:121
@ c_not_booltest
Definition: header.h:145
@ c_size
Definition: header.h:125
@ c_le
Definition: header.h:110
@ c_len
Definition: header.h:121
@ c_functionend
Definition: header.h:140
@ c_for
Definition: header.h:119
@ c_comment1
Definition: header.h:117
@ c_goto
Definition: header.h:120
@ c_strings
Definition: header.h:126
@ c_gt
Definition: header.h:110
@ c_sliceto
Definition: header.h:126
@ c_and
Definition: header.h:115
@ c_externals
Definition: header.h:119
@ c_decimal
Definition: header.h:118
@ c_debug
Definition: header.h:117
@ c_booleans
Definition: header.h:117
@ c_insert
Definition: header.h:120
@ c_minus
Definition: header.h:122
@ c_leftslice
Definition: header.h:121
@ c_grouping
Definition: header.h:138
@ c_try
Definition: header.h:127
@ c_name
Definition: header.h:130
@ c_not
Definition: header.h:123
@ c_define
Definition: header.h:118
@ c_do
Definition: header.h:118
@ c_goto_grouping
Definition: header.h:141
@ c_sizeof
Definition: header.h:125
@ c_reverse
Definition: header.h:124
@ c_tolimit
Definition: header.h:127
@ c_ket
Definition: header.h:121
@ c_eq
Definition: header.h:112
@ c_hop
Definition: header.h:120
@ c_lenof
Definition: header.h:121
@ c_integers
Definition: header.h:121
@ c_multiply
Definition: header.h:122
@ c_plusassign
Definition: header.h:124
@ c_atlimit
Definition: header.h:116
@ c_maxint
Definition: header.h:122
@ c_routines
Definition: header.h:124
@ c_attach
Definition: header.h:116
@ c_true
Definition: header.h:127
@ c_gopast
Definition: header.h:120
@ c_call
Definition: header.h:137
@ c_slicefrom
Definition: header.h:125
@ c_fail
Definition: header.h:119
@ c_cursor
Definition: header.h:117
@ c_mathassign
Definition: header.h:135
@ c_ne
Definition: header.h:112
@ c_groupings
Definition: header.h:120
@ c_minint
Definition: header.h:122
@ c_gopast_non
Definition: header.h:144
@ c_lt
Definition: header.h:111
@ c_get
Definition: header.h:119
@ NUM_TOKEN_CODES
Definition: header.h:147
@ c_non
Definition: header.h:123
@ c_atmark
Definition: header.h:116
@ c_divideassign
Definition: header.h:118
@ c_comment2
Definition: header.h:117
@ c_multiplyassign
Definition: header.h:123
@ c_atleast
Definition: header.h:115
@ c_repeat
Definition: header.h:124
@ c_dollar
Definition: header.h:119
@ c_or
Definition: header.h:123
@ c_backwards
Definition: header.h:116
@ c_next
Definition: header.h:123
@ c_limit
Definition: header.h:121
@ c_ge
Definition: header.h:111
@ c_test
Definition: header.h:127
@ c_bra
Definition: header.h:117
@ c_rightslice
Definition: header.h:124
@ c_assignto
Definition: header.h:115
@ c_gopast_grouping
Definition: header.h:142
@ c_minusassign
Definition: header.h:122
@ c_divide
Definition: header.h:118
@ c_number
Definition: header.h:131
@ c_tomark
Definition: header.h:127
@ c_stringdef
Definition: header.h:126
@ c_assign
Definition: header.h:115
@ c_backwardmode
Definition: header.h:116
@ c_goto_non
Definition: header.h:143
@ c_false
Definition: header.h:119
@ c_among
Definition: header.h:115
void lose_b(symbol *p)
int peek_token(struct tokeniser *t)
byte * create_s_from_sz(const char *s)
void str_pop_n(const struct str *str, int n)
char * b_to_sz(const symbol *p)
byte * create_s(int n)
symbol * copy_b(const symbol *p)
struct str * str_new(void)
struct tokeniser * create_tokeniser(byte *b, char *file)
byte * str_data(const struct str *str)
symbol * create_b(int n)
const char * name_of_token(int code)
void write_c_relop(struct generator *g, int relop)
void generate_program_java(struct generator *g)
void write_start_comment(struct generator *g, const char *comment_start, const char *comment_end)
void generate_program_rust(struct generator *g)
int repeat_restore(struct generator *g, struct node *p)
byte * add_slen_to_s(byte *p, const char *s, int n)
byte * add_s_to_s(byte *p, const byte *s)
name_types
Definition: header.h:309
@ t_grouping
Definition: header.h:313
@ t_routine
Definition: header.h:312
@ t_boolean
Definition: header.h:312
@ t_size
Definition: header.h:310
@ t_external
Definition: header.h:312
@ t_string
Definition: header.h:312
@ t_integer
Definition: header.h:312
void generate_program_go(struct generator *g)
int tailcallable(struct generator *g, struct node *p)
struct analyser * create_analyser(struct tokeniser *t)
struct str * str_copy(const struct str *old)
string str(int value)
Convert int to std::string.
Definition: str.cc:91
Definition: header.h:256
struct amongvec * b
Definition: header.h:258
byte always_matches
Definition: header.h:265
struct node * substring
Definition: header.h:269
int command_count
Definition: header.h:261
int function_count
Definition: header.h:263
struct name * in_routine
Definition: header.h:272
int nocommand_count
Definition: header.h:262
byte used
Definition: header.h:266
struct node ** commands
Definition: header.h:270
int literalstring_count
Definition: header.h:260
int shortest_size
Definition: header.h:267
struct node * node
Definition: header.h:271
struct among * next
Definition: header.h:257
int longest_size
Definition: header.h:268
byte amongvar_needed
Definition: header.h:264
int number
Definition: header.h:259
symbol * b
Definition: header.h:246
struct node * action
Definition: header.h:248
int result
Definition: header.h:250
int function_index
Definition: header.h:252
int size
Definition: header.h:247
int i
Definition: header.h:249
int line_number
Definition: header.h:251
int among_with_function_count
Definition: header.h:336
struct name * names
Definition: header.h:321
int variable_count
Definition: header.h:333
struct among * amongs_end
Definition: header.h:335
byte int_limits_used
Definition: header.h:342
struct node * nodes
Definition: header.h:320
struct literalstring * literalstrings
Definition: header.h:322
byte modifyable
Definition: header.h:324
struct among * amongs
Definition: header.h:334
byte mode
Definition: header.h:323
struct grouping * groupings_end
Definition: header.h:338
struct grouping * groupings
Definition: header.h:337
struct tokeniser * tokeniser
Definition: header.h:319
struct node * substring
Definition: header.h:339
struct name * current_routine
Definition: header.h:340
enc encoding
Definition: header.h:341
struct node * program_end
Definition: header.h:326
byte debug_used
Definition: header.h:343
int name_count[t_size]
Definition: header.h:331
struct node * program
Definition: header.h:325
int max_label
Definition: header.h:373
char java_import_chararraysequence
Definition: header.h:395
char java_import_arrays
Definition: header.h:394
struct options * options
Definition: header.h:366
struct str * declarations
Definition: header.h:371
int keep_count
Definition: header.h:391
int unreachable
Definition: header.h:367
struct analyser * analyser
Definition: header.h:365
struct str * failure_str
Definition: header.h:377
int line_labelled
Definition: header.h:389
int var_number
Definition: header.h:369
int temporary_used
Definition: header.h:393
int copy_from_count
Definition: header.h:382
const char * S[10]
Definition: header.h:384
int debug_count
Definition: header.h:381
int failure_label
Definition: header.h:380
int next_label
Definition: header.h:372
struct str * outbuf
Definition: header.h:370
int line_count
Definition: header.h:388
int I[10]
Definition: header.h:386
int label_used
Definition: header.h:379
int literalstring_count
Definition: header.h:390
int margin
Definition: header.h:374
struct grouping * next
Definition: header.h:276
int smallest_ch
Definition: header.h:279
int line_number
Definition: header.h:281
int largest_ch
Definition: header.h:278
symbol * b
Definition: header.h:277
struct name * name
Definition: header.h:280
byte * s
Definition: header.h:102
struct include * next
Definition: header.h:101
Definition: header.h:87
int line_number
Definition: header.h:96
char * file
Definition: header.h:91
byte * p
Definition: header.h:89
struct input * next
Definition: header.h:88
int c
Definition: header.h:90
int file_owned
Definition: header.h:95
symbol * b
Definition: header.h:242
struct literalstring * next
Definition: header.h:241
Definition: header.h:79
symbol * value
Definition: header.h:82
struct m_pair * next
Definition: header.h:80
byte * name
Definition: header.h:81
Definition: header.h:215
struct node * definition
Definition: header.h:225
struct node * used
Definition: header.h:234
byte type
Definition: header.h:218
byte mode
Definition: header.h:219
int used_in_among
Definition: header.h:226
struct name * local_to
Definition: header.h:235
int references
Definition: header.h:232
byte * s
Definition: header.h:217
byte value_used
Definition: header.h:220
struct name * next
Definition: header.h:216
int among_index
Definition: header.h:236
byte initialised
Definition: header.h:221
struct grouping * grouping
Definition: header.h:233
byte used_in_definition
Definition: header.h:222
int count
Definition: header.h:230
byte among_with_function
Definition: header.h:224
byte amongvar_needed
Definition: header.h:223
int declaration_line_number
Definition: header.h:237
Definition: header.h:284
symbol * literalstring
Definition: header.h:304
byte mode
Definition: header.h:291
struct node * left
Definition: header.h:286
signed char possible_signals
Definition: header.h:301
int number
Definition: header.h:305
byte type
Definition: header.h:290
struct node * aux
Definition: header.h:287
struct name * name
Definition: header.h:303
struct node * AE
Definition: header.h:302
byte fixed_constant
Definition: header.h:297
struct node * right
Definition: header.h:289
struct node * next
Definition: header.h:285
int line_number
Definition: header.h:306
struct among * among
Definition: header.h:288
@ LANG_C
Definition: header.h:417
@ LANG_JAVASCRIPT
Definition: header.h:424
@ LANG_ADA
Definition: header.h:418
@ LANG_PASCAL
Definition: header.h:425
@ LANG_CPLUSPLUS
Definition: header.h:419
@ LANG_DART
Definition: header.h:421
@ LANG_CSHARP
Definition: header.h:420
@ LANG_PYTHON
Definition: header.h:427
@ LANG_JAVA
Definition: header.h:423
@ LANG_GO
Definition: header.h:422
@ LANG_RUST
Definition: header.h:428
@ LANG_PHP
Definition: header.h:426
struct include * includes_end
Definition: header.h:441
FILE * output_h
Definition: header.h:412
byte syntax_tree
Definition: header.h:413
const char * package
Definition: header.h:436
byte * output_leaf
Definition: header.h:407
const char * among_class
Definition: header.h:439
byte * output_file
Definition: header.h:405
const char * runtime_path
Definition: header.h:434
FILE * output_src
Definition: header.h:411
const char * parent_class_name
Definition: header.h:435
byte comments
Definition: header.h:414
byte * extension
Definition: header.h:409
byte * name
Definition: header.h:410
enum options::@16 target_lang
const char * string_class
Definition: header.h:438
const char * externals_prefix
Definition: header.h:430
const char * go_snowball_runtime
Definition: header.h:437
const char * variables_prefix
Definition: header.h:431
const char * cheader
Definition: header.h:432
struct include * includes
Definition: header.h:440
enc encoding
Definition: header.h:415
const char * hheader
Definition: header.h:433
struct include * includes
Definition: header.h:188
byte token_held
Definition: header.h:184
char token_disabled[NUM_TOKEN_CODES]
Definition: header.h:197
int get_depth
Definition: header.h:180
int token
Definition: header.h:182
byte * s
Definition: header.h:171
int file_owned
Definition: header.h:165
byte * p
Definition: header.h:159
struct input * next
Definition: header.h:158
int c
Definition: header.h:160
struct m_pair * m_pairs
Definition: header.h:178
int previous_token
Definition: header.h:183
byte token_reported_as_unexpected
Definition: header.h:185
int uplusmode
Definition: header.h:195
char * file
Definition: header.h:161
symbol * b
Definition: header.h:169
int error_count
Definition: header.h:181
int m_start
Definition: header.h:174
int number
Definition: header.h:172
enc encoding
Definition: header.h:186
int m_end
Definition: header.h:176
int line_number
Definition: header.h:166