Debian Codegraph @

pypy/module/token/interp_token.py

raw symbols SCIP
1 from pypy.interpreter.gateway import unwrap_spec
2 from pypy.interpreter.pyparser import pygram
3
4 @unwrap_spec(tok=int)
5 def isterminal(space, tok):
6 return space.newbool(tok < 256)
7
8 @unwrap_spec(tok=int)
9 def isnonterminal(space, tok):
10 return space.newbool(tok >= 256)
11
12 @unwrap_spec(tok=int)
13 def iseof(space, tok):
14 return space.newbool(tok == pygram.tokens.ENDMARKER)