mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
Continue implementation of grammar.py
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
5b76358238
commit
40e6add5ad
6 changed files with 366 additions and 44 deletions
32
test/grammar/include/defs.h
Normal file
32
test/grammar/include/defs.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#ifndef _JW_PYTHON_GRAMMARTEST_PARSER_DEFS_H
|
||||
#define _JW_PYTHON_GRAMMARTEST_PARSER_DEFS_H
|
||||
|
||||
#define YY_NO_INPUT
|
||||
#define YY_NO_UNPUT
|
||||
// #define YY_NO_UNISTD_H
|
||||
|
||||
struct context {
|
||||
int line;
|
||||
};
|
||||
|
||||
union YYSTYPE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* defined in grammartest-parser.l */
|
||||
struct vp_scanner;
|
||||
struct vp_scanner *grammartest_default_init_scanner(const char *str);
|
||||
void *grammartest_default_scanner_get_data(const struct vp_scanner *scanner);
|
||||
void grammartest_default_cleanup_scanner(struct vp_scanner *scanner);
|
||||
|
||||
void FB_SYM(error)(struct context *context, void *scanner, const char *s);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#define YY_DECL int FB_SYM(lex)(YYSTYPE *yylval_param, struct context *context, void *yyscanner)
|
||||
|
||||
#endif /* #ifndef _JW_PYTHON_GRAMMARTEST_PARSER_DEFS_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue