Nuvoton FORTH
 All Classes Files Functions Variables Macros Modules Pages
ByteCompiler.hpp
Go to the documentation of this file.
1 
8 
9 #ifndef _H_ByteCompiler
10 #define _H_ByteCompiler
11 
12 #include <iostream>
13 #include <map>
14 #include <vector>
15 
16 #include "FORTH.h"
17 
21 
23 extern std::map<std::string,CELL> label;
24 
26 extern std::map<std::string,std::vector<CELL>> forward;
27 
29 extern void Lcompile(std::string *name);
30 
32 extern void Ldefine(std::string *name);
33 
35 
39 extern int yylex();
40 
42 extern int yylineno;
43 
45 extern char* yytext;
46 
48 #define cmd0(OP) { yylval.cmd0 = OP; return CMD0; }
49 #define cmd1(OP) { yylval.cmd1 = OP; return CMD1; }
50 
52 extern int yyparse();
53 
56 extern void yyerror(std::string message);
57 
58 #include "ByteCompiler.parser.hpp"
59 
60 #endif // _H_ByteCompiler
61 
int yyparse()
syntax parser interface
Definition: ByteCompiler.parser.cpp:976
void yyerror(std::string message)
syntax error callback
Definition: ByteCompiler.cpp:7
std::map< std::string, std::vector< CELL > > forward
table of forward references
Definition: ByteCompiler.cpp:22
int yylex()
lexer interface
char * yytext
text part matched by lexer regexp
Definition: ByteCompiler.lexer.cpp:509
void Ldefine(std::string *name)
define label
Definition: ByteCompiler.cpp:37
void Lcompile(std::string *name)
compile label
Definition: ByteCompiler.cpp:24
global Virtual Machine headers (ANSI C'89 code shared between byte compiler & embedded) ...
int yylineno
current line number
Definition: ByteCompiler.lexer.cpp:375
std::map< std::string, CELL > label
code labels table
Definition: ByteCompiler.cpp:21