Lines Matching refs:s

1099         for s in self.syms.values():
1100 self._finalize_sym(s)
1959 def eval_string(self, s): argument
1984 self._tokens = self._tokenize("if " + s)
1986 self._line = s
2338 def _tokenize(self, s): argument
2350 self._line = s # Used for error reporting
2353 match = _command_match(s)
2355 if s.isspace() or s.lstrip().startswith("#"):
2368 if s.strip(" \t\n-") == "help":
2374 self._parse_assignment(s)
2382 while i < len(s):
2385 match = _id_keyword_match(s, i)
2408 name, s, i = self._expand_name(s, i)
2441 c = s[i]
2444 if "$" not in s and "\\" not in s:
2447 end_i = s.find(c, i + 1) + 1
2450 val = s[i + 1:end_i - 1]
2454 s, end_i = self._expand_str(s, i)
2463 val = expandvars(s[i + 1:end_i - 1]
2476 elif s.startswith("&&", i):
2480 elif s.startswith("||", i):
2488 elif s.startswith("!=", i):
2510 elif s.startswith("<=", i):
2518 elif s.startswith(">=", i):
2532 while i < len(s) and s[i].isspace():
2602 def _parse_assignment(self, s): argument
2609 s = s.lstrip()
2612 i = _assignment_lhs_fragment_match(s, i).end()
2613 if s.startswith("$(", i):
2614 s, i = self._expand_macro(s, i, ())
2618 if s.isspace():
2624 name = s[:i]
2628 rhs_match = _assignment_rhs_match(s, i)
2663 def _expand_whole(self, s, args): argument
2672 i = s.find("$(", i)
2675 s, i = self._expand_macro(s, i, args)
2676 return s
2678 def _expand_name(self, s, i): argument
2685 s, end_i = self._expand_name_iter(s, i)
2686 name = s[i:end_i]
2694 while end_i < len(s) and s[end_i].isspace():
2697 return name, s, end_i
2699 def _expand_name_iter(self, s, i): argument
2706 match = _name_special_search(s, i)
2709 return (s, match.start())
2710 s, i = self._expand_macro(s, match.start(), ())
2712 def _expand_str(self, s, i): argument
2719 quote = s[i]
2722 match = _string_special_search(s, i)
2729 return (s, match.end())
2735 s = s[:match.start()] + s[i:]
2739 s, i = self._expand_macro(s, match.start(), ())
2745 def _expand_macro(self, s, i, args): argument
2753 res = s[:i]
2761 match = _macro_special_search(s, i)
2778 new_args.append(s[arg_start:match.start()])
2792 return (res + s[match.end():], len(res))
2800 new_args.append(s[arg_start:match.start()])
2805 s, i = self._expand_macro(s, match.start(), args)
3967 def is_num(s): argument
3978 int(s)
3980 if not s.startswith(("0x", "0X")):
3984 int(s, 16)
4715 return [s for node in self.nodes for s in node.orig_selects]
5770 s = "menu node for choice"
5772 s += " " + self.item.name
5773 add(s)
5835 s = '{} "{}"'.format("menu" if self.item is MENU else "comment",
5839 s += "\n\tdepends on {}".format(expr_str(self.dep, sc_expr_str_fn))
5842 s += "\n\tvisible if {}".format(expr_str(self.visibility,
5845 return s
5848 def indent_add(s): argument
5849 lines.append("\t" + s)
5851 def indent_add_cond(s, cond): argument
5853 s += " if " + expr_str(cond, sc_expr_str_fn)
5854 indent_add(s)
6222 def escape(s): argument
6229 return s.replace("\\", r"\\").replace('"', r'\"')
6232 def unescape(s): argument
6237 return _unescape_sub(r"\1", s)
6399 def _is_base_n(s, n): argument
6401 int(s, n)