Lines Matching +full:t +full:- +full:v
5 # SPDX-License-Identifier: Apache-2.0
50 def t_HEX(t): argument
51 r"0x[0-9a-fA-F]+"
52 t.value = str(int(t.value, 16))
53 return t
55 def t_INTEGER(t): argument
57 t.value = str(int(t.value))
58 return t
60 def t_STR(t): argument
63 t.value = t.value[1:-1]
64 return t
90 def t_SYMBOL(t): argument
91 r"[A-Za-z_][0-9A-Za-z_]*"
92 t.type = reserved.get(t.value, "SYMBOL")
93 return t
95 t_ignore = " \t\n"
97 def t_error(t): argument
98 raise SyntaxError("Unexpected token '%s'" % t.value)
195 v = env[ast]
196 if v.startswith("0x") or v.startswith("0X"):
197 return int(v, 16)
199 return int(v, 10)
241 # a given compatible. For matching things like gpio-leds child
292 # Like it's C counterpart, state machine is not thread-safe