Lines Matching refs:term

77  *	_read_next_term			% top term or right arg of infix/prefix
96 * annotated term instead of the plain parsed term. In an annotated
97 * term, every subterm is wrapped into a annotated_term/4 structure:
100 * term, % var,atomic,compound
101 * type, % term type (see below)
105 * The type field describes the type of the parsed term and is one of
113 * string term is a string or a char_code list
114 * anonymous term is an anonymous variable
115 * var(NameAtom) term is a variable with the given name
116 * compound term is compound (with annotated subterms)
118 * In the case of atomic terms and variables, the term field simply
119 * contains the plain parsed term. For compound terms, the term field
120 * contains a structure whose functor is the functor of the plain term,
121 * but whose arguments are annotated versions of the plain term arguments.
122 * E.g. the source term
127 * The source term
138 * The source term
153 * The from/to fields of an annotated term describe a "source position"
154 * of the term. Every term/subterm is represented by one (sometimes two
176 * Note that the | and ] tokens do not represent any term.
194 * The source position of a term is the union of the source positions of
257 int macro; /* term may contain a macro */
319 * The *_TERMINATES flags mean that COMMA/BAR terminate a term
322 * The SUBSCRIPTABLE flag means the term may be followed by a subscript.
327 #define SUBSCRIPTABLE 0x04 /* term can be followed by subscript */
331 #define ATTRIBUTABLE 0x40 /* term can be followed by attributes */
355 pd->prev_token.string = TempAlloc(pd->string_store, pd->token.term.val.nint + 1); \
356 Copy_Bytes(pd->prev_token.string, pd->token.string, pd->token.term.val.nint + 1); \
363 pd->next_token.string = TempAlloc(pd->string_store, pd->token.term.val.nint + 1); \
364 Copy_Bytes(pd->next_token.string, pd->token.string, pd->token.term.val.nint + 1); \
369 #define IsChar(pd,char) ((pd)->token.term.val.nint == (char))
376 (pd->token.term.val.nint)
389 pd->token.term.val.nint = (l); \
394 * While parsing the term, we check whether we come across any items that
396 * If any, we do a macro-expansion pass over the term after it has been parsed.
410 * into a term descriptor, if requested.
548 tag_desc[tag_desc[TagType(pd->token.term.tag)].super].type_name,\
550 Flag_Type_Macro(pd, TagType(pd->token.term.tag)); \
551 if (IsInterval(pd->token.term.tag)) { \
552 Unmark_Interval_Raw(pd->token.term.val.ptr); \
553 if (!GoodInterval(pd->token.term.val.ptr)) \
556 *_pw = pd->token.term; \
644 * not start a term. This is used to disambiguate between infix and postfix:
678 * still be able to parse the term by ignoring the prefix-property and
685 * Conservative check for tokens that can start but not follow a term
739 * A functor-term CAN follow the prefix
765 * and NEXT is a token that can't follow a complete term, this
1013 * Parse a toplevel term, a subterm, or a right argument of prefix/infix
1023 pword term;
1052 /* a compound term in canonical functor notation */
1055 status = _read_struct(pd, name, length, &term, &pos);
1057 *result = term;
1065 Build_Struct(&term, pw, d_.with2, pd->token.pos);
1078 *result = term;
1098 tag_desc[pd->token.term.tag.kernel].arith_op[ARITH_CHGSIGN]
1099 (pd->token.term.val, &pd->token.term);
1127 Build_Struct(&term, pw, OpiDid(pre_op), pos);
1130 *result = term;
1143 Build_Struct_Or_List(&term, pw, OpiDid(pre_op), pos);
1148 *result = term;
1167 Build_Atom_Or_Nil(&term, did0, pos);
1168 *result = term;
1175 Build_Number_From_Token(pd, &term);
1177 *result = term;
1182 Build_String_From_Token(pd, &term);
1184 *result = term;
1190 _build_list_from_token(pd, &term);
1192 *result = term;
1226 Build_Struct(&term, pw, d_.apply2, pd->token.pos);
1231 *result = term;
1252 status = _read_list(pd, &term, &pos);
1255 *result = term;
1262 status = _read_next_term(pd, 1200, 0, &term);
1269 Move_Pword(&term, result); /* could be a self-ref! */
1284 /* term in curly brackets: parse as {}/1 structure */
1286 Build_Struct(&term, pw, d_.nilcurbr1, pos);
1304 *result = term;
1332 * Parse what can follow a complete term, i.e.
1343 pword term;
1374 Build_Struct_Or_List(&term, pw, OpiDid(in_op), pd->token.pos);
1383 *result = term; lterm_prec = oprec;
1401 Build_Struct(&term, pw, OpiDid(post_op), pd->token.pos);
1408 *result = term; lterm_prec = oprec;
1443 Build_Struct(&term, pw, d_.subscript, pd->token.pos);
1450 *result = term; lterm_prec = 0;
1458 Build_Struct(&term, pw, d_.with_attributes2, pd->token.pos);
1464 *result = term; lterm_prec = 0;
1507 * The toplevel parser procedure. It reads one term from the given stream
1515 pword *result, /* where to store the parsed term */
1517 int *has_macro, /* flag that the term may contain (clause or
1598 TG = old_tg; /* pop (possibly incomplete) constructed term */
1633 * reads a term from the current input
1707 * reads a term from the current input, unifies with with the
1881 do_trafo(pword *term) /* goal to call */
1889 v1.ptr = term;
1912 trafo_term(dident tr_did, /* the functor of the term to transform */
2064 * the constructed term (ATTR_IO_TERM_SIZE pwords at top).
2068 transf_meta_out(value val, /* attribute term to transform */
2070 pword *top, /* where to build the the resulting term */
2074 /* by default, return the untransformed term */