#include "libparser.h"
#include "lexer.cc"
Namespaces | |
namespace | std |
Defines | |
#define | YYBISON 1 |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 0 |
#define | YYLSP_NEEDED 1 |
#define | yyparse utap_parse |
#define | yylex utap_lex |
#define | yyerror utap_error |
#define | yylval utap_lval |
#define | yychar utap_char |
#define | yydebug utap_debug |
#define | yynerrs utap_nerrs |
#define | yylloc utap_lloc |
#define | T_ASSIGNMENT 258 |
#define | T_ASSPLUS 259 |
#define | T_ASSMINUS 260 |
#define | T_ASSMULT 261 |
#define | T_ASSDIV 262 |
#define | T_ASSMOD 263 |
#define | T_ASSOR 264 |
#define | T_ASSAND 265 |
#define | T_ASSXOR 266 |
#define | T_ASSLSHIFT 267 |
#define | T_ASSRSHIFT 268 |
#define | T_EXCLAM 269 |
#define | T_INCREMENT 270 |
#define | T_DECREMENT 271 |
#define | T_PLUS 272 |
#define | T_MINUS 273 |
#define | T_MULT 274 |
#define | T_DIV 275 |
#define | T_MIN 276 |
#define | T_MAX 277 |
#define | T_MOD 278 |
#define | T_OR 279 |
#define | T_XOR 280 |
#define | T_LSHIFT 281 |
#define | T_RSHIFT 282 |
#define | T_BOOL_AND 283 |
#define | T_BOOL_OR 284 |
#define | T_KW_AND 285 |
#define | T_KW_OR 286 |
#define | T_KW_IMPLY 287 |
#define | T_KW_NOT 288 |
#define | T_FORALL 289 |
#define | T_LT 290 |
#define | T_LEQ 291 |
#define | T_EQ 292 |
#define | T_NEQ 293 |
#define | T_GEQ 294 |
#define | T_GT 295 |
#define | T_FOR 296 |
#define | T_WHILE 297 |
#define | T_DO 298 |
#define | T_BREAK 299 |
#define | T_CONTINUE 300 |
#define | T_SWITCH 301 |
#define | T_IF 302 |
#define | T_ELSE 303 |
#define | T_CASE 304 |
#define | T_DEFAULT 305 |
#define | T_RETURN 306 |
#define | T_CHAN_PRIORITY 307 |
#define | T_PROC_PRIORITY 308 |
#define | T_TYPEDEF 309 |
#define | T_STRUCT 310 |
#define | T_CONST 311 |
#define | T_OLDCONST 312 |
#define | T_URGENT 313 |
#define | T_BROADCAST 314 |
#define | T_TRUE 315 |
#define | T_FALSE 316 |
#define | T_META 317 |
#define | T_SYSTEM 318 |
#define | T_PROCESS 319 |
#define | T_STATE 320 |
#define | T_COMMIT 321 |
#define | T_INIT 322 |
#define | T_TRANS 323 |
#define | T_SELECT 324 |
#define | T_GUARD 325 |
#define | T_SYNC 326 |
#define | T_ASSIGN 327 |
#define | T_BEFORE 328 |
#define | T_AFTER 329 |
#define | T_PROGRESS 330 |
#define | T_ARROW 331 |
#define | T_UNCONTROL_ARROW 332 |
#define | T_WINNING 333 |
#define | T_LOSING 334 |
#define | T_DEADLOCK 335 |
#define | T_EF 336 |
#define | T_EG 337 |
#define | T_AF 338 |
#define | T_AG 339 |
#define | T_LEADSTO 340 |
#define | T_QUIT 341 |
#define | T_ERROR 342 |
#define | T_ID 343 |
#define | T_TYPENAME 344 |
#define | T_NAT 345 |
#define | T_NEW 346 |
#define | T_NEW_DECLARATION 347 |
#define | T_NEW_LOCAL_DECL 348 |
#define | T_NEW_INST 349 |
#define | T_NEW_SYSTEM 350 |
#define | T_NEW_PARAMETERS 351 |
#define | T_NEW_INVARIANT 352 |
#define | T_NEW_GUARD 353 |
#define | T_NEW_SYNC 354 |
#define | T_NEW_ASSIGN 355 |
#define | T_NEW_SELECT 356 |
#define | T_OLD 357 |
#define | T_OLD_DECLARATION 358 |
#define | T_OLD_LOCAL_DECL 359 |
#define | T_OLD_INST 360 |
#define | T_OLD_PARAMETERS 361 |
#define | T_OLD_INVARIANT 362 |
#define | T_OLD_GUARD 363 |
#define | T_OLD_ASSIGN 364 |
#define | T_PROPERTY 365 |
#define | T_EXPRESSION 366 |
#define | UOPERATOR 367 |
#define | YYLTYPE Position |
#define | REPORT_ERROR(loc, exc) utap_error(exc, loc.first_line, loc.first_column, loc.last_line, loc.last_column); |
#define | YYERROR_VERBOSE 1 |
#define | CALL(first, last, call) do { errorHandler->setCurrentPosition(first.first_line, first.first_column, last.last_line, last.last_column); ch->setPosition(position_t(first.first_line, first.first_column, last.last_line, last.last_column)); try { ch->call; } catch (TypeException &te) { errorHandler->handleError(te.what()); } } while (0) |
#define | YYDEBUG 0 |
#define | YYERROR_VERBOSE 1 |
#define | yystype YYSTYPE |
#define | YYSTYPE_IS_DECLARED 1 |
#define | YYSTYPE_IS_TRIVIAL 1 |
#define | YYFREE free |
#define | YYMALLOC malloc |
#define | YYSTACK_ALLOC YYMALLOC |
#define | YYSTACK_FREE YYFREE |
#define | YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY(To, From, Count) |
#define | YYSTACK_RELOCATE(Stack) |
#define | YYFINAL 83 |
#define | YYLAST 3271 |
#define | YYNTOKENS 127 |
#define | YYNNTS 137 |
#define | YYNRULES 373 |
#define | YYNSTATES 738 |
#define | YYUNDEFTOK 2 |
#define | YYMAXUTOK 367 |
#define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define | YYPACT_NINF -627 |
#define | YYTABLE_NINF -345 |
#define | YYSIZE_T unsigned int |
#define | yyerrok (yyerrstatus = 0) |
#define | yyclearin (yychar = YYEMPTY) |
#define | YYEMPTY (-2) |
#define | YYEOF 0 |
#define | YYACCEPT goto yyacceptlab |
#define | YYABORT goto yyabortlab |
#define | YYERROR goto yyerrorlab |
#define | YYFAIL goto yyerrlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYTERROR 1 |
#define | YYERRCODE 256 |
#define | YYLLOC_DEFAULT(Current, Rhs, N) |
#define | YYLEX yylex () |
#define | YYDPRINTF(Args) |
#define | YYDSYMPRINT(Args) |
#define | YYDSYMPRINTF(Title, Token, Value, Location) |
#define | YY_STACK_PRINT(Bottom, Top) |
#define | YY_REDUCE_PRINT(Rule) |
#define | YYINITDEPTH 200 |
#define | YYMAXDEPTH 10000 |
#define | YYPOPSTACK (yyvsp--, yyssp--, yylsp--) |
Typedefs | |
typedef YYSTYPE | YYSTYPE |
typedef short int | yysigned_char |
Enumerations | |
enum | yytokentype { T_ASSIGNMENT = 258, T_ASSPLUS = 259, T_ASSMINUS = 260, T_ASSMULT = 261, T_ASSDIV = 262, T_ASSMOD = 263, T_ASSOR = 264, T_ASSAND = 265, T_ASSXOR = 266, T_ASSLSHIFT = 267, T_ASSRSHIFT = 268, T_EXCLAM = 269, T_INCREMENT = 270, T_DECREMENT = 271, T_PLUS = 272, T_MINUS = 273, T_MULT = 274, T_DIV = 275, T_MIN = 276, T_MAX = 277, T_MOD = 278, T_OR = 279, T_XOR = 280, T_LSHIFT = 281, T_RSHIFT = 282, T_BOOL_AND = 283, T_BOOL_OR = 284, T_KW_AND = 285, T_KW_OR = 286, T_KW_IMPLY = 287, T_KW_NOT = 288, T_FORALL = 289, T_LT = 290, T_LEQ = 291, T_EQ = 292, T_NEQ = 293, T_GEQ = 294, T_GT = 295, T_FOR = 296, T_WHILE = 297, T_DO = 298, T_BREAK = 299, T_CONTINUE = 300, T_SWITCH = 301, T_IF = 302, T_ELSE = 303, T_CASE = 304, T_DEFAULT = 305, T_RETURN = 306, T_CHAN_PRIORITY = 307, T_PROC_PRIORITY = 308, T_TYPEDEF = 309, T_STRUCT = 310, T_CONST = 311, T_OLDCONST = 312, T_URGENT = 313, T_BROADCAST = 314, T_TRUE = 315, T_FALSE = 316, T_META = 317, T_SYSTEM = 318, T_PROCESS = 319, T_STATE = 320, T_COMMIT = 321, T_INIT = 322, T_TRANS = 323, T_SELECT = 324, T_GUARD = 325, T_SYNC = 326, T_ASSIGN = 327, T_BEFORE = 328, T_AFTER = 329, T_PROGRESS = 330, T_ARROW = 331, T_UNCONTROL_ARROW = 332, T_WINNING = 333, T_LOSING = 334, T_DEADLOCK = 335, T_EF = 336, T_EG = 337, T_AF = 338, T_AG = 339, T_LEADSTO = 340, T_QUIT = 341, T_ERROR = 342, T_ID = 343, T_TYPENAME = 344, T_NAT = 345, T_NEW = 346, T_NEW_DECLARATION = 347, T_NEW_LOCAL_DECL = 348, T_NEW_INST = 349, T_NEW_SYSTEM = 350, T_NEW_PARAMETERS = 351, T_NEW_INVARIANT = 352, T_NEW_GUARD = 353, T_NEW_SYNC = 354, T_NEW_ASSIGN = 355, T_NEW_SELECT = 356, T_OLD = 357, T_OLD_DECLARATION = 358, T_OLD_LOCAL_DECL = 359, T_OLD_INST = 360, T_OLD_PARAMETERS = 361, T_OLD_INVARIANT = 362, T_OLD_GUARD = 363, T_OLD_ASSIGN = 364, T_PROPERTY = 365, T_EXPRESSION = 366, UOPERATOR = 367 } |
Functions | |
std::ostream & | operator<< (std::ostream &out, const position_t &loc) |
static void | utap_error (const char *msg) |
static void | utap_error (const TypeException &te, int32_t fl, int32_t fc, int32_t ll, int32_t lc) |
static int | lexer_flex () |
static int | utap_lex () |
static YYSIZE_T | yystrlen (yystr) const char *yystr |
int | yyparse () |
static void | setStartToken (xta_part_t part, bool newxta) |
static int32_t | parseXTA (ParserBuilder *aParserBuilder, ErrorHandler *err, bool newxta, xta_part_t part) |
static int32_t | parseProperty (ParserBuilder *aParserBuilder, ErrorHandler *err) |
int32_t | parseXTA (const char *str, ParserBuilder *builder, ErrorHandler *err, bool newxta, xta_part_t part) |
int32_t | parseXTA (FILE *file, ParserBuilder *builder, ErrorHandler *err, bool newxta) |
int32_t | parseProperty (const char *str, ParserBuilder *aParserBuilder, ErrorHandler *err) |
int32_t | parseProperty (FILE *file, ParserBuilder *aParserBuilder, ErrorHandler *err) |
Variables | |
static YYLTYPE | last_loc |
static ErrorHandler * | errorHandler |
static ParserBuilder * | ch |
static syntax_t | syntax |
static int | syntax_token = 0 |
static const char * | PE_ARGLIST = "argument expression list expected" |
static const char * | PE_ASSIGN = "'=' expected" |
static const char * | PE_ASSIGN_EXP = "assignment expression expected" |
static const char * | PE_BANG = "'!' expected" |
static const char * | PE_COLON = "':' expected" |
static const char * | PE_CONST_EXP = "constant expression expected" |
static const char * | PE_EXPR = "expression expected" |
static const char * | PE_GUARD_EXP = "guard expression expected" |
static const char * | PE_INV = "invariant expression expected" |
static const char * | PE_LBRACE = "'{' expected" |
static const char * | PE_LBRACES = "'(' or '{' expected" |
static const char * | PE_LPAREN = "'(' expected" |
static const char * | PE_MEMBER = "member declarations expected" |
static const char * | PE_PARAMETERS = "parameters expected" |
static const char * | PE_PROCID = "process identifiers expected" |
static const char * | PE_QUE = "'?' expected" |
static const char * | PE_RPAREN = "')' expected" |
static const char * | PE_SEMICOLON = "';' expected" |
static const char * | PE_STATE_DECL = "state declaration expected" |
static const char * | PE_STATEID = "state identifier expected" |
static const char * | PE_SYNC_EXP = "synchronization expression expected" |
static const char * | PE_TRANS_DECL = "edge declaration expected" |
static char | rootTransId [MAXLEN] |
static int32_t | g_parameter_count |
static const unsigned char | yytranslate [] |
static const char *const | yytname [] |
static const unsigned short int | yyr1 [] |
static const unsigned char | yyr2 [] |
static const unsigned short int | yydefact [] |
static const short int | yydefgoto [] |
static const short int | yypact [] |
static const short int | yypgoto [] |
static const short int | yytable [] |
static const short int | yycheck [] |
static const unsigned short int | yystos [] |
const char * | yysrc |
YYSTYPE * | yyvaluep |
YYLTYPE * | yylocationp |
int | yychar |
YYSTYPE | yylval |
int | yynerrs |
YYLTYPE | yylloc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ while (0) |
|
|
|
|
|
|
|
Value: do \ { \ register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: ((Current).first_line = (Rhs)[1].first_line, \ (Current).first_column = (Rhs)[1].first_column, \ (Current).last_line = (Rhs)[N].last_line, \ (Current).last_column = (Rhs)[N].last_column) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: ((N) * (sizeof (short int) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) |
|
|
|
|
|
Value: do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Initial value: { -1, 22, 24, 28, 389, 30, 31, 104, 102, 206, 292, 294, 392, 25, 90, 91, 92, 383, 281, 36, 37, 169, 196, 197, 339, 420, 421, 422, 282, 94, 270, 271, 170, 63, 299, 300, 351, 352, 39, 212, 275, 328, 96, 417, 329, 378, 379, 416, 443, 444, 477, 526, 565, 566, 641, 642, 614, 659, 660, 657, 64, 676, 688, 57, 707, 445, 478, 479, 480, 481, 517, 514, 521, 524, 495, 537, 418, 449, 496, 680, 645, 571, 530, 574, 621, 653, 670, 650, 651, 699, 698, 684, 700, 59, 497, 240, 241, 231, 431, 54, 158, 55, 307, 65, 66, 171, 252, 314, 315, 172, 410, 438, 405, 367, 372, 320, 72, 73, 74, 403, 404, 435, 460, 461, 76, 543, 580, 581, 654, 628, 673, 672, 78, 80, 81, 188, 189 } |
|
|
|
|
|
|
|
|
|
|
|
Initial value: { -627, -627, -627, 6, -627, 129, -627, -627, 641, -627, -627, -627, -627, 750, -627, -627, -12, -627, 484, 485, 652, -18, -627, 490, -627, -286, -627, 318, -71, -14, -627, 446, 0, 2, -627, 476, -627, 377, -627, -627, 424, -627, -627, -627, -627, 376, 774, -627, -627, 308, 317, -627, -627, 193, -627, -627, -627, -627, -627, -406, 136, -614, -626, 107, -463, 386, -627, -627, -627, -627, -627, -627, -627, -627, -627, -627, 259, -537, -430, -627, -627, -627, -627, -627, -627, -627, -627, -627, 145, -627, -627, -627, -627, -15, -7, -627, -627, -627, -627, -627, -627, -627, 414, -627, 785, -63, -627, -627, 436, -627, -627, -627, -627, -627, -627, -627, 498, 634, 636, -147, 800, -627, -627, 321, 324, -627, -627, 220, -627, -627, -627, 157, 167, -627, -627, -627, -627 } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|