add missing flags & keywords

This commit is contained in:
xensik 2022-10-21 20:49:27 +02:00
parent 9b7f14c7a2
commit 2ab5118d16
6 changed files with 2076 additions and 2043 deletions

View File

@ -58,6 +58,7 @@ xsk::arc::t6::parser::symbol_type T6lex(xsk::arc::t6::lexer& lexer);
%token USINGTREE "#using_animtree" %token USINGTREE "#using_animtree"
%token ANIMTREE "#animtree" %token ANIMTREE "#animtree"
%token AUTOEXEC "autoexec" %token AUTOEXEC "autoexec"
%token CODECALL "codecall"
%token PRIVATE "private" %token PRIVATE "private"
%token ENDON "endon" %token ENDON "endon"
%token NOTIFY "notify" %token NOTIFY "notify"
@ -334,11 +335,13 @@ decl_usingtree
decl_thread decl_thread
: expr_identifier LPAREN expr_parameters RPAREN stmt_block : expr_identifier LPAREN expr_parameters RPAREN stmt_block
{ lexer.ban_header(@$); $$ = std::make_unique<ast::decl_thread>(@$, std::move($1), std::move($3), std::move($5), export_flags::none); } { lexer.ban_header(@$); $$ = std::make_unique<ast::decl_thread>(@$, std::move($1), std::move($3), std::move($5), export_flags::export_none); }
| AUTOEXEC expr_identifier LPAREN expr_parameters RPAREN stmt_block | AUTOEXEC expr_identifier LPAREN expr_parameters RPAREN stmt_block
{ lexer.ban_header(@$); $$ = std::make_unique<ast::decl_thread>(@$, std::move($2), std::move($4), std::move($6), export_flags::vis_autoexec); } { lexer.ban_header(@$); $$ = std::make_unique<ast::decl_thread>(@$, std::move($2), std::move($4), std::move($6), export_flags::export_autoexec); }
| CODECALL expr_identifier LPAREN expr_parameters RPAREN stmt_block
{ lexer.ban_header(@$); $$ = std::make_unique<ast::decl_thread>(@$, std::move($2), std::move($4), std::move($6), export_flags::export_codecall); }
| PRIVATE expr_identifier LPAREN expr_parameters RPAREN stmt_block | PRIVATE expr_identifier LPAREN expr_parameters RPAREN stmt_block
{ lexer.ban_header(@$); $$ = std::make_unique<ast::decl_thread>(@$, std::move($2), std::move($4), std::move($6), export_flags::vis_private); } { lexer.ban_header(@$); $$ = std::make_unique<ast::decl_thread>(@$, std::move($2), std::move($4), std::move($6), export_flags::export_private2); }
; ;
stmt stmt

View File

@ -31,6 +31,7 @@ const std::unordered_map<std::string_view, parser::token::token_kind_type> keywo
{ "#using_animtree", parser::token::USINGTREE }, { "#using_animtree", parser::token::USINGTREE },
{ "#animtree", parser::token::ANIMTREE }, { "#animtree", parser::token::ANIMTREE },
{ "autoexec", parser::token::AUTOEXEC }, { "autoexec", parser::token::AUTOEXEC },
{ "codecall", parser::token::CODECALL },
{ "private", parser::token::PRIVATE }, { "private", parser::token::PRIVATE },
{ "endon", parser::token::ENDON }, { "endon", parser::token::ENDON },
{ "notify", parser::token::NOTIFY }, { "notify", parser::token::NOTIFY },

File diff suppressed because it is too large Load Diff

View File

@ -762,118 +762,119 @@ namespace xsk { namespace arc { namespace t6 {
USINGTREE = 15, // "#using_animtree" USINGTREE = 15, // "#using_animtree"
ANIMTREE = 16, // "#animtree" ANIMTREE = 16, // "#animtree"
AUTOEXEC = 17, // "autoexec" AUTOEXEC = 17, // "autoexec"
PRIVATE = 18, // "private" CODECALL = 18, // "codecall"
ENDON = 19, // "endon" PRIVATE = 19, // "private"
NOTIFY = 20, // "notify" ENDON = 20, // "endon"
WAIT = 21, // "wait" NOTIFY = 21, // "notify"
WAITTILL = 22, // "waittill" WAIT = 22, // "wait"
WAITTILLMATCH = 23, // "waittillmatch" WAITTILL = 23, // "waittill"
WAITTILLFRAMEEND = 24, // "waittillframeend" WAITTILLMATCH = 24, // "waittillmatch"
IF = 25, // "if" WAITTILLFRAMEEND = 25, // "waittillframeend"
ELSE = 26, // "else" IF = 26, // "if"
DO = 27, // "do" ELSE = 27, // "else"
WHILE = 28, // "while" DO = 28, // "do"
FOR = 29, // "for" WHILE = 29, // "while"
FOREACH = 30, // "foreach" FOR = 30, // "for"
IN = 31, // "in" FOREACH = 31, // "foreach"
SWITCH = 32, // "switch" IN = 32, // "in"
CASE = 33, // "case" SWITCH = 33, // "switch"
DEFAULT = 34, // "default" CASE = 34, // "case"
BREAK = 35, // "break" DEFAULT = 35, // "default"
CONTINUE = 36, // "continue" BREAK = 36, // "break"
RETURN = 37, // "return" CONTINUE = 37, // "continue"
PROFBEGIN = 38, // "prof_begin" RETURN = 38, // "return"
PROFEND = 39, // "prof_end" PROFBEGIN = 39, // "prof_begin"
THREAD = 40, // "thread" PROFEND = 40, // "prof_end"
TRUE = 41, // "true" THREAD = 41, // "thread"
FALSE = 42, // "false" TRUE = 42, // "true"
UNDEFINED = 43, // "undefined" FALSE = 43, // "false"
SIZE = 44, // "size" UNDEFINED = 44, // "undefined"
GAME = 45, // "game" SIZE = 45, // "size"
SELF = 46, // "self" GAME = 46, // "game"
ANIM = 47, // "anim" SELF = 47, // "self"
LEVEL = 48, // "level" ANIM = 48, // "anim"
CONST = 49, // "const" LEVEL = 49, // "level"
GETNEXTARRAYKEY = 50, // "getnextarraykey" CONST = 50, // "const"
GETFIRSTARRAYKEY = 51, // "getfirstarraykey" GETNEXTARRAYKEY = 51, // "getnextarraykey"
GETDVARCOLORALPHA = 52, // "getdvarcoloralpha" GETFIRSTARRAYKEY = 52, // "getfirstarraykey"
GETDVARCOLORBLUE = 53, // "getdvarcolorblue" GETDVARCOLORALPHA = 53, // "getdvarcoloralpha"
GETDVARCOLORGREEN = 54, // "getdvarcolorgreen" GETDVARCOLORBLUE = 54, // "getdvarcolorblue"
GETDVARCOLORRED = 55, // "getdvarcolorred" GETDVARCOLORGREEN = 55, // "getdvarcolorgreen"
GETDVARVECTOR = 56, // "getdvarvector" GETDVARCOLORRED = 56, // "getdvarcolorred"
GETDVARFLOAT = 57, // "getdvarfloat" GETDVARVECTOR = 57, // "getdvarvector"
GETDVARINT = 58, // "getdvarint" GETDVARFLOAT = 58, // "getdvarfloat"
GETDVAR = 59, // "getdvar" GETDVARINT = 59, // "getdvarint"
GETTIME = 60, // "gettime" GETDVAR = 60, // "getdvar"
ABS = 61, // "abs" GETTIME = 61, // "gettime"
VECTORTOANGLES = 62, // "vectortoangles" ABS = 62, // "abs"
ANGLECLAMP180 = 63, // "angleclamp180" VECTORTOANGLES = 63, // "vectortoangles"
ANGLESTOFORWARD = 64, // "anglestoforward" ANGLECLAMP180 = 64, // "angleclamp180"
ANGLESTORIGHT = 65, // "anglestoright" ANGLESTOFORWARD = 65, // "anglestoforward"
ANGLESTOUP = 66, // "anglestoup" ANGLESTORIGHT = 66, // "anglestoright"
VECTORSCALE = 67, // "vectorscale" ANGLESTOUP = 67, // "anglestoup"
ISDEFINED = 68, // "isdefined" VECTORSCALE = 68, // "vectorscale"
LPAREN = 69, // "(" ISDEFINED = 69, // "isdefined"
RPAREN = 70, // ")" LPAREN = 70, // "("
LBRACE = 71, // "{" RPAREN = 71, // ")"
RBRACE = 72, // "}" LBRACE = 72, // "{"
LBRACKET = 73, // "[" RBRACE = 73, // "}"
RBRACKET = 74, // "]" LBRACKET = 74, // "["
COMMA = 75, // "," RBRACKET = 75, // "]"
DOT = 76, // "." COMMA = 76, // ","
DOUBLECOLON = 77, // "::" DOT = 77, // "."
COLON = 78, // ":" DOUBLECOLON = 78, // "::"
SEMICOLON = 79, // ";" COLON = 79, // ":"
QMARK = 80, // "?" SEMICOLON = 80, // ";"
INCREMENT = 81, // "++" QMARK = 81, // "?"
DECREMENT = 82, // "--" INCREMENT = 82, // "++"
LSHIFT = 83, // "<<" DECREMENT = 83, // "--"
RSHIFT = 84, // ">>" LSHIFT = 84, // "<<"
OR = 85, // "||" RSHIFT = 85, // ">>"
AND = 86, // "&&" OR = 86, // "||"
EQUALITY = 87, // "==" AND = 87, // "&&"
INEQUALITY = 88, // "!=" EQUALITY = 88, // "=="
LESS_EQUAL = 89, // "<=" INEQUALITY = 89, // "!="
GREATER_EQUAL = 90, // ">=" LESS_EQUAL = 90, // "<="
LESS = 91, // "<" GREATER_EQUAL = 91, // ">="
GREATER = 92, // ">" LESS = 92, // "<"
NOT = 93, // "!" GREATER = 93, // ">"
COMPLEMENT = 94, // "~" NOT = 94, // "!"
ASSIGN = 95, // "=" COMPLEMENT = 95, // "~"
ASSIGN_ADD = 96, // "+=" ASSIGN = 96, // "="
ASSIGN_SUB = 97, // "-=" ASSIGN_ADD = 97, // "+="
ASSIGN_MUL = 98, // "*=" ASSIGN_SUB = 98, // "-="
ASSIGN_DIV = 99, // "/=" ASSIGN_MUL = 99, // "*="
ASSIGN_MOD = 100, // "%=" ASSIGN_DIV = 100, // "/="
ASSIGN_BW_OR = 101, // "|=" ASSIGN_MOD = 101, // "%="
ASSIGN_BW_AND = 102, // "&=" ASSIGN_BW_OR = 102, // "|="
ASSIGN_BW_EXOR = 103, // "^=" ASSIGN_BW_AND = 103, // "&="
ASSIGN_RSHIFT = 104, // ">>=" ASSIGN_BW_EXOR = 104, // "^="
ASSIGN_LSHIFT = 105, // "<<=" ASSIGN_RSHIFT = 105, // ">>="
BITWISE_OR = 106, // "|" ASSIGN_LSHIFT = 106, // "<<="
BITWISE_AND = 107, // "&" BITWISE_OR = 107, // "|"
BITWISE_EXOR = 108, // "^" BITWISE_AND = 108, // "&"
ADD = 109, // "+" BITWISE_EXOR = 109, // "^"
SUB = 110, // "-" ADD = 110, // "+"
MUL = 111, // "*" SUB = 111, // "-"
DIV = 112, // "/" MUL = 112, // "*"
MOD = 113, // "%" DIV = 113, // "/"
PATH = 114, // "path" MOD = 114, // "%"
IDENTIFIER = 115, // "identifier" PATH = 115, // "path"
STRING = 116, // "string literal" IDENTIFIER = 116, // "identifier"
ISTRING = 117, // "localized string" STRING = 117, // "string literal"
HASH = 118, // "hash" ISTRING = 118, // "localized string"
FLOAT = 119, // "float" HASH = 119, // "hash"
INTEGER = 120, // "integer" FLOAT = 120, // "float"
SIZEOF = 121, // SIZEOF INTEGER = 121, // "integer"
THEN = 122, // THEN SIZEOF = 122, // SIZEOF
TERN = 123, // TERN THEN = 123, // THEN
NEG = 124, // NEG TERN = 124, // TERN
ANIMREF = 125, // ANIMREF NEG = 125, // NEG
PREINC = 126, // PREINC ANIMREF = 126, // ANIMREF
PREDEC = 127, // PREDEC PREINC = 127, // PREINC
POSTINC = 128, // POSTINC PREDEC = 128, // PREDEC
POSTDEC = 129 // POSTDEC POSTINC = 129, // POSTINC
POSTDEC = 130 // POSTDEC
}; };
/// Backward compatibility alias (Bison 3.6). /// Backward compatibility alias (Bison 3.6).
typedef token_kind_type yytokentype; typedef token_kind_type yytokentype;
@ -890,7 +891,7 @@ namespace xsk { namespace arc { namespace t6 {
{ {
enum symbol_kind_type enum symbol_kind_type
{ {
YYNTOKENS = 130, ///< Number of tokens. YYNTOKENS = 131, ///< Number of tokens.
S_YYEMPTY = -2, S_YYEMPTY = -2,
S_YYEOF = 0, // "end of file" S_YYEOF = 0, // "end of file"
S_YYerror = 1, // error S_YYerror = 1, // error
@ -910,220 +911,221 @@ namespace xsk { namespace arc { namespace t6 {
S_USINGTREE = 15, // "#using_animtree" S_USINGTREE = 15, // "#using_animtree"
S_ANIMTREE = 16, // "#animtree" S_ANIMTREE = 16, // "#animtree"
S_AUTOEXEC = 17, // "autoexec" S_AUTOEXEC = 17, // "autoexec"
S_PRIVATE = 18, // "private" S_CODECALL = 18, // "codecall"
S_ENDON = 19, // "endon" S_PRIVATE = 19, // "private"
S_NOTIFY = 20, // "notify" S_ENDON = 20, // "endon"
S_WAIT = 21, // "wait" S_NOTIFY = 21, // "notify"
S_WAITTILL = 22, // "waittill" S_WAIT = 22, // "wait"
S_WAITTILLMATCH = 23, // "waittillmatch" S_WAITTILL = 23, // "waittill"
S_WAITTILLFRAMEEND = 24, // "waittillframeend" S_WAITTILLMATCH = 24, // "waittillmatch"
S_IF = 25, // "if" S_WAITTILLFRAMEEND = 25, // "waittillframeend"
S_ELSE = 26, // "else" S_IF = 26, // "if"
S_DO = 27, // "do" S_ELSE = 27, // "else"
S_WHILE = 28, // "while" S_DO = 28, // "do"
S_FOR = 29, // "for" S_WHILE = 29, // "while"
S_FOREACH = 30, // "foreach" S_FOR = 30, // "for"
S_IN = 31, // "in" S_FOREACH = 31, // "foreach"
S_SWITCH = 32, // "switch" S_IN = 32, // "in"
S_CASE = 33, // "case" S_SWITCH = 33, // "switch"
S_DEFAULT = 34, // "default" S_CASE = 34, // "case"
S_BREAK = 35, // "break" S_DEFAULT = 35, // "default"
S_CONTINUE = 36, // "continue" S_BREAK = 36, // "break"
S_RETURN = 37, // "return" S_CONTINUE = 37, // "continue"
S_PROFBEGIN = 38, // "prof_begin" S_RETURN = 38, // "return"
S_PROFEND = 39, // "prof_end" S_PROFBEGIN = 39, // "prof_begin"
S_THREAD = 40, // "thread" S_PROFEND = 40, // "prof_end"
S_TRUE = 41, // "true" S_THREAD = 41, // "thread"
S_FALSE = 42, // "false" S_TRUE = 42, // "true"
S_UNDEFINED = 43, // "undefined" S_FALSE = 43, // "false"
S_SIZE = 44, // "size" S_UNDEFINED = 44, // "undefined"
S_GAME = 45, // "game" S_SIZE = 45, // "size"
S_SELF = 46, // "self" S_GAME = 46, // "game"
S_ANIM = 47, // "anim" S_SELF = 47, // "self"
S_LEVEL = 48, // "level" S_ANIM = 48, // "anim"
S_CONST = 49, // "const" S_LEVEL = 49, // "level"
S_GETNEXTARRAYKEY = 50, // "getnextarraykey" S_CONST = 50, // "const"
S_GETFIRSTARRAYKEY = 51, // "getfirstarraykey" S_GETNEXTARRAYKEY = 51, // "getnextarraykey"
S_GETDVARCOLORALPHA = 52, // "getdvarcoloralpha" S_GETFIRSTARRAYKEY = 52, // "getfirstarraykey"
S_GETDVARCOLORBLUE = 53, // "getdvarcolorblue" S_GETDVARCOLORALPHA = 53, // "getdvarcoloralpha"
S_GETDVARCOLORGREEN = 54, // "getdvarcolorgreen" S_GETDVARCOLORBLUE = 54, // "getdvarcolorblue"
S_GETDVARCOLORRED = 55, // "getdvarcolorred" S_GETDVARCOLORGREEN = 55, // "getdvarcolorgreen"
S_GETDVARVECTOR = 56, // "getdvarvector" S_GETDVARCOLORRED = 56, // "getdvarcolorred"
S_GETDVARFLOAT = 57, // "getdvarfloat" S_GETDVARVECTOR = 57, // "getdvarvector"
S_GETDVARINT = 58, // "getdvarint" S_GETDVARFLOAT = 58, // "getdvarfloat"
S_GETDVAR = 59, // "getdvar" S_GETDVARINT = 59, // "getdvarint"
S_GETTIME = 60, // "gettime" S_GETDVAR = 60, // "getdvar"
S_ABS = 61, // "abs" S_GETTIME = 61, // "gettime"
S_VECTORTOANGLES = 62, // "vectortoangles" S_ABS = 62, // "abs"
S_ANGLECLAMP180 = 63, // "angleclamp180" S_VECTORTOANGLES = 63, // "vectortoangles"
S_ANGLESTOFORWARD = 64, // "anglestoforward" S_ANGLECLAMP180 = 64, // "angleclamp180"
S_ANGLESTORIGHT = 65, // "anglestoright" S_ANGLESTOFORWARD = 65, // "anglestoforward"
S_ANGLESTOUP = 66, // "anglestoup" S_ANGLESTORIGHT = 66, // "anglestoright"
S_VECTORSCALE = 67, // "vectorscale" S_ANGLESTOUP = 67, // "anglestoup"
S_ISDEFINED = 68, // "isdefined" S_VECTORSCALE = 68, // "vectorscale"
S_LPAREN = 69, // "(" S_ISDEFINED = 69, // "isdefined"
S_RPAREN = 70, // ")" S_LPAREN = 70, // "("
S_LBRACE = 71, // "{" S_RPAREN = 71, // ")"
S_RBRACE = 72, // "}" S_LBRACE = 72, // "{"
S_LBRACKET = 73, // "[" S_RBRACE = 73, // "}"
S_RBRACKET = 74, // "]" S_LBRACKET = 74, // "["
S_COMMA = 75, // "," S_RBRACKET = 75, // "]"
S_DOT = 76, // "." S_COMMA = 76, // ","
S_DOUBLECOLON = 77, // "::" S_DOT = 77, // "."
S_COLON = 78, // ":" S_DOUBLECOLON = 78, // "::"
S_SEMICOLON = 79, // ";" S_COLON = 79, // ":"
S_QMARK = 80, // "?" S_SEMICOLON = 80, // ";"
S_INCREMENT = 81, // "++" S_QMARK = 81, // "?"
S_DECREMENT = 82, // "--" S_INCREMENT = 82, // "++"
S_LSHIFT = 83, // "<<" S_DECREMENT = 83, // "--"
S_RSHIFT = 84, // ">>" S_LSHIFT = 84, // "<<"
S_OR = 85, // "||" S_RSHIFT = 85, // ">>"
S_AND = 86, // "&&" S_OR = 86, // "||"
S_EQUALITY = 87, // "==" S_AND = 87, // "&&"
S_INEQUALITY = 88, // "!=" S_EQUALITY = 88, // "=="
S_LESS_EQUAL = 89, // "<=" S_INEQUALITY = 89, // "!="
S_GREATER_EQUAL = 90, // ">=" S_LESS_EQUAL = 90, // "<="
S_LESS = 91, // "<" S_GREATER_EQUAL = 91, // ">="
S_GREATER = 92, // ">" S_LESS = 92, // "<"
S_NOT = 93, // "!" S_GREATER = 93, // ">"
S_COMPLEMENT = 94, // "~" S_NOT = 94, // "!"
S_ASSIGN = 95, // "=" S_COMPLEMENT = 95, // "~"
S_ASSIGN_ADD = 96, // "+=" S_ASSIGN = 96, // "="
S_ASSIGN_SUB = 97, // "-=" S_ASSIGN_ADD = 97, // "+="
S_ASSIGN_MUL = 98, // "*=" S_ASSIGN_SUB = 98, // "-="
S_ASSIGN_DIV = 99, // "/=" S_ASSIGN_MUL = 99, // "*="
S_ASSIGN_MOD = 100, // "%=" S_ASSIGN_DIV = 100, // "/="
S_ASSIGN_BW_OR = 101, // "|=" S_ASSIGN_MOD = 101, // "%="
S_ASSIGN_BW_AND = 102, // "&=" S_ASSIGN_BW_OR = 102, // "|="
S_ASSIGN_BW_EXOR = 103, // "^=" S_ASSIGN_BW_AND = 103, // "&="
S_ASSIGN_RSHIFT = 104, // ">>=" S_ASSIGN_BW_EXOR = 104, // "^="
S_ASSIGN_LSHIFT = 105, // "<<=" S_ASSIGN_RSHIFT = 105, // ">>="
S_BITWISE_OR = 106, // "|" S_ASSIGN_LSHIFT = 106, // "<<="
S_BITWISE_AND = 107, // "&" S_BITWISE_OR = 107, // "|"
S_BITWISE_EXOR = 108, // "^" S_BITWISE_AND = 108, // "&"
S_ADD = 109, // "+" S_BITWISE_EXOR = 109, // "^"
S_SUB = 110, // "-" S_ADD = 110, // "+"
S_MUL = 111, // "*" S_SUB = 111, // "-"
S_DIV = 112, // "/" S_MUL = 112, // "*"
S_MOD = 113, // "%" S_DIV = 113, // "/"
S_PATH = 114, // "path" S_MOD = 114, // "%"
S_IDENTIFIER = 115, // "identifier" S_PATH = 115, // "path"
S_STRING = 116, // "string literal" S_IDENTIFIER = 116, // "identifier"
S_ISTRING = 117, // "localized string" S_STRING = 117, // "string literal"
S_HASH = 118, // "hash" S_ISTRING = 118, // "localized string"
S_FLOAT = 119, // "float" S_HASH = 119, // "hash"
S_INTEGER = 120, // "integer" S_FLOAT = 120, // "float"
S_SIZEOF = 121, // SIZEOF S_INTEGER = 121, // "integer"
S_THEN = 122, // THEN S_SIZEOF = 122, // SIZEOF
S_TERN = 123, // TERN S_THEN = 123, // THEN
S_NEG = 124, // NEG S_TERN = 124, // TERN
S_ANIMREF = 125, // ANIMREF S_NEG = 125, // NEG
S_PREINC = 126, // PREINC S_ANIMREF = 126, // ANIMREF
S_PREDEC = 127, // PREDEC S_PREINC = 127, // PREINC
S_POSTINC = 128, // POSTINC S_PREDEC = 128, // PREDEC
S_POSTDEC = 129, // POSTDEC S_POSTINC = 129, // POSTINC
S_YYACCEPT = 130, // $accept S_POSTDEC = 130, // POSTDEC
S_root = 131, // root S_YYACCEPT = 131, // $accept
S_program = 132, // program S_root = 132, // root
S_inline = 133, // inline S_program = 133, // program
S_include = 134, // include S_inline = 134, // inline
S_declaration = 135, // declaration S_include = 135, // include
S_decl_usingtree = 136, // decl_usingtree S_declaration = 136, // declaration
S_decl_thread = 137, // decl_thread S_decl_usingtree = 137, // decl_usingtree
S_stmt = 138, // stmt S_decl_thread = 138, // decl_thread
S_stmt_or_dev = 139, // stmt_or_dev S_stmt = 139, // stmt
S_stmt_list = 140, // stmt_list S_stmt_or_dev = 140, // stmt_or_dev
S_stmt_or_dev_list = 141, // stmt_or_dev_list S_stmt_list = 141, // stmt_list
S_stmt_dev = 142, // stmt_dev S_stmt_or_dev_list = 142, // stmt_or_dev_list
S_stmt_block = 143, // stmt_block S_stmt_dev = 143, // stmt_dev
S_stmt_expr = 144, // stmt_expr S_stmt_block = 144, // stmt_block
S_stmt_call = 145, // stmt_call S_stmt_expr = 145, // stmt_expr
S_stmt_const = 146, // stmt_const S_stmt_call = 146, // stmt_call
S_stmt_assign = 147, // stmt_assign S_stmt_const = 147, // stmt_const
S_stmt_endon = 148, // stmt_endon S_stmt_assign = 148, // stmt_assign
S_stmt_notify = 149, // stmt_notify S_stmt_endon = 149, // stmt_endon
S_stmt_wait = 150, // stmt_wait S_stmt_notify = 150, // stmt_notify
S_stmt_waittill = 151, // stmt_waittill S_stmt_wait = 151, // stmt_wait
S_stmt_waittillmatch = 152, // stmt_waittillmatch S_stmt_waittill = 152, // stmt_waittill
S_stmt_waittillframeend = 153, // stmt_waittillframeend S_stmt_waittillmatch = 153, // stmt_waittillmatch
S_stmt_if = 154, // stmt_if S_stmt_waittillframeend = 154, // stmt_waittillframeend
S_stmt_ifelse = 155, // stmt_ifelse S_stmt_if = 155, // stmt_if
S_stmt_while = 156, // stmt_while S_stmt_ifelse = 156, // stmt_ifelse
S_stmt_dowhile = 157, // stmt_dowhile S_stmt_while = 157, // stmt_while
S_stmt_for = 158, // stmt_for S_stmt_dowhile = 158, // stmt_dowhile
S_stmt_foreach = 159, // stmt_foreach S_stmt_for = 159, // stmt_for
S_stmt_switch = 160, // stmt_switch S_stmt_foreach = 160, // stmt_foreach
S_stmt_case = 161, // stmt_case S_stmt_switch = 161, // stmt_switch
S_stmt_default = 162, // stmt_default S_stmt_case = 162, // stmt_case
S_stmt_break = 163, // stmt_break S_stmt_default = 163, // stmt_default
S_stmt_continue = 164, // stmt_continue S_stmt_break = 164, // stmt_break
S_stmt_return = 165, // stmt_return S_stmt_continue = 165, // stmt_continue
S_stmt_prof_begin = 166, // stmt_prof_begin S_stmt_return = 166, // stmt_return
S_stmt_prof_end = 167, // stmt_prof_end S_stmt_prof_begin = 167, // stmt_prof_begin
S_expr = 168, // expr S_stmt_prof_end = 168, // stmt_prof_end
S_expr_or_empty = 169, // expr_or_empty S_expr = 169, // expr
S_expr_assign = 170, // expr_assign S_expr_or_empty = 170, // expr_or_empty
S_expr_increment = 171, // expr_increment S_expr_assign = 171, // expr_assign
S_expr_decrement = 172, // expr_decrement S_expr_increment = 172, // expr_increment
S_expr_ternary = 173, // expr_ternary S_expr_decrement = 173, // expr_decrement
S_expr_binary = 174, // expr_binary S_expr_ternary = 174, // expr_ternary
S_expr_primitive = 175, // expr_primitive S_expr_binary = 175, // expr_binary
S_expr_complement = 176, // expr_complement S_expr_primitive = 176, // expr_primitive
S_expr_negate = 177, // expr_negate S_expr_complement = 177, // expr_complement
S_expr_not = 178, // expr_not S_expr_negate = 178, // expr_negate
S_expr_call = 179, // expr_call S_expr_not = 179, // expr_not
S_expr_method = 180, // expr_method S_expr_call = 180, // expr_call
S_expr_function = 181, // expr_function S_expr_method = 181, // expr_method
S_expr_pointer = 182, // expr_pointer S_expr_function = 182, // expr_function
S_expr_parameters = 183, // expr_parameters S_expr_pointer = 183, // expr_pointer
S_expr_parameters_default = 184, // expr_parameters_default S_expr_parameters = 184, // expr_parameters
S_expr_literal = 185, // expr_literal S_expr_parameters_default = 185, // expr_parameters_default
S_expr_arguments = 186, // expr_arguments S_expr_literal = 186, // expr_literal
S_expr_arguments_no_empty = 187, // expr_arguments_no_empty S_expr_arguments = 187, // expr_arguments
S_expr_getnextarraykey = 188, // expr_getnextarraykey S_expr_arguments_no_empty = 188, // expr_arguments_no_empty
S_expr_getfirstarraykey = 189, // expr_getfirstarraykey S_expr_getnextarraykey = 189, // expr_getnextarraykey
S_expr_getdvarcoloralpha = 190, // expr_getdvarcoloralpha S_expr_getfirstarraykey = 190, // expr_getfirstarraykey
S_expr_getdvarcolorblue = 191, // expr_getdvarcolorblue S_expr_getdvarcoloralpha = 191, // expr_getdvarcoloralpha
S_expr_getdvarcolorgreen = 192, // expr_getdvarcolorgreen S_expr_getdvarcolorblue = 192, // expr_getdvarcolorblue
S_expr_getdvarcolorred = 193, // expr_getdvarcolorred S_expr_getdvarcolorgreen = 193, // expr_getdvarcolorgreen
S_expr_getdvarvector = 194, // expr_getdvarvector S_expr_getdvarcolorred = 194, // expr_getdvarcolorred
S_expr_getdvarfloat = 195, // expr_getdvarfloat S_expr_getdvarvector = 195, // expr_getdvarvector
S_expr_getdvarint = 196, // expr_getdvarint S_expr_getdvarfloat = 196, // expr_getdvarfloat
S_expr_getdvar = 197, // expr_getdvar S_expr_getdvarint = 197, // expr_getdvarint
S_expr_gettime = 198, // expr_gettime S_expr_getdvar = 198, // expr_getdvar
S_expr_abs = 199, // expr_abs S_expr_gettime = 199, // expr_gettime
S_expr_vectortoangles = 200, // expr_vectortoangles S_expr_abs = 200, // expr_abs
S_expr_angleclamp180 = 201, // expr_angleclamp180 S_expr_vectortoangles = 201, // expr_vectortoangles
S_expr_anglestoforward = 202, // expr_anglestoforward S_expr_angleclamp180 = 202, // expr_angleclamp180
S_expr_anglestoright = 203, // expr_anglestoright S_expr_anglestoforward = 203, // expr_anglestoforward
S_expr_anglestoup = 204, // expr_anglestoup S_expr_anglestoright = 204, // expr_anglestoright
S_expr_vectorscale = 205, // expr_vectorscale S_expr_anglestoup = 205, // expr_anglestoup
S_expr_isdefined = 206, // expr_isdefined S_expr_vectorscale = 206, // expr_vectorscale
S_expr_reference = 207, // expr_reference S_expr_isdefined = 207, // expr_isdefined
S_expr_array = 208, // expr_array S_expr_reference = 208, // expr_reference
S_expr_field = 209, // expr_field S_expr_array = 209, // expr_array
S_expr_size = 210, // expr_size S_expr_field = 210, // expr_field
S_expr_paren = 211, // expr_paren S_expr_size = 211, // expr_size
S_expr_object = 212, // expr_object S_expr_paren = 212, // expr_paren
S_expr_empty_array = 213, // expr_empty_array S_expr_object = 213, // expr_object
S_expr_undefined = 214, // expr_undefined S_expr_empty_array = 214, // expr_empty_array
S_expr_game = 215, // expr_game S_expr_undefined = 215, // expr_undefined
S_expr_self = 216, // expr_self S_expr_game = 216, // expr_game
S_expr_anim = 217, // expr_anim S_expr_self = 217, // expr_self
S_expr_level = 218, // expr_level S_expr_anim = 218, // expr_anim
S_expr_animation = 219, // expr_animation S_expr_level = 219, // expr_level
S_expr_animtree = 220, // expr_animtree S_expr_animation = 220, // expr_animation
S_expr_identifier_nosize = 221, // expr_identifier_nosize S_expr_animtree = 221, // expr_animtree
S_expr_identifier = 222, // expr_identifier S_expr_identifier_nosize = 222, // expr_identifier_nosize
S_expr_path = 223, // expr_path S_expr_identifier = 223, // expr_identifier
S_expr_istring = 224, // expr_istring S_expr_path = 224, // expr_path
S_expr_string = 225, // expr_string S_expr_istring = 225, // expr_istring
S_expr_vector = 226, // expr_vector S_expr_string = 226, // expr_string
S_expr_hash = 227, // expr_hash S_expr_vector = 227, // expr_vector
S_expr_float = 228, // expr_float S_expr_hash = 228, // expr_hash
S_expr_integer = 229, // expr_integer S_expr_float = 229, // expr_float
S_expr_false = 230, // expr_false S_expr_integer = 230, // expr_integer
S_expr_true = 231 // expr_true S_expr_false = 231, // expr_false
S_expr_true = 232 // expr_true
}; };
}; };
@ -3531,6 +3533,21 @@ switch (yykind)
return symbol_type (token::AUTOEXEC, l); return symbol_type (token::AUTOEXEC, l);
} }
#endif #endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_CODECALL (location_type l)
{
return symbol_type (token::CODECALL, std::move (l));
}
#else
static
symbol_type
make_CODECALL (const location_type& l)
{
return symbol_type (token::CODECALL, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS #if 201103L <= YY_CPLUSPLUS
static static
symbol_type symbol_type
@ -5555,9 +5572,9 @@ switch (yykind)
/// Constants. /// Constants.
enum enum
{ {
yylast_ = 3493, ///< Last index in yytable_. yylast_ = 3502, ///< Last index in yytable_.
yynnts_ = 102, ///< Number of nonterminal symbols. yynnts_ = 102, ///< Number of nonterminal symbols.
yyfinal_ = 25 ///< Termination state number. yyfinal_ = 27 ///< Termination state number.
}; };
@ -6397,7 +6414,7 @@ switch (yykind)
#line 13 "parser.ypp" #line 13 "parser.ypp"
} } } // xsk::arc::t6 } } } // xsk::arc::t6
#line 6401 "parser.hpp" #line 6418 "parser.hpp"

View File

@ -1377,9 +1377,13 @@ auto decl_thread::print() const -> std::string
{ {
std::string data; std::string data;
if (flags == export_flags::vis_autoexec) if (static_cast<std::uint8_t>(flags) & static_cast<std::uint8_t>(export_flags::export_autoexec))
data += "autoexec "; data += "autoexec ";
else if (flags == export_flags::vis_private)
if (static_cast<std::uint8_t>(flags) & static_cast<std::uint8_t>(export_flags::export_codecall))
data += "codecall ";
if (static_cast<std::uint8_t>(flags) & static_cast<std::uint8_t>(export_flags::export_private2))
data += "private "; data += "private ";
data += name->print() + "(" + params->print() + ")" + "\n" + stmt->print() + "\n"; data += name->print() + "(" + params->print() + ")" + "\n" + stmt->print() + "\n";

View File

@ -99,13 +99,13 @@ struct string_ref
enum class export_flags : std::uint8_t enum class export_flags : std::uint8_t
{ {
none = 0x00, export_none = 0x00,
vis_public = 0x01, export_public = 0x01,
vis_autoexec = 0x02, export_autoexec = 0x02,
vis_unk = 0x04, export_private = 0x04,
vis_codecall = 0x08, export_codecall = 0x08,
vis_private = 0x10, export_private2 = 0x10,
varargs_may = 0x20, // T7, T8, T9 export_varargs = 0x20,
}; };
struct export_ref struct export_ref