|
Kiwi Assembler
Assembler for KiwiVM
|
Lexical analyzer for Kiwi Assember. More...
#include <KiwiEngine/KiwiEngine.h>Go to the source code of this file.
Data Structures | |
| struct | KAParserState |
| Resource to parse the program. More... | |
Macros | |
| #define | YYSTYPE struct KEToken |
| #define | YY_EXTRA_TYPE struct KAParserState * |
| #define | YY_DECL int ke_lex(YYSTYPE * yylval_param, ke_scan_t yyscanner, struct KAParserState * pstate) |
| #define | YYLEX_PARAM scanner, pstate |
Typedefs | |
| typedef void * | ke_scan_t |
Functions | |
| int | ke_lex (YYSTYPE *lval, ke_scan_t yyscanner, struct KAParserState *pstate) |
| Main lex function to get next token. More... | |
| int | ke_lex_init (ke_scan_t *scanner) |
| Initialize the scanner DB for lex. More... | |
| YY_EXTRA_TYPE | ke_get_extra (ke_scan_t scanner) |
| Get user defined information from the scanner. More... | |
| void | ke_set_extra (YY_EXTRA_TYPE user_defined, ke_scan_t scanner) |
| Set user defined information to the scanner. More... | |
| int | ke_lex_destroy (ke_scan_t scanner) |
| Release the context of lex scanner. More... | |
| void | ke_error (struct KAParserState *pstate, ke_scan_t scanner, const char *msg) |
| Output parser error. More... | |
Lexical analyzer for Kiwi Assember.
| #define YY_DECL int ke_lex(YYSTYPE * yylval_param, ke_scan_t yyscanner, struct KAParserState * pstate) |
Declaration of ke_lex (yylex) function
| #define YY_EXTRA_TYPE struct KAParserState * |
Additional parameter in the parser
| #define YYLEX_PARAM scanner, pstate |
Definition of parameters of ke_lex (yylex) function
| #define YYSTYPE struct KEToken |
Define type of token
| typedef void* ke_scan_t |
Type of scanner
| void ke_error | ( | struct KAParserState * | pstate, |
| ke_scan_t | scanner, | ||
| const char * | msg | ||
| ) |
Output parser error.
| pstate | Parser resource |
| scanner | Lex scanner |
| msg | Parser error message |
| YY_EXTRA_TYPE ke_get_extra | ( | ke_scan_t | scanner | ) |
Get user defined information from the scanner.
| scanner | Source scanner |
| int ke_lex | ( | YYSTYPE * | lval, |
| ke_scan_t | yyscanner, | ||
| struct KAParserState * | pstate | ||
| ) |
Main lex function to get next token.
| lval | Next token |
| yyscanner | Scanner lex info |
| pstate | Scanner resource |
| int ke_lex_destroy | ( | ke_scan_t | scanner | ) |
Release the context of lex scanner.
| scanner | Destination scanner |
| int ke_lex_init | ( | ke_scan_t * | scanner | ) |
Initialize the scanner DB for lex.
| scanner | Destination scanner |
| void ke_set_extra | ( | YY_EXTRA_TYPE | user_defined, |
| ke_scan_t | scanner | ||
| ) |
Set user defined information to the scanner.
| user_defined | Source user defined info |
| scanner | Destination scanner |
1.8.5