Lines Matching refs:at

41 	struct expression *ex, *at;
52 at = *last_p;
53 if (at == NULL) {
58 at->next = ex;
59 ex->prev = at;
97 /* We are at x + y +
213 struct expression *at, *ex;
224 at = frm->prev;
225 if (at == *beg) {
226 /* We are inserting at the head of the list */
228 ex->next = at;
229 at->prev = ex;
232 } else if ((at->type == TYPE_VALUE_CON) ||
233 (at->type == TYPE_VALUE_PMC)) {
236 ex->prev = at->prev;
238 ex->next = at;
239 at->prev = ex;
241 } else if (at->type == TYPE_PARN_CLOSE) {
245 at = at->prev;
247 if (at->type == TYPE_PARN_CLOSE) {
249 } else if (at->type == TYPE_PARN_OPEN) {
255 at = at->prev;
257 if (at == *beg) {
265 __FUNCTION__, at->type);
273 struct expression *at, *ex;
284 at = frm->next;
285 if ((at->type == TYPE_VALUE_CON) ||
286 (at->type == TYPE_VALUE_PMC)) {
289 ex->next = at->next;
290 ex->prev = at;
291 at->next = ex;
293 } else if (at->type == TYPE_PARN_OPEN) {
295 at = at->next;
297 if (at->type == TYPE_PARN_OPEN) {
299 } else if (at->type == TYPE_PARN_CLOSE) {
305 at = at->next;
311 at->type);
326 struct expression *at, *newone;
329 at = start;
331 while(at != end) {
332 if (at->type == TYPE_PARN_OPEN) {
335 if (at->type == TYPE_PARN_CLOSE) {
339 if ((at->type == TYPE_OP_MULT) ||
340 (at->type == TYPE_OP_DIVIDE)) {
341 walk_back_and_insert_paren(beg, at);
342 walk_fwd_and_insert_paren(at, &newone);
343 at = newone->next;
347 at = at->next;
355 struct expression *at, *start, *end;
362 start = at = exp;
364 while(at) {
365 if (at->type == TYPE_PARN_CLOSE) {
368 *stopped = at;
376 if (at->type == TYPE_PARN_OPEN) {
377 set_math_precidence(beg, at->next, &end);
378 at = end;
380 } else if ((at->type == TYPE_OP_PLUS) ||
381 (at->type == TYPE_OP_MINUS)) {
383 } else if ((at->type == TYPE_OP_DIVIDE) ||
384 (at->type == TYPE_OP_MULT)) {
387 at = at->next;
398 pmc_name_set(struct expression *at)
402 if (at->name[0] == '%') {
404 idx = strtol(&at->name[1], NULL, 0);
407 at->name, valid_pmc_cnt);
410 strcpy(at->name, valid_pmcs[idx]);
413 if (strcmp(valid_pmcs[i], at->name) == 0) {
420 at->name);
429 struct expression *exp=NULL, *last=NULL, *at;
474 at = alloc_and_hook_expr(&exp, &last);
475 at->type = TYPE_PARN_OPEN;
477 at = alloc_and_hook_expr(&exp, &last);
478 at->type = TYPE_PARN_CLOSE;
486 at = alloc_and_hook_expr(&exp, &last);
487 at->type = TYPE_OP_PLUS;
489 at = alloc_and_hook_expr(&exp, &last);
490 at->type = TYPE_OP_MINUS;
492 at = alloc_and_hook_expr(&exp, &last);
493 at->type = TYPE_OP_DIVIDE;
495 at = alloc_and_hook_expr(&exp, &last);
496 at->type = TYPE_OP_MULT;
499 at = alloc_and_hook_expr(&exp, &last);
501 at->type = TYPE_VALUE_CON;
503 at->type = TYPE_VALUE_PMC;
512 at->name[x] = str[i];
515 if (x >=(sizeof(at->name)-1)) {
517 (int)x, (int)(sizeof(at->name)-1));
528 if (at->type == TYPE_VALUE_CON) {
529 at->state = STATE_FILLED;
530 at->value = strtod(at->name, NULL);
532 pmc_name_set(at);
675 struct expression *at;
679 for(at = exp; at != NULL; at = at->next) {
680 if (at->type == TYPE_VALUE_PMC) {
681 at->state = STATE_UNSET;
685 for(at = exp; at != NULL; at = at->next) {
686 if (at->type == TYPE_VALUE_PMC) {
687 at->value = (random() * 1.0);
688 at->state = STATE_FILLED;
689 if (at->value == 0.0) {
691 at->value = 1.0;