(self)
| 2283 | _right_delim = set(r") ] \} > \rfloor \rangle \rceil".split()) |
| 2284 | |
| 2285 | def __init__(self): |
| 2286 | p = types.SimpleNamespace() |
| 2287 | # All forward declarations are here |
| 2288 | p.accent = Forward() |
| 2289 | p.ambi_delim = Forward() |
| 2290 | p.apostrophe = Forward() |
| 2291 | p.auto_delim = Forward() |
| 2292 | p.binom = Forward() |
| 2293 | p.bslash = Forward() |
| 2294 | p.c_over_c = Forward() |
| 2295 | p.customspace = Forward() |
| 2296 | p.end_group = Forward() |
| 2297 | p.float_literal = Forward() |
| 2298 | p.font = Forward() |
| 2299 | p.frac = Forward() |
| 2300 | p.dfrac = Forward() |
| 2301 | p.function = Forward() |
| 2302 | p.genfrac = Forward() |
| 2303 | p.group = Forward() |
| 2304 | p.int_literal = Forward() |
| 2305 | p.latexfont = Forward() |
| 2306 | p.lbracket = Forward() |
| 2307 | p.left_delim = Forward() |
| 2308 | p.lbrace = Forward() |
| 2309 | p.main = Forward() |
| 2310 | p.math = Forward() |
| 2311 | p.math_string = Forward() |
| 2312 | p.non_math = Forward() |
| 2313 | p.operatorname = Forward() |
| 2314 | p.overline = Forward() |
| 2315 | p.placeable = Forward() |
| 2316 | p.rbrace = Forward() |
| 2317 | p.rbracket = Forward() |
| 2318 | p.required_group = Forward() |
| 2319 | p.right_delim = Forward() |
| 2320 | p.right_delim_safe = Forward() |
| 2321 | p.simple = Forward() |
| 2322 | p.simple_group = Forward() |
| 2323 | p.single_symbol = Forward() |
| 2324 | p.snowflake = Forward() |
| 2325 | p.space = Forward() |
| 2326 | p.sqrt = Forward() |
| 2327 | p.stackrel = Forward() |
| 2328 | p.start_group = Forward() |
| 2329 | p.subsuper = Forward() |
| 2330 | p.subsuperop = Forward() |
| 2331 | p.symbol = Forward() |
| 2332 | p.symbol_name = Forward() |
| 2333 | p.token = Forward() |
| 2334 | p.unknown_symbol = Forward() |
| 2335 | |
| 2336 | # Set names on everything -- very useful for debugging |
| 2337 | for key, val in vars(p).items(): |
| 2338 | if not key.startswith('_'): |
| 2339 | val.setName(key) |
| 2340 | |
| 2341 | p.float_literal <<= Regex(r"[-+]?([0-9]+\.?[0-9]*|\.[0-9]+)") |
| 2342 | p.int_literal <<= Regex("[-+]?[0-9]+") |
nothing calls this directly
no test coverage detected