FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/Parser/parser.h at pythoncapi · pythoncapi/cpython · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
pythoncapi
/
cpython
Public
forked from
python/cpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
Parser
/
parser.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
42 lines (34 loc) · 1.18 KB
Breadcrumbs
cpython
/
Parser
/
parser.h
Copy path
File metadata and controls
42 lines (34 loc) · 1.18 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef
Py_PARSER_H
#define
Py_PARSER_H
#ifdef
__cplusplus
extern
"C"
{
#endif
/* Parser interface */
#define
MAXSTACK
1500
typedef
struct
{
int
s_state
;
/* State in current DFA */
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
);
int
PyParser_AddToken
(
parser_state
*
ps
,
int
type
,
char
*
str
,
int
lineno
,
int
col_offset
,
int
*
expected_ret
);
void
PyGrammar_AddAccelerators
(
grammar
*
g
);
#ifdef
__cplusplus
}
#endif
#endif
/* !Py_PARSER_H */
Back
|
FazBrowse Home
|
New Git URL