summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Parser/parser.h
diff options
context:
space:
mode:
authororivej <[email protected]>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/tools/python3/src/Parser/parser.h
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Parser/parser.h')
-rw-r--r--contrib/tools/python3/src/Parser/parser.h78
1 files changed, 39 insertions, 39 deletions
diff --git a/contrib/tools/python3/src/Parser/parser.h b/contrib/tools/python3/src/Parser/parser.h
index b16075e7f29..1098b17de78 100644
--- a/contrib/tools/python3/src/Parser/parser.h
+++ b/contrib/tools/python3/src/Parser/parser.h
@@ -1,49 +1,49 @@
-#ifndef Py_PARSER_H
-#define Py_PARSER_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Parser interface */
-
+#ifndef Py_PARSER_H
+#define Py_PARSER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Parser interface */
+
#define MAXSTACK 1700
-
-typedef struct {
- int s_state; /* State in current DFA */
+
+typedef struct {
+ int s_state; /* State in current DFA */
const dfa *s_dfa; /* Current DFA */
- struct _node *s_parent; /* Where to add next node */
-} stackentry;
-
-typedef struct {
- stackentry *s_top; /* Top entry */
- stackentry s_base[MAXSTACK];/* Array of stack entries */
- /* NB The stack grows down */
-} stack;
-
-typedef struct {
- stack p_stack; /* Stack of parser states */
- grammar *p_grammar; /* Grammar to use */
- node *p_tree; /* Top of parse tree */
-#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
- unsigned long p_flags; /* see co_flags in Include/code.h */
-#endif
-} parser_state;
-
-parser_state *PyParser_New(grammar *g, int start);
-void PyParser_Delete(parser_state *ps);
+ struct _node *s_parent; /* Where to add next node */
+} stackentry;
+
+typedef struct {
+ stackentry *s_top; /* Top entry */
+ stackentry s_base[MAXSTACK];/* Array of stack entries */
+ /* NB The stack grows down */
+} stack;
+
+typedef struct {
+ stack p_stack; /* Stack of parser states */
+ grammar *p_grammar; /* Grammar to use */
+ node *p_tree; /* Top of parse tree */
+#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
+ unsigned long p_flags; /* see co_flags in Include/code.h */
+#endif
+} parser_state;
+
+parser_state *PyParser_New(grammar *g, int start);
+void PyParser_Delete(parser_state *ps);
int PyParser_AddToken(parser_state *ps, int type, char *str,
int lineno, int col_offset,
int end_lineno, int end_col_offset,
- int *expected_ret);
-void PyGrammar_AddAccelerators(grammar *g);
-
+ int *expected_ret);
+void PyGrammar_AddAccelerators(grammar *g);
+
#define showtree _Py_showtree
#define printtree _Py_printtree
#define dumptree _Py_dumptree
-#ifdef __cplusplus
-}
-#endif
-#endif /* !Py_PARSER_H */
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PARSER_H */