Lines Matching +full:se +full:- +full:neg

85  *			conditional directives are well-balanced.
98 * Or -> And ('||' And)*
99 * And -> Term ('&&' Term)*
100 * Term -> Function '(' Argument ')'
101 * Term -> Leaf Operator Leaf
102 * Term -> Leaf
103 * Term -> '(' Or ')'
104 * Term -> '!' Term
105 * Leaf -> "string"
106 * Leaf -> Number
107 * Leaf -> VariableExpression
108 * Leaf -> BareWord
109 * Operator -> '==' | '!=' | '>' | '<' | '>=' | '<='
150 * Whether the left-hand side of a comparison may be an unquoted
155 * make cannot know anymore whether the left-hand side had originally
158 * In conditional directives like '.if', the left-hand side must
164 Token curr; /* Single push-back token used in parsing */
199 cpp_skip_whitespace(&par->p); in CondParser_SkipWhitespace()
204 * embedded expressions. Used for the argument of a built-in function as
233 else if (ch == ')' && --depth < 0) in ParseWord()
265 (int)(argEnd - argStart), argStart, len, func); in ParseFuncArg()
266 par->printedError = true; in ParseFuncArg()
289 for (ln = opts.create.first; ln != NULL; ln = ln->next) { in FuncMake()
290 StrMatchResult res = Str_Match(ln->datum, targetPattern); in FuncMake()
335 !Lst_IsEmpty(&gn->commands); in FuncCommands()
340 * base-10 integer, base-16 integer and finite floating point numbers.
357 *out_value = str[0] == '-' ? -(double)-ul_val : (double)ul_val; in TryParseNumber()
399 p = par->p; in CondParser_StringExpr()
403 if (inout_str->str == var_Error) { in CondParser_StringExpr()
408 par->p = p; in CondParser_StringExpr()
410 if (atStart && is_separator(par->p[0])) in CondParser_StringExpr()
413 Buf_AddStr(buf, inout_str->str); in CondParser_StringExpr()
421 * on the left-hand and right-hand sides of comparisons.
437 *out_quoted = quoted = par->p[0] == '"'; in CondParser_Leaf()
438 start = par->p; in CondParser_Leaf()
440 par->p++; in CondParser_Leaf()
442 while (par->p[0] != '\0' && str.str == NULL) { in CondParser_Leaf()
443 switch (par->p[0]) { in CondParser_Leaf()
445 par->p++; in CondParser_Leaf()
446 if (par->p[0] != '\0') { in CondParser_Leaf()
447 Buf_AddByte(&buf, par->p[0]); in CondParser_Leaf()
448 par->p++; in CondParser_Leaf()
452 par->p++; in CondParser_Leaf()
466 Buf_AddByte(&buf, par->p[0]); in CondParser_Leaf()
467 par->p++; in CondParser_Leaf()
480 Buf_AddByte(&buf, par->p[0]); in CondParser_Leaf()
481 par->p++; in CondParser_Leaf()
506 if (par->plain) in EvalTruthy()
508 return par->evalBare(value) != par->negateEvalBare; in EvalTruthy()
542 par->printedError = true; in EvalCompareStr()
567 const char *p = par->p; in CondParser_ComparisonOp()
570 return par->p += 2, *out_op = LE, true; in CondParser_ComparisonOp()
572 return par->p += 1, *out_op = LT, true; in CondParser_ComparisonOp()
574 return par->p += 2, *out_op = GE, true; in CondParser_ComparisonOp()
576 return par->p += 1, *out_op = GT, true; in CondParser_ComparisonOp()
578 return par->p += 2, *out_op = EQ, true; in CondParser_ComparisonOp()
580 return par->p += 2, *out_op = NE, true; in CondParser_ComparisonOp()
600 lhs = CondParser_Leaf(par, doEval, par->leftUnquotedOK, &lhsQuoted); in CondParser_Comparison()
613 if (par->p[0] == '\0') { in CondParser_Comparison()
615 "Missing right-hand side of operator '%s'", opname[op]); in CondParser_Comparison()
616 par->printedError = true; in CondParser_Comparison()
638 const char *p = par->p; in CondParser_FuncCallEmpty()
649 p--; /* Make p[1] point to the '('. */ in CondParser_FuncCallEmpty()
662 par->p = p; in CondParser_FuncCallEmpty()
671 const char *p = par->p; in CondParser_FuncCall()
697 par->p = p; in CondParser_FuncCall()
715 p = par->p; in CondParser_ComparisonOrLeaf()
716 if (ch_isdigit(p[0]) || p[0] == '-' || p[0] == '+') in CondParser_ComparisonOrLeaf()
724 * syntax would be invalid if we did "defined(a)" - so instead treat in CondParser_ComparisonOrLeaf()
729 * see cond-token-plain.mk, keyword 'twice'. in CondParser_ComparisonOrLeaf()
739 par->p = p; in CondParser_ComparisonOrLeaf()
745 * be empty - even if it contained an expression. in CondParser_ComparisonOrLeaf()
747 t = ToToken(doEval && par->evalBare(arg) != par->negateEvalBare); in CondParser_ComparisonOrLeaf()
758 t = par->curr; in CondParser_Token()
760 par->curr = TOK_NONE; in CondParser_Token()
764 cpp_skip_hspace(&par->p); in CondParser_Token()
766 switch (par->p[0]) { in CondParser_Token()
769 par->p++; in CondParser_Token()
773 par->p++; in CondParser_Token()
777 par->p++; in CondParser_Token()
778 if (par->p[0] == '|') in CondParser_Token()
779 par->p++; in CondParser_Token()
782 par->printedError = true; in CondParser_Token()
788 par->p++; in CondParser_Token()
789 if (par->p[0] == '&') in CondParser_Token()
790 par->p++; in CondParser_Token()
793 par->printedError = true; in CondParser_Token()
799 par->p++; in CondParser_Token()
802 case '#': /* XXX: see unit-tests/cond-token-plain.mk */ in CondParser_Token()
804 /* Probably obsolete now, from 1993-03-21. */ in CondParser_Token()
831 assert(par->curr == TOK_NONE); in CondParser_Skip()
833 par->curr = actual; in CondParser_Skip()
838 * Term -> '(' Or ')'
839 * Term -> '!' Term
840 * Term -> Leaf Operator Leaf
841 * Term -> Leaf
848 bool neg = false; in CondParser_Term() local
851 neg = !neg; in CondParser_Term()
854 return neg == (t == TOK_FALSE) ? CR_TRUE : CR_FALSE; in CondParser_Term()
862 return neg == (res == CR_FALSE) ? CR_TRUE : CR_FALSE; in CondParser_Term()
869 * And -> Term ('&&' Term)*
890 * Or -> And ('||' And)*
1071 Parse_Error(PARSE_FATAL, "if-less endif"); in Cond_EvalLine()
1076 cond_depth--; in Cond_EvalLine()
1089 if (strncmp(p, "se", 2) == 0 && !ch_isalpha(p[2])) { in Cond_EvalLine()
1096 Parse_Error(PARSE_FATAL, "if-less else"); in Cond_EvalLine()
1127 Parse_Error(PARSE_FATAL, "if-less elif"); in Cond_EvalLine()
1190 /* Extracts the multiple-inclusion guard from a conditional, if any. */
1217 guard->kind = GK_TARGET; in Cond_ExtractGuard()
1218 guard->name = ParseWord(&arg_p, true); in Cond_ExtractGuard()
1230 guard->kind = GK_VARIABLE; in Cond_ExtractGuard()
1231 guard->name = bmake_strsedup(varname, p); in Cond_ExtractGuard()
1238 unsigned int open_conds = cond_depth - CurFile_CondMinDepth(); in Cond_EndFile()