Lines Matching defs:symbol

120 struct symbol {
121 char *name; /* Name of the symbol */
122 int index; /* Index number for this symbol */
128 struct symbol *fallback; /* fallback token in case this token doesn't parse */
136 char *firstset; /* First-set for all rules of this symbol */
138 char *destructor; /* Code which executes whenever this symbol is
151 struct symbol *lhs; /* Left-hand side of the rule */
155 struct symbol **rhs; /* The RHS symbols */
156 char **rhsalias; /* An alias for each RHS symbol (NULL if none) */
159 struct symbol *precsym; /* Precedence symbol for this rule */
188 struct symbol *sp; /* The look-ahead symbol */
239 struct symbol **symbols; /* Sorted array of pointers to symbols */
241 struct symbol *errsym; /* The error symbol */
246 char *start; /* Name of the start symbol for the grammar */
302 struct symbol *Symbol_new();
303 int Symbolcmpp(/* struct symbol **, struct symbol ** */);
305 int Symbol_insert(/* struct symbol *, char * */);
306 struct symbol *Symbol_find(/* char * */);
307 struct symbol *Symbol_Nth(/* int */);
309 struct symbol **Symbol_arrayof(/* */);
379 struct symbol *sp;
575 /* Find a precedence symbol of every rule in the grammar.
577 ** Those rules which have a precedence symbol coded in the input
578 ** grammar using the "[symbol]" construct will already have the
580 ** symbol the first RHS symbol with a defined precedence. If there
582 ** symbol field is left blank.
638 struct symbol *s1, *s2;
667 struct symbol *sp;
672 /* Find the start symbol */
677 "The specified start symbol \"%s\" is not \
679 symbol instead.",lemp->start,lemp->rule->lhs->name);
687 /* Make sure the start symbol doesn't occur on the right-hand side of
689 ** start symbol in this case.) */
695 "The start symbol \"%s\" occurs on the \
704 ** is all rules which have the start symbol as their
775 struct symbol *sp; /* Symbol following the dot in configuration "cfp" */
776 struct symbol *bsp; /* Symbol following the dot in configuration "bcfp" */
790 /* For every configuration in the state "stp" which has the symbol "sp"
792 ** construction but with the dot shifted one symbol to the right. */
796 bsp = bcfp->rp->rhs[bcfp->dot]; /* Get symbol after dot */
808 ** on the symbol "sp" */
895 struct symbol *sp;
909 ** rule "cfp->rp" if the lookahead symbol is "lemp->symbols[j]" */
976 struct symbol *errsym; /* The error symbol (if defined. NULL otherwise) */
978 struct symbol *spx, *spy;
1150 struct symbol *sp, *xsp;
1386 qsort(lem.symbols,lem.nsymbol+1,sizeof(struct symbol*),
1886 struct symbol *fallback; /* The fallback token */
1887 struct symbol *lhs; /* Left-hand side of current rule */
1890 struct symbol *rhs[MAXRHS]; /* RHS symbols */
1891 char *alias[MAXRHS]; /* Aliases for each RHS symbol (or NULL) */
1954 "The precedence symbol must be a terminal.");
1985 "Expected to see a \":\" following the LHS symbol \"%s\".",
2028 sizeof(struct symbol*)*psp->nrhs + sizeof(char*)*psp->nrhs );
2037 rp->rhs = (struct symbol**)&rp[1];
2064 "Too many symbol on RHS or rule beginning at \"%s\".",
2088 "\"%s\" is not a valid alias for the RHS symbol \"%s\"\n",
2187 struct symbol *sp = Symbol_new(x);
2200 struct symbol *sp = Symbol_new(x);
2210 struct symbol *sp;
2254 struct symbol *sp = Symbol_new(x);
2542 struct symbol *sp;
2867 ** symbol sp
2871 struct symbol *sp;
2907 ** Return TRUE (non-zero) if the given symbol has a destructor.
2910 struct symbol *sp;
3008 ** symbol.
3035 struct symbol *sp = lemp->symbols[i];
3046 /* Build a hash table of datatypes. The ".dtnum" field of each symbol
3053 struct symbol *sp = lemp->symbols[i];
3438 struct symbol *p = lemp->symbols[i];
3450 /* Generate a table containing the symbolic name of every symbol
3472 /* Generate code which executes every time a symbol is popped from
3478 struct symbol *sp = lemp->symbols[i];
3489 struct symbol *sp = lemp->symbols[i];
3496 struct symbol *dflt_sp = 0;
3498 struct symbol *sp = lemp->symbols[i];
3861 /* Return a pointer to the (terminal or nonterminal) symbol "x".
3862 ** Create a new symbol if this is the first time "x" has been seen.
3864 struct symbol *Symbol_new(x)
3867 struct symbol *sp;
3871 sp = (struct symbol *)malloc( sizeof(struct symbol) );
3898 int Symbolcmpp(struct symbol **a, struct symbol **b){
3920 struct symbol *data; /* The data */
3951 struct symbol *data;
4010 struct symbol *Symbol_find(key)
4027 struct symbol *Symbol_Nth(n)
4030 struct symbol *data;
4048 struct symbol **Symbol_arrayof()
4050 struct symbol **array;
4054 array = (struct symbol **)malloc( sizeof(struct symbol *)*size );