Mercurial > cpython-lru_cache-weakref
annotate Include/token.h @ 58765:2ba7677bfa95 legacy-trunk
testCopysign was defined twice in test_math; combine the definitions
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Sat, 06 Feb 2010 23:11:25 +0000 |
| parents | c7e03cf8333e |
| children | d397b02631b5 07eb80264f61 |
| rev | line source |
|---|---|
| 145 | 1 |
| 6 | 2 /* Token types */ |
| 3 | |
|
13445
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
4 #ifndef Py_TOKEN_H |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
5 #define Py_TOKEN_H |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
6 #ifdef __cplusplus |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
7 extern "C" { |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
8 #endif |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
9 |
| 6 | 10 #define ENDMARKER 0 |
| 11 #define NAME 1 | |
| 12 #define NUMBER 2 | |
| 13 #define STRING 3 | |
| 14 #define NEWLINE 4 | |
| 15 #define INDENT 5 | |
| 16 #define DEDENT 6 | |
| 17 #define LPAR 7 | |
| 18 #define RPAR 8 | |
| 19 #define LSQB 9 | |
| 20 #define RSQB 10 | |
| 21 #define COLON 11 | |
| 22 #define COMMA 12 | |
| 23 #define SEMI 13 | |
| 24 #define PLUS 14 | |
| 25 #define MINUS 15 | |
| 26 #define STAR 16 | |
| 27 #define SLASH 17 | |
| 28 #define VBAR 18 | |
| 29 #define AMPER 19 | |
| 30 #define LESS 20 | |
| 31 #define GREATER 21 | |
| 32 #define EQUAL 22 | |
| 33 #define DOT 23 | |
| 34 #define PERCENT 24 | |
| 35 #define BACKQUOTE 25 | |
| 36 #define LBRACE 26 | |
| 37 #define RBRACE 27 | |
| 399 | 38 #define EQEQUAL 28 |
| 39 #define NOTEQUAL 29 | |
| 40 #define LESSEQUAL 30 | |
| 41 #define GREATEREQUAL 31 | |
|
409
b5fe6482072f
Added shift and mask ops.
Guido van Rossum <guido@python.org>
parents:
399
diff
changeset
|
42 #define TILDE 32 |
|
b5fe6482072f
Added shift and mask ops.
Guido van Rossum <guido@python.org>
parents:
399
diff
changeset
|
43 #define CIRCUMFLEX 33 |
|
b5fe6482072f
Added shift and mask ops.
Guido van Rossum <guido@python.org>
parents:
399
diff
changeset
|
44 #define LEFTSHIFT 34 |
|
b5fe6482072f
Added shift and mask ops.
Guido van Rossum <guido@python.org>
parents:
399
diff
changeset
|
45 #define RIGHTSHIFT 35 |
|
3320
4e6d0b26efaf
changes for ** (power) operator
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
46 #define DOUBLESTAR 36 |
|
14162
27d7d89c774b
The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents:
13445
diff
changeset
|
47 #define PLUSEQUAL 37 |
|
27d7d89c774b
The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents:
13445
diff
changeset
|
48 #define MINEQUAL 38 |
|
27d7d89c774b
The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents:
13445
diff
changeset
|
49 #define STAREQUAL 39 |
|
27d7d89c774b
The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents:
13445
diff
changeset
|
50 #define SLASHEQUAL 40 |
|
27d7d89c774b
The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents:
13445
diff
changeset
|
51 #define PERCENTEQUAL 41 |
|
27d7d89c774b
The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents:
13445
diff
changeset
|
52 #define AMPEREQUAL 42 |
|
27d7d89c774b
The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents:
13445
diff
changeset
|
53 #define VBAREQUAL 43 |
|
27d7d89c774b
The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents:
13445
diff
changeset
|
54 #define CIRCUMFLEXEQUAL 44 |
|
27d7d89c774b
The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents:
13445
diff
changeset
|
55 #define LEFTSHIFTEQUAL 45 |
|
27d7d89c774b
The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents:
13445
diff
changeset
|
56 #define RIGHTSHIFTEQUAL 46 |
|
27d7d89c774b
The real suport for augmented assignment: new opcodes, new PyNumber and
Thomas Wouters <thomas@python.org>
parents:
13445
diff
changeset
|
57 #define DOUBLESTAREQUAL 47 |
|
19051
f20727cc3d0f
Implement PEP 238 in its (almost) full glory.
Guido van Rossum <guido@python.org>
parents:
14375
diff
changeset
|
58 #define DOUBLESLASH 48 |
|
f20727cc3d0f
Implement PEP 238 in its (almost) full glory.
Guido van Rossum <guido@python.org>
parents:
14375
diff
changeset
|
59 #define DOUBLESLASHEQUAL 49 |
|
32888
c7e03cf8333e
PEP-0318, @decorator-style. In Guido's words:
Anthony Baxter <anthonybaxter@gmail.com>
parents:
24752
diff
changeset
|
60 #define AT 50 |
|
2129
05360cd616ae
The great renaming, phase two: all header files have been updated to
Guido van Rossum <guido@python.org>
parents:
2058
diff
changeset
|
61 /* Don't forget to update the table _PyParser_TokenNames in tokenizer.c! */ |
|
32888
c7e03cf8333e
PEP-0318, @decorator-style. In Guido's words:
Anthony Baxter <anthonybaxter@gmail.com>
parents:
24752
diff
changeset
|
62 #define OP 51 |
|
c7e03cf8333e
PEP-0318, @decorator-style. In Guido's words:
Anthony Baxter <anthonybaxter@gmail.com>
parents:
24752
diff
changeset
|
63 #define ERRORTOKEN 52 |
|
c7e03cf8333e
PEP-0318, @decorator-style. In Guido's words:
Anthony Baxter <anthonybaxter@gmail.com>
parents:
24752
diff
changeset
|
64 #define N_TOKENS 53 |
| 6 | 65 |
| 66 /* Special definitions for cooperation with parser */ | |
| 67 | |
| 68 #define NT_OFFSET 256 | |
| 69 | |
| 70 #define ISTERMINAL(x) ((x) < NT_OFFSET) | |
| 71 #define ISNONTERMINAL(x) ((x) >= NT_OFFSET) | |
| 72 #define ISEOF(x) ((x) == ENDMARKER) | |
| 73 | |
| 74 | |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
19051
diff
changeset
|
75 PyAPI_DATA(char *) _PyParser_TokenNames[]; /* Token names */ |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
19051
diff
changeset
|
76 PyAPI_FUNC(int) PyToken_OneChar(int); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
19051
diff
changeset
|
77 PyAPI_FUNC(int) PyToken_TwoChars(int, int); |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
19051
diff
changeset
|
78 PyAPI_FUNC(int) PyToken_ThreeChars(int, int, int); |
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
79 |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
80 #ifdef __cplusplus |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
81 } |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
82 #endif |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
83 #endif /* !Py_TOKEN_H */ |
