• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/lighttpd-1.4.39/src/

Lines Matching refs:psp

1936 static void parseonetoken(psp)
1937 struct pstate *psp;
1940 x = Strsafe(psp->tokenstart); /* Save the token permanently */
1942 printf("%s:%d: Token=[%s] state=%d\n",psp->filename,psp->tokenlineno,
1943 x,psp->state);
1945 switch( psp->state ){
1947 psp->prevrule = 0;
1948 psp->preccounter = 0;
1949 psp->firstrule = psp->lastrule = 0;
1950 psp->gp->nrule = 0;
1954 psp->state = WAITING_FOR_DECL_KEYWORD;
1956 psp->lhs = Symbol_new(x);
1957 psp->nrhs = 0;
1958 psp->lhsalias = 0;
1959 psp->state = WAITING_FOR_ARROW;
1961 if( psp->prevrule==0 ){
1962 ErrorMsg(psp->filename,psp->tokenlineno,
1965 psp->errorcnt++;
1966 }else if( psp->prevrule->code!=0 ){
1967 ErrorMsg(psp->filename,psp->tokenlineno,
1970 psp->errorcnt++;
1972 psp->prevrule->line = psp->tokenlineno;
1973 psp->prevrule->code = &x[1];
1976 psp->state = PRECEDENCE_MARK_1;
1978 ErrorMsg(psp->filename,psp->tokenlineno,
1981 psp->errorcnt++;
1986 ErrorMsg(psp->filename,psp->tokenlineno,
1988 psp->errorcnt++;
1989 }else if( psp->prevrule==0 ){
1990 ErrorMsg(psp->filename,psp->tokenlineno,
1992 psp->errorcnt++;
1993 }else if( psp->prevrule->precsym!=0 ){
1994 ErrorMsg(psp->filename,psp->tokenlineno,
1997 psp->errorcnt++;
1999 psp->prevrule->precsym = Symbol_new(x);
2001 psp->state = PRECEDENCE_MARK_2;
2005 ErrorMsg(psp->filename,psp->tokenlineno,
2007 psp->errorcnt++;
2009 psp->state = WAITING_FOR_DECL_OR_RULE;
2013 psp->state = IN_RHS;
2015 psp->state = LHS_ALIAS_1;
2017 ErrorMsg(psp->filename,psp->tokenlineno,
2019 psp->lhs->name);
2020 psp->errorcnt++;
2021 psp->state = RESYNC_AFTER_RULE_ERROR;
2026 psp->lhsalias = x;
2027 psp->state = LHS_ALIAS_2;
2029 ErrorMsg(psp->filename,psp->tokenlineno,
2031 x,psp->lhs->name);
2032 psp->errorcnt++;
2033 psp->state = RESYNC_AFTER_RULE_ERROR;
2038 psp->state = LHS_ALIAS_3;
2040 ErrorMsg(psp->filename,psp->tokenlineno,
2041 "Missing \")\" following LHS alias name \"%s\".",psp->lhsalias);
2042 psp->errorcnt++;
2043 psp->state = RESYNC_AFTER_RULE_ERROR;
2048 psp->state = IN_RHS;
2050 ErrorMsg(psp->filename,psp->tokenlineno,
2052 psp->lhs->name,psp->lhsalias);
2053 psp->errorcnt++;
2054 psp->state = RESYNC_AFTER_RULE_ERROR;
2061 sizeof(struct symbol*)*psp->nrhs + sizeof(char*)*psp->nrhs );
2063 ErrorMsg(psp->filename,psp->tokenlineno,
2065 psp->errorcnt++;
2066 psp->prevrule = 0;
2069 rp->ruleline = psp->tokenlineno;
2071 rp->rhsalias = (char**)&(rp->rhs[psp->nrhs]);
2072 for(i=0; i<psp->nrhs; i++){
2073 rp->rhs[i] = psp->rhs[i];
2074 rp->rhsalias[i] = psp->alias[i];
2076 rp->lhs = psp->lhs;
2077 rp->lhsalias = psp->lhsalias;
2078 rp->nrhs = psp->nrhs;
2081 rp->index = psp->gp->nrule++;
2085 if( psp->firstrule==0 ){
2086 psp->firstrule = psp->lastrule = rp;
2088 psp->lastrule->next = rp;
2089 psp->lastrule = rp;
2091 psp->prevrule = rp;
2093 psp->state = WAITING_FOR_DECL_OR_RULE;
2095 if( psp->nrhs>=MAXRHS ){
2096 ErrorMsg(psp->filename,psp->tokenlineno,
2099 psp->errorcnt++;
2100 psp->state = RESYNC_AFTER_RULE_ERROR;
2102 psp->rhs[psp->nrhs] = Symbol_new(x);
2103 psp->alias[psp->nrhs] = 0;
2104 psp->nrhs++;
2106 }else if( x[0]=='(' && psp->nrhs>0 ){
2107 psp->state = RHS_ALIAS_1;
2109 ErrorMsg(psp->filename,psp->tokenlineno,
2111 psp->errorcnt++;
2112 psp->state = RESYNC_AFTER_RULE_ERROR;
2117 psp->alias[psp->nrhs-1] = x;
2118 psp->state = RHS_ALIAS_2;
2120 ErrorMsg(psp->filename,psp->tokenlineno,
2122 x,psp->rhs[psp->nrhs-1]->name);
2123 psp->errorcnt++;
2124 psp->state = RESYNC_AFTER_RULE_ERROR;
2129 psp->state = IN_RHS;
2131 ErrorMsg(psp->filename,psp->tokenlineno,
2132 "Missing \")\" following LHS alias name \"%s\".",psp->lhsalias);
2133 psp->errorcnt++;
2134 psp->state = RESYNC_AFTER_RULE_ERROR;
2139 psp->declkeyword = x;
2140 psp->declargslot = 0;
2141 psp->decllnslot = 0;
2142 psp->state = WAITING_FOR_DECL_ARG;
2144 psp->declargslot = &(psp->gp->name);
2146 psp->declargslot = &(psp->gp->include);
2147 psp->decllnslot = &psp->gp->includeln;
2149 psp->declargslot = &(psp->gp->extracode);
2150 psp->decllnslot = &psp->gp->extracodeln;
2152 psp->declargslot = &psp->gp->tokendest;
2153 psp->decllnslot = &psp->gp->tokendestln;
2155 psp->declargslot = &psp->gp->vardest;
2156 psp->decllnslot = &psp->gp->vardestln;
2158 psp->declargslot = &psp->gp->tokenprefix;
2160 psp->declargslot = &(psp->gp->error);
2161 psp->decllnslot = &psp->gp->errorln;
2163 psp->declargslot = &(psp->gp->accept);
2164 psp->decllnslot = &psp->gp->acceptln;
2166 psp->declargslot = &(psp->gp->failure);
2167 psp->decllnslot = &psp->gp->failureln;
2169 psp->declargslot = &(psp->gp->overflow);
2170 psp->decllnslot = &psp->gp->overflowln;
2172 psp->declargslot = &(psp->gp->arg);
2174 psp->declargslot = &(psp->gp->tokentype);
2176 psp->declargslot = &(psp->gp->vartype);
2178 psp->declargslot = &(psp->gp->stacksize);
2180 psp->declargslot = &(psp->gp->start);
2182 psp->preccounter++;
2183 psp->declassoc = LEFT;
2184 psp->state = WAITING_FOR_PRECEDENCE_SYMBOL;
2186 psp->preccounter++;
2187 psp->declassoc = RIGHT;
2188 psp->state = WAITING_FOR_PRECEDENCE_SYMBOL;
2190 psp->preccounter++;
2191 psp->declassoc = NONE;
2192 psp->state = WAITING_FOR_PRECEDENCE_SYMBOL;
2194 psp->state = WAITING_FOR_DESTRUCTOR_SYMBOL;
2196 psp->state = WAITING_FOR_DATATYPE_SYMBOL;
2198 psp->fallback = 0;
2199 psp->state = WAITING_FOR_FALLBACK_ID;
2201 ErrorMsg(psp->filename,psp->tokenlineno,
2203 psp->errorcnt++;
2204 psp->state = RESYNC_AFTER_DECL_ERROR;
2207 ErrorMsg(psp->filename,psp->tokenlineno,
2209 psp->errorcnt++;
2210 psp->state = RESYNC_AFTER_DECL_ERROR;
2215 ErrorMsg(psp->filename,psp->tokenlineno,
2217 psp->errorcnt++;
2218 psp->state = RESYNC_AFTER_DECL_ERROR;
2221 psp->declargslot = &sp->destructor;
2222 psp->decllnslot = &sp->destructorln;
2223 psp->state = WAITING_FOR_DECL_ARG;
2228 ErrorMsg(psp->filename,psp->tokenlineno,
2230 psp->errorcnt++;
2231 psp->state = RESYNC_AFTER_DECL_ERROR;
2234 psp->declargslot = &sp->datatype;
2235 psp->decllnslot = 0;
2236 psp->state = WAITING_FOR_DECL_ARG;
2241 psp->state = WAITING_FOR_DECL_OR_RULE;
2246 ErrorMsg(psp->filename,psp->tokenlineno,
2248 psp->errorcnt++;
2250 sp->prec = psp->preccounter;
2251 sp->assoc = psp->declassoc;
2254 ErrorMsg(psp->filename,psp->tokenlineno,
2256 psp->errorcnt++;
2261 if( *(psp->declargslot)!=0 ){
2262 ErrorMsg(psp->filename,psp->tokenlineno,
2264 x[0]=='\"' ? &x[1] : x,psp->declkeyword);
2265 psp->errorcnt++;
2266 psp->state = RESYNC_AFTER_DECL_ERROR;
2268 *(psp->declargslot) = (x[0]=='\"' || x[0]=='{') ? &x[1] : x;
2269 if( psp->decllnslot ) *psp->decllnslot = psp->tokenlineno;
2270 psp->state = WAITING_FOR_DECL_OR_RULE;
2273 ErrorMsg(psp->filename,psp->tokenlineno,
2274 "Illegal argument to %%%s: %s",psp->declkeyword,x);
2275 psp->errorcnt++;
2276 psp->state = RESYNC_AFTER_DECL_ERROR;
2281 psp->state = WAITING_FOR_DECL_OR_RULE;
2283 ErrorMsg(psp->filename, psp->tokenlineno,
2285 psp->errorcnt++;
2288 if( psp->fallback==0 ){
2289 psp->fallback = sp;
2291 ErrorMsg(psp->filename, psp->tokenlineno,
2293 psp->errorcnt++;
2295 sp->fallback = psp->fallback;
2296 psp->gp->has_fallback = 1;
2301 /* if( x[0]=='.' ) psp->state = WAITING_FOR_DECL_OR_RULE;
2304 if( x[0]=='.' ) psp->state = WAITING_FOR_DECL_OR_RULE;
2305 if( x[0]=='%' ) psp->state = WAITING_FOR_DECL_KEYWORD;