libutap
Macros | Typedefs | Enumerations | Functions | Variables
parser.cc File Reference
#include "libparser.h"
#include "utap/position.h"
#include <string.h>
#include <stddef.h>
#include "lexer.cc"

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.0.2"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   0
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define yyparse   utap_parse
 
#define yylex   utap_lex
 
#define yyerror   utap_error
 
#define yydebug   utap_debug
 
#define yynerrs   utap_nerrs
 
#define yylval   utap_lval
 
#define yychar   utap_char
 
#define yylloc   utap_lloc
 
#define YYLLOC_DEFAULT(Current, Rhs, N)
 
#define YYLTYPE   position_t
 
#define YYERROR_VERBOSE   1
 
#define CALL(first, last, call)   do { ch->setPosition(first.start, last.end); try { ch->call; } catch (TypeException &te) { ch->handleError(te.what()); } } while (0)
 
#define YY_(msg)   utap_msg(msg)
 
#define NB_STR   8
 
#define YY_NULLPTR   0
 
#define YYERROR_VERBOSE   1
 
#define YYDEBUG   0
 
#define YYTOKENTYPE
 
#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_MOD   276
 
#define T_OR   277
 
#define T_XOR   278
 
#define T_LSHIFT   279
 
#define T_RSHIFT   280
 
#define T_BOOL_AND   281
 
#define T_BOOL_OR   282
 
#define T_KW_AND   283
 
#define T_KW_OR   284
 
#define T_KW_XOR   285
 
#define T_KW_IMPLY   286
 
#define T_KW_NOT   287
 
#define T_SUP   288
 
#define T_INF   289
 
#define T_COS   290
 
#define T_SIN   291
 
#define T_EXP   292
 
#define T_LOG   293
 
#define T_SQRT   294
 
#define T_RANDOM   295
 
#define T_LN   296
 
#define T_FABS   297
 
#define T_POW   298
 
#define T_CEIL   299
 
#define T_FLOOR   300
 
#define T_FORALL   301
 
#define T_EXISTS   302
 
#define T_FOREACH   303
 
#define T_SUM   304
 
#define T_LT   305
 
#define T_LEQ   306
 
#define T_EQ   307
 
#define T_NEQ   308
 
#define T_GEQ   309
 
#define T_GT   310
 
#define T_FOR   311
 
#define T_WHILE   312
 
#define T_DO   313
 
#define T_BREAK   314
 
#define T_CONTINUE   315
 
#define T_SWITCH   316
 
#define T_IF   317
 
#define T_ELSE   318
 
#define T_CASE   319
 
#define T_DEFAULT   320
 
#define T_RETURN   321
 
#define T_ASSERT   322
 
#define T_PRIORITY   323
 
#define T_TYPEDEF   324
 
#define T_STRUCT   325
 
#define T_CONST   326
 
#define T_OLDCONST   327
 
#define T_URGENT   328
 
#define T_BROADCAST   329
 
#define T_TRUE   330
 
#define T_FALSE   331
 
#define T_META   332
 
#define T_SYSTEM   333
 
#define T_PROCESS   334
 
#define T_STATE   335
 
#define T_BRANCH   336
 
#define T_COMMIT   337
 
#define T_INIT   338
 
#define T_TRANS   339
 
#define T_SELECT   340
 
#define T_GUARD   341
 
#define T_SYNC   342
 
#define T_ASSIGN   343
 
#define T_BEFORE   344
 
#define T_AFTER   345
 
#define T_PROGRESS   346
 
#define T_ARROW   347
 
#define T_UNCONTROL_ARROW   348
 
#define T_IO   349
 
#define T_DEADLOCK   350
 
#define T_EF   351
 
#define T_EG   352
 
#define T_AF   353
 
#define T_AG   354
 
#define T_LEADSTO   355
 
#define T_RESULTSET   356
 
#define T_EF_PLUS   357
 
#define T_AG_PLUS   358
 
#define T_EF_MULT   359
 
#define T_AG_MULT   360
 
#define T_SCENARIO   361
 
#define T_CONTROL   362
 
#define T_CONTROL_T   363
 
#define T_SIMULATION   364
 
#define T_SIMULATE   365
 
#define T_CONSISTENCY   366
 
#define T_SPECIFICATION   367
 
#define T_IMPLEMENTATION   368
 
#define T_REFINEMENT   369
 
#define T_GANTT   370
 
#define T_PMAX   371
 
#define T_PROBA   372
 
#define T_DIAMOND   373
 
#define T_BOX   374
 
#define T_HASH   375
 
#define T_ERROR   376
 
#define T_ID   377
 
#define T_TYPENAME   378
 
#define T_NAT   379
 
#define T_FLOATING   380
 
#define T_POS_NEG_MAX   381
 
#define T_BOOL   382
 
#define T_INT   383
 
#define T_CHAN   384
 
#define T_CLOCK   385
 
#define T_VOID   386
 
#define T_SCALAR   387
 
#define T_DOUBLE   388
 
#define T_NEW   389
 
#define T_NEW_DECLARATION   390
 
#define T_NEW_LOCAL_DECL   391
 
#define T_NEW_INST   392
 
#define T_NEW_SYSTEM   393
 
#define T_NEW_PARAMETERS   394
 
#define T_NEW_INVARIANT   395
 
#define T_NEW_GUARD   396
 
#define T_NEW_SYNC   397
 
#define T_NEW_ASSIGN   398
 
#define T_NEW_SELECT   399
 
#define T_EXPONENTIALRATE   400
 
#define T_OLD   401
 
#define T_OLD_DECLARATION   402
 
#define T_OLD_LOCAL_DECL   403
 
#define T_OLD_INST   404
 
#define T_OLD_PARAMETERS   405
 
#define T_OLD_INVARIANT   406
 
#define T_OLD_GUARD   407
 
#define T_OLD_ASSIGN   408
 
#define T_PROPERTY   409
 
#define T_EXPRESSION   410
 
#define T_EXPRESSION_LIST   411
 
#define T_XTA_PROCESS   412
 
#define T_PROBABILITY   413
 
#define T_INSTANCELINE   414
 
#define T_MESSAGE   415
 
#define T_UPDATE   416
 
#define T_CONDITION   417
 
#define T_MITL_AND   418
 
#define T_MITL_OR   419
 
#define T_MITL_NEXT   420
 
#define T_DYNAMIC   421
 
#define T_HYBRID   422
 
#define T_SPAWN   423
 
#define T_EXIT   424
 
#define T_NUMOF   425
 
#define T_MIN   426
 
#define T_MAX   427
 
#define UOPERATOR   428
 
#define YYSTYPE_IS_TRIVIAL   1
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYSIZE_T   size_t
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YY_ATTRIBUTE(Spec)   /* empty */
 
#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
 
#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))
 
#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))
 
#define YYUSE(E)   ((void) (E))
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYMALLOC   malloc
 
#define YYFREE   free
 
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYCOPY(Dst, Src, Count)
 
#define YYFINAL   148
 
#define YYLAST   9202
 
#define YYNTOKENS   195
 
#define YYNNTS   203
 
#define YYNRULES   564
 
#define YYNSTATES   1197
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   428
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -1073
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-1073)))
 
#define YYTABLE_NINF   -523
 
#define yytable_value_is_error(Yytable_value)   0
 
#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 YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYRHSLOC(Rhs, K)   ((Rhs)[K])
 
#define YYDPRINTF(Args)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYCASE_(N, S)
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
 
#define YYSYNTAX_ERROR
 

Typedefs

typedef union YYSTYPE YYSTYPE
 
typedef unsigned char yytype_uint8
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

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_MOD = 276, T_OR = 277,
  T_XOR = 278, T_LSHIFT = 279, T_RSHIFT = 280, T_BOOL_AND = 281,
  T_BOOL_OR = 282, T_KW_AND = 283, T_KW_OR = 284, T_KW_XOR = 285,
  T_KW_IMPLY = 286, T_KW_NOT = 287, T_SUP = 288, T_INF = 289,
  T_COS = 290, T_SIN = 291, T_EXP = 292, T_LOG = 293,
  T_SQRT = 294, T_RANDOM = 295, T_LN = 296, T_FABS = 297,
  T_POW = 298, T_CEIL = 299, T_FLOOR = 300, T_FORALL = 301,
  T_EXISTS = 302, T_FOREACH = 303, T_SUM = 304, T_LT = 305,
  T_LEQ = 306, T_EQ = 307, T_NEQ = 308, T_GEQ = 309,
  T_GT = 310, T_FOR = 311, T_WHILE = 312, T_DO = 313,
  T_BREAK = 314, T_CONTINUE = 315, T_SWITCH = 316, T_IF = 317,
  T_ELSE = 318, T_CASE = 319, T_DEFAULT = 320, T_RETURN = 321,
  T_ASSERT = 322, T_PRIORITY = 323, T_TYPEDEF = 324, T_STRUCT = 325,
  T_CONST = 326, T_OLDCONST = 327, T_URGENT = 328, T_BROADCAST = 329,
  T_TRUE = 330, T_FALSE = 331, T_META = 332, T_SYSTEM = 333,
  T_PROCESS = 334, T_STATE = 335, T_BRANCH = 336, T_COMMIT = 337,
  T_INIT = 338, T_TRANS = 339, T_SELECT = 340, T_GUARD = 341,
  T_SYNC = 342, T_ASSIGN = 343, T_BEFORE = 344, T_AFTER = 345,
  T_PROGRESS = 346, T_ARROW = 347, T_UNCONTROL_ARROW = 348, T_IO = 349,
  T_DEADLOCK = 350, T_EF = 351, T_EG = 352, T_AF = 353,
  T_AG = 354, T_LEADSTO = 355, T_RESULTSET = 356, T_EF_PLUS = 357,
  T_AG_PLUS = 358, T_EF_MULT = 359, T_AG_MULT = 360, T_SCENARIO = 361,
  T_CONTROL = 362, T_CONTROL_T = 363, T_SIMULATION = 364, T_SIMULATE = 365,
  T_CONSISTENCY = 366, T_SPECIFICATION = 367, T_IMPLEMENTATION = 368, T_REFINEMENT = 369,
  T_GANTT = 370, T_PMAX = 371, T_PROBA = 372, T_DIAMOND = 373,
  T_BOX = 374, T_HASH = 375, T_ERROR = 376, T_ID = 377,
  T_TYPENAME = 378, T_NAT = 379, T_FLOATING = 380, T_POS_NEG_MAX = 381,
  T_BOOL = 382, T_INT = 383, T_CHAN = 384, T_CLOCK = 385,
  T_VOID = 386, T_SCALAR = 387, T_DOUBLE = 388, T_NEW = 389,
  T_NEW_DECLARATION = 390, T_NEW_LOCAL_DECL = 391, T_NEW_INST = 392, T_NEW_SYSTEM = 393,
  T_NEW_PARAMETERS = 394, T_NEW_INVARIANT = 395, T_NEW_GUARD = 396, T_NEW_SYNC = 397,
  T_NEW_ASSIGN = 398, T_NEW_SELECT = 399, T_EXPONENTIALRATE = 400, T_OLD = 401,
  T_OLD_DECLARATION = 402, T_OLD_LOCAL_DECL = 403, T_OLD_INST = 404, T_OLD_PARAMETERS = 405,
  T_OLD_INVARIANT = 406, T_OLD_GUARD = 407, T_OLD_ASSIGN = 408, T_PROPERTY = 409,
  T_EXPRESSION = 410, T_EXPRESSION_LIST = 411, T_XTA_PROCESS = 412, T_PROBABILITY = 413,
  T_INSTANCELINE = 414, T_MESSAGE = 415, T_UPDATE = 416, T_CONDITION = 417,
  T_MITL_AND = 418, T_MITL_OR = 419, T_MITL_NEXT = 420, T_DYNAMIC = 421,
  T_HYBRID = 422, T_SPAWN = 423, T_EXIT = 424, T_NUMOF = 425,
  T_MIN = 426, T_MAX = 427, UOPERATOR = 428
}
 

Functions

static void utap_error (const char *msg)
 
static int lexer_flex ()
 
static int utap_lex ()
 
const char * utap_msg (const char *msg)
 
int utap_parse (void)
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
static YYSIZE_T yystrlen (const char *yystr)
 
static char * yystpcpy (char *yydest, const char *yysrc)
 
static YYSIZE_T yytnamerr (char *yyres, const char *yystr)
 
static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
 
static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
 
int yyparse (void)
 
static void setStartToken (xta_part_t part, bool newxta)
 
static int32_t parseXTA (ParserBuilder *aParserBuilder, bool newxta, xta_part_t part, std::string xpath)
 
static int32_t parseProperty (ParserBuilder *aParserBuilder, const std::string &xpath)
 
int32_t parseXTA (const char *str, ParserBuilder *builder, bool newxta, xta_part_t part, std::string xpath)
 Parse a buffer in the XTA format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler. More...
 
int32_t parseXTA (const char *str, ParserBuilder *builder, bool newxta)
 
int32_t parseXTA (FILE *file, ParserBuilder *builder, bool newxta)
 Parse a file in the XTA format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler. More...
 
int32_t parseProperty (const char *str, ParserBuilder *aParserBuilder, const std::string &xpath)
 Parse properties from a buffer. More...
 
int32_t parseProperty (FILE *file, ParserBuilder *aParserBuilder)
 Parse properties from a file. More...
 

Variables

static ParserBuilderch
 
static syntax_t syntax
 
static int syntax_token = 0
 
static char rootTransId [MAXLEN]
 
static int types = 0
 
YYSTYPE utap_lval
 
YYLTYPE utap_lloc
 
static const yytype_uint8 yytranslate []
 
static const char *const yytname []
 
static const yytype_int16 yypact []
 
static const yytype_uint16 yydefact []
 
static const yytype_int16 yypgoto []
 
static const yytype_int16 yydefgoto []
 
static const yytype_int16 yytable []
 
static const yytype_int16 yycheck []
 
static const yytype_uint16 yystos []
 
static const yytype_uint16 yyr1 []
 
static const yytype_uint8 yyr2 []
 
int yychar
 
YYSTYPE yylval
 
YYLTYPE yylloc
 
int yynerrs
 

Macro Definition Documentation

#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))
#define CALL (   first,
  last,
  call 
)    do { ch->setPosition(first.start, last.end); try { ch->call; } catch (TypeException &te) { ch->handleError(te.what()); } } while (0)

Referenced by yyparse().

#define NB_STR   8

Referenced by utap_msg().

#define T_AF   353
#define T_AFTER   345
#define T_AG   354
#define T_AG_MULT   360
#define T_AG_PLUS   358
#define T_ARROW   347
#define T_ASSAND   265
#define T_ASSDIV   262
#define T_ASSERT   322
#define T_ASSIGN   343
#define T_ASSIGNMENT   258
#define T_ASSLSHIFT   267
#define T_ASSMINUS   260
#define T_ASSMOD   263
#define T_ASSMULT   261
#define T_ASSOR   264
#define T_ASSPLUS   259
#define T_ASSRSHIFT   268
#define T_ASSXOR   266
#define T_BEFORE   344
#define T_BOOL   382
#define T_BOOL_AND   281
#define T_BOOL_OR   282
#define T_BOX   374
#define T_BRANCH   336
#define T_BREAK   314
#define T_BROADCAST   329
#define T_CASE   319
#define T_CEIL   299
#define T_CHAN   384
#define T_CLOCK   385
#define T_COMMIT   337
#define T_CONDITION   417

Referenced by setStartToken().

#define T_CONSISTENCY   366
#define T_CONST   326
#define T_CONTINUE   315
#define T_CONTROL   362
#define T_CONTROL_T   363
#define T_COS   290
#define T_DEADLOCK   350
#define T_DECREMENT   271
#define T_DEFAULT   320
#define T_DIAMOND   373
#define T_DIV   275
#define T_DO   313
#define T_DOUBLE   388
#define T_DYNAMIC   421
#define T_EF   351
#define T_EF_MULT   359
#define T_EF_PLUS   357
#define T_EG   352
#define T_ELSE   318
#define T_EQ   307
#define T_ERROR   376
#define T_EXCLAM   269
#define T_EXISTS   302
#define T_EXIT   424
#define T_EXP   292
#define T_EXPONENTIALRATE   400

Referenced by setStartToken().

#define T_EXPRESSION   410

Referenced by setStartToken().

#define T_EXPRESSION_LIST   411

Referenced by setStartToken().

#define T_FABS   297
#define T_FALSE   331
#define T_FLOATING   380
#define T_FLOOR   300
#define T_FOR   311
#define T_FORALL   301
#define T_FOREACH   303
#define T_GANTT   370
#define T_GEQ   309
#define T_GT   310
#define T_GUARD   341
#define T_HASH   375
#define T_HYBRID   422
#define T_ID   377
#define T_IF   317
#define T_IMPLEMENTATION   368
#define T_INCREMENT   270
#define T_INF   289
#define T_INIT   338
#define T_INSTANCELINE   414

Referenced by setStartToken().

#define T_INT   383
#define T_IO   349
#define T_KW_AND   283
#define T_KW_IMPLY   286
#define T_KW_NOT   287
#define T_KW_OR   284
#define T_KW_XOR   285
#define T_LEADSTO   355
#define T_LEQ   306
#define T_LN   296
#define T_LOG   293
#define T_LSHIFT   279
#define T_LT   305
#define T_MAX   427
#define T_MESSAGE   415

Referenced by setStartToken().

#define T_META   332
#define T_MIN   426
#define T_MINUS   273
#define T_MITL_AND   418
#define T_MITL_NEXT   420
#define T_MITL_OR   419
#define T_MOD   276
#define T_MULT   274
#define T_NAT   379
#define T_NEQ   308
#define T_NEW   389

Referenced by setStartToken().

#define T_NEW_ASSIGN   398

Referenced by setStartToken().

#define T_NEW_DECLARATION   390

Referenced by setStartToken().

#define T_NEW_GUARD   396

Referenced by setStartToken().

#define T_NEW_INST   392

Referenced by setStartToken().

#define T_NEW_INVARIANT   395

Referenced by setStartToken().

#define T_NEW_LOCAL_DECL   391

Referenced by setStartToken().

#define T_NEW_PARAMETERS   394

Referenced by setStartToken().

#define T_NEW_SELECT   399

Referenced by setStartToken().

#define T_NEW_SYNC   397

Referenced by setStartToken().

#define T_NEW_SYSTEM   393

Referenced by setStartToken().

#define T_NUMOF   425
#define T_OLD   401

Referenced by setStartToken().

#define T_OLD_ASSIGN   408

Referenced by setStartToken().

#define T_OLD_DECLARATION   402

Referenced by setStartToken().

#define T_OLD_GUARD   407

Referenced by setStartToken().

#define T_OLD_INST   404

Referenced by setStartToken().

#define T_OLD_INVARIANT   406

Referenced by setStartToken().

#define T_OLD_LOCAL_DECL   403

Referenced by setStartToken().

#define T_OLD_PARAMETERS   405

Referenced by setStartToken().

#define T_OLDCONST   327
#define T_OR   277
#define T_PLUS   272
#define T_PMAX   371
#define T_POS_NEG_MAX   381
#define T_POW   298
#define T_PRIORITY   323
#define T_PROBA   372
#define T_PROBABILITY   413

Referenced by setStartToken().

#define T_PROCESS   334
#define T_PROGRESS   346
#define T_PROPERTY   409

Referenced by setStartToken().

#define T_RANDOM   295
#define T_REFINEMENT   369
#define T_RESULTSET   356
#define T_RETURN   321
#define T_RSHIFT   280
#define T_SCALAR   387
#define T_SCENARIO   361
#define T_SELECT   340
#define T_SIMULATE   365
#define T_SIMULATION   364
#define T_SIN   291
#define T_SPAWN   423
#define T_SPECIFICATION   367
#define T_SQRT   294
#define T_STATE   335
#define T_STRUCT   325
#define T_SUM   304
#define T_SUP   288
#define T_SWITCH   316
#define T_SYNC   342
#define T_SYSTEM   333
#define T_TRANS   339
#define T_TRUE   330
#define T_TYPEDEF   324
#define T_TYPENAME   378
#define T_UNCONTROL_ARROW   348
#define T_UPDATE   416

Referenced by setStartToken().

#define T_URGENT   328
#define T_VOID   386
#define T_WHILE   312
#define T_XOR   278
#define T_XTA_PROCESS   412

Referenced by setStartToken().

#define UOPERATOR   428
#define YY_ (   msg)    utap_msg(msg)

Referenced by yyparse(), and yysyntax_error().

#define YY_ATTRIBUTE (   Spec)    /* empty */
#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Referenced by yydestruct(), and yyparse().

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Referenced by yydestruct(), and yyparse().

#define YY_INITIAL_VALUE (   Value)    Value
#define YY_NULLPTR   0

Referenced by yysyntax_error().

#define YY_REDUCE_PRINT (   Rule)

Referenced by yyparse().

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Referenced by yyparse().

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)

Referenced by yydestruct(), and yyparse().

#define YYABORT   goto yyabortlab

Referenced by yyparse().

#define YYACCEPT   goto yyacceptlab

Referenced by yyparse().

#define YYBACKUP (   Token,
  Value 
)
Value:
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
} \
while (0)
#define YYERROR
Definition: parser.cc:3533
#define yyerror
Definition: parser.cc:65
#define YYEMPTY
Definition: parser.cc:3528
#define YY_(msg)
Definition: parser.cc:129
#define yychar
Definition: parser.cc:70
#define YYPOPSTACK(N)
#define yylval
Definition: parser.cc:69
if(!(yy_init))
Definition: lexer.cc:806
#define YYBISON   1
#define YYBISON_VERSION   "3.0.2"
#define YYCASE_ (   N,
 
)
Value:
case N: \
yyformat = S; \
break

Referenced by yysyntax_error().

#define yychar   utap_char
#define yyclearin   (yychar = YYEMPTY)
#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)
#define YYSIZE_T
Definition: parser.cc:658
#define YYCOPY_NEEDED   1
#define yydebug   utap_debug
#define YYDEBUG   0
#define YYDPRINTF (   Args)

Referenced by yyparse().

#define YYEMPTY   (-2)

Referenced by yyparse(), and yysyntax_error().

#define YYEOF   0

Referenced by yyparse().

#define YYERRCODE   256
#define yyerrok   (yyerrstatus = 0)
#define yyerror   utap_error

Referenced by yyparse().

#define YYERROR   goto yyerrorlab
#define YYERROR_VERBOSE   1
#define YYERROR_VERBOSE   1
#define YYFINAL   148

Referenced by yyparse().

#define YYFREE   free
#define YYINITDEPTH   200

Referenced by yyparse().

#define YYLAST   9202

Referenced by yyparse(), and yysyntax_error().

#define yylex   utap_lex

Referenced by yyparse().

#define yylloc   utap_lloc

Referenced by yyparse().

#define YYLLOC_DEFAULT (   Current,
  Rhs,
 
)
Value:
if (N) \
{ \
(Current).start = YYRHSLOC (Rhs, 1).start; \
(Current).end = YYRHSLOC (Rhs, N).end; \
} \
else \
{ \
(Current).start = (Current).end = \
YYRHSLOC (Rhs, 0).end; \
} \
while (0)
#define YYRHSLOC(Rhs, K)
Definition: parser.cc:3584
if(!(yy_init))
Definition: lexer.cc:806

Referenced by yyparse().

#define YYLTYPE   position_t

Referenced by yyparse().

#define yylval   utap_lval

Referenced by yyparse().

#define YYMALLOC   malloc
#define YYMAXDEPTH   10000

Referenced by yyparse().

#define YYMAXUTOK   428
#define yynerrs   utap_nerrs

Referenced by yyparse().

#define YYNNTS   203
#define YYNRULES   564
#define YYNSTATES   1197
#define YYNTOKENS   195

Referenced by yyparse(), and yysyntax_error().

#define YYPACT_NINF   -1073
#define yypact_value_is_default (   Yystate)    (!!((Yystate) == (-1073)))

Referenced by yyparse(), and yysyntax_error().

#define yyparse   utap_parse
#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N), yylsp -= (N))

Referenced by yyparse().

#define YYPULL   1
#define YYPURE   0
#define YYPUSH   0
#define YYRECOVERING ( )    (!!yyerrstatus)
#define YYRHSLOC (   Rhs,
 
)    ((Rhs)[K])
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
#define YYSIZE_T   size_t
#define YYSKELETON_NAME   "yacc.c"
#define YYSTACK_ALLOC   YYMALLOC

Referenced by yyparse().

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Referenced by yysyntax_error().

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
union YYSTYPE YYSTYPE
Definition: parser.cc:580
short int yytype_int16
Definition: parser.cc:648
#define YYLTYPE
Definition: parser.cc:99
#define YYSTACK_GAP_MAXIMUM
Definition: parser.cc:814

Referenced by yyparse().

#define YYSTACK_FREE   YYFREE

Referenced by yyparse().

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)
Value:
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#define YYCOPY(Dst, Src, Count)
Definition: parser.cc:850
#define YYSIZE_T
Definition: parser.cc:658
#define YYSTACK_GAP_MAXIMUM
Definition: parser.cc:814

Referenced by yyparse().

#define YYSTYPE_IS_DECLARED   1
#define YYSTYPE_IS_TRIVIAL   1
#define YYSYNTAX_ERROR
Value:
yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
static int yysyntax_error(YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
Definition: parser.cc:3871

Referenced by yyparse().

#define YYTABLE_NINF   -523
#define yytable_value_is_error (   Yytable_value)    0

Referenced by yyparse(), and yysyntax_error().

#define YYTERROR   1

Referenced by yyparse(), and yysyntax_error().

#define YYTOKENTYPE
#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Referenced by yyparse().

#define YYUNDEFTOK   2
#define YYUSE (   E)    ((void) (E))

Referenced by yydestruct().

Typedef Documentation

typedef union YYSTYPE YYSTYPE
typedef short int yytype_int16
typedef signed char yytype_int8
typedef unsigned short int yytype_uint16
typedef unsigned char yytype_uint8

Enumeration Type Documentation

Enumerator
T_ASSIGNMENT 
T_ASSPLUS 
T_ASSMINUS 
T_ASSMULT 
T_ASSDIV 
T_ASSMOD 
T_ASSOR 
T_ASSAND 
T_ASSXOR 
T_ASSLSHIFT 
T_ASSRSHIFT 
T_EXCLAM 
T_INCREMENT 
T_DECREMENT 
T_PLUS 
T_MINUS 
T_MULT 
T_DIV 
T_MOD 
T_OR 
T_XOR 
T_LSHIFT 
T_RSHIFT 
T_BOOL_AND 
T_BOOL_OR 
T_KW_AND 
T_KW_OR 
T_KW_XOR 
T_KW_IMPLY 
T_KW_NOT 
T_SUP 
T_INF 
T_COS 
T_SIN 
T_EXP 
T_LOG 
T_SQRT 
T_RANDOM 
T_LN 
T_FABS 
T_POW 
T_CEIL 
T_FLOOR 
T_FORALL 
T_EXISTS 
T_FOREACH 
T_SUM 
T_LT 
T_LEQ 
T_EQ 
T_NEQ 
T_GEQ 
T_GT 
T_FOR 
T_WHILE 
T_DO 
T_BREAK 
T_CONTINUE 
T_SWITCH 
T_IF 
T_ELSE 
T_CASE 
T_DEFAULT 
T_RETURN 
T_ASSERT 
T_PRIORITY 
T_TYPEDEF 
T_STRUCT 
T_CONST 
T_OLDCONST 
T_URGENT 
T_BROADCAST 
T_TRUE 
T_FALSE 
T_META 
T_SYSTEM 
T_PROCESS 
T_STATE 
T_BRANCH 
T_COMMIT 
T_INIT 
T_TRANS 
T_SELECT 
T_GUARD 
T_SYNC 
T_ASSIGN 
T_BEFORE 
T_AFTER 
T_PROGRESS 
T_ARROW 
T_UNCONTROL_ARROW 
T_IO 
T_DEADLOCK 
T_EF 
T_EG 
T_AF 
T_AG 
T_LEADSTO 
T_RESULTSET 
T_EF_PLUS 
T_AG_PLUS 
T_EF_MULT 
T_AG_MULT 
T_SCENARIO 
T_CONTROL 
T_CONTROL_T 
T_SIMULATION 
T_SIMULATE 
T_CONSISTENCY 
T_SPECIFICATION 
T_IMPLEMENTATION 
T_REFINEMENT 
T_GANTT 
T_PMAX 
T_PROBA 
T_DIAMOND 
T_BOX 
T_HASH 
T_ERROR 
T_ID 
T_TYPENAME 
T_NAT 
T_FLOATING 
T_POS_NEG_MAX 
T_BOOL 
T_INT 
T_CHAN 
T_CLOCK 
T_VOID 
T_SCALAR 
T_DOUBLE 
T_NEW 
T_NEW_DECLARATION 
T_NEW_LOCAL_DECL 
T_NEW_INST 
T_NEW_SYSTEM 
T_NEW_PARAMETERS 
T_NEW_INVARIANT 
T_NEW_GUARD 
T_NEW_SYNC 
T_NEW_ASSIGN 
T_NEW_SELECT 
T_EXPONENTIALRATE 
T_OLD 
T_OLD_DECLARATION 
T_OLD_LOCAL_DECL 
T_OLD_INST 
T_OLD_PARAMETERS 
T_OLD_INVARIANT 
T_OLD_GUARD 
T_OLD_ASSIGN 
T_PROPERTY 
T_EXPRESSION 
T_EXPRESSION_LIST 
T_XTA_PROCESS 
T_PROBABILITY 
T_INSTANCELINE 
T_MESSAGE 
T_UPDATE 
T_CONDITION 
T_MITL_AND 
T_MITL_OR 
T_MITL_NEXT 
T_DYNAMIC 
T_HYBRID 
T_SPAWN 
T_EXIT 
T_NUMOF 
T_MIN 
T_MAX 
UOPERATOR 

Function Documentation

void free ( void *  )
static int lexer_flex ( )
static

Referenced by utap_lex().

void* malloc ( YYSIZE_T  )
static int32_t parseProperty ( ParserBuilder aParserBuilder,
const std::string &  xpath 
)
static
int32_t parseProperty ( const char *  str,
UTAP::ParserBuilder aParserBuilder,
const std::string &  xpath = "" 
)

Parse properties from a buffer.

The properties are reported using the given ParserBuilder and errors are reported using the ErrorHandler.

References parseProperty(), utap__delete_buffer(), utap__scan_string(), and YY_CURRENT_BUFFER.

int32_t parseProperty ( FILE *  ,
UTAP::ParserBuilder aParserBuilder 
)

Parse properties from a file.

The properties are reported using the given ParserBuilder and errors are reported using the ErrorHandler.

References parseProperty(), utap__create_buffer(), utap__delete_buffer(), utap__switch_to_buffer(), YY_BUF_SIZE, and YY_CURRENT_BUFFER.

static int32_t parseXTA ( ParserBuilder aParserBuilder,
bool  newxta,
xta_part_t  part,
std::string  xpath 
)
static
int32_t parseXTA ( const char *  ,
UTAP::ParserBuilder ,
bool  newxta,
UTAP::xta_part_t  part,
std::string  xpath 
)

Parse a buffer in the XTA format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler.

If newxta is true, then the 4.x syntax is used; otherwise the 3.x syntax is used. On success, this function returns with a positive value.

References parseXTA(), utap__delete_buffer(), utap__scan_string(), and YY_CURRENT_BUFFER.

int32_t parseXTA ( const char *  str,
ParserBuilder builder,
bool  newxta 
)

References parseXTA(), and UTAP::S_XTA.

int32_t parseXTA ( FILE *  ,
UTAP::ParserBuilder ,
bool  newxta 
)

Parse a file in the XTA format, reporting the system to the given implementation of the the ParserBuilder interface and reporting errors to the ErrorHandler.

If newxta is true, then the 4.x syntax is used; otherwise the 3.x syntax is used. On success, this function returns with a positive value.

References parseXTA(), UTAP::S_XTA, utap__create_buffer(), utap__delete_buffer(), utap__switch_to_buffer(), YY_BUF_SIZE, and YY_CURRENT_BUFFER.

static void setStartToken ( xta_part_t  part,
bool  newxta 
)
static
static void utap_error ( const char *  msg)
static
static int utap_lex ( )
static

References lexer_flex(), and syntax_token.

const char* utap_msg ( const char *  msg)

References NB_STR.

int utap_parse ( void  )

Referenced by parseProperty(), and parseXTA().

static void yydestruct ( const char *  yymsg,
int  yytype,
YYSTYPE yyvaluep,
YYLTYPE yylocationp 
)
static
int yyparse ( void  )

References UTAP::Constants::A_UNTIL, UTAP::Constants::A_WEAKUNTIL, UTAP::Constants::AF, UTAP::Constants::AG, UTAP::Constants::AG_R_Piotr, UTAP::Constants::AND, UTAP::Constants::ASSAND, UTAP::Constants::ASSDIV, UTAP::Constants::ASSIGN, UTAP::Constants::ASSLSHIFT, UTAP::Constants::ASSMINUS, UTAP::Constants::ASSMOD, UTAP::Constants::ASSMULT, UTAP::Constants::ASSOR, UTAP::Constants::ASSPLUS, UTAP::Constants::ASSRSHIFT, UTAP::Constants::ASSXOR, UTAP::Constants::BIT_AND, UTAP::Constants::BIT_LSHIFT, UTAP::Constants::BIT_OR, UTAP::Constants::BIT_RSHIFT, UTAP::Constants::BIT_XOR, UTAP::Constants::BOX, CALL, UTAP::Constants::CEIL_F, UTAP::Constants::CONSISTENCY, UTAP::Constants::CONTROL, UTAP::Constants::CONTROL_TOPT, UTAP::Constants::CONTROL_TOPT_DEF1, UTAP::Constants::CONTROL_TOPT_DEF2, UTAP::Constants::COS_F, UTAP::Constants::DIAMOND, UTAP::Constants::DIV, UTAP::Constants::EF, UTAP::Constants::EF_CONTROL, UTAP::Constants::EF_R_Piotr, UTAP::Constants::EG, UTAP::Constants::EQ, UTAP::Constants::EXP_F, UTAP::Constants::FABS_F, UTAP::Constants::FLOOR_F, UTAP::Constants::FRACTION, UTAP::Constants::GE, UTAP::Constants::GT, UTAP::Constants::IMPLEMENTATION, UTAP::Constants::INF_VAR, UTAP::Constants::LE, UTAP::Constants::LEADSTO, UTAP::Constants::LIST, UTAP::Constants::LN_F, UTAP::Constants::LOG_F, UTAP::Constants::LT, UTAP::Constants::MAX, MAXLEN, UTAP::Constants::MIN, UTAP::Constants::MINUS, UTAP::Constants::MOD, UTAP::Constants::MULT, UTAP::Constants::NEQ, UTAP::Constants::NOT, UTAP::Constants::OR, UTAP::Constants::PLUS, UTAP::Constants::PMAX, UTAP::Constants::PO_CONTROL, UTAP::Constants::POW_F, UTAP::Constants::RANDOM_F, UTAP::Constants::RATE, UTAP::Constants::REFINEMENT_GE, UTAP::Constants::REFINEMENT_LE, UTAP::Constants::RESTRICT, rootTransId, UTAP::Constants::SIMULATION_GE, UTAP::Constants::SIMULATION_LE, UTAP::Constants::SIN_F, UTAP::Constants::SPECIFICATION, UTAP::Constants::SQRT_F, UTAP::Constants::SUP_VAR, UTAP::Constants::SYNC_BANG, UTAP::Constants::SYNC_CSP, UTAP::Constants::SYNC_QUE, UTAP::Constants::SYNTAX_COMPOSITION, UTAP::Constants::TIOCOMPOSITION, UTAP::Constants::TIOCONJUNCTION, UTAP::Constants::TIOQUOTIENT, types, UTAP::Constants::XOR, YY_, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yyalloc, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror, YYFINAL, YYINITDEPTH, YYLAST, yylex, yylloc, YYLLOC_DEFAULT, YYLTYPE, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, YYSYNTAX_ERROR, yytable, yytable_value_is_error, YYTERROR, and YYTRANSLATE.

static char* yystpcpy ( char *  yydest,
const char *  yysrc 
)
static

Referenced by yytnamerr().

static YYSIZE_T yystrlen ( const char *  yystr)
static

References YYSIZE_T.

Referenced by yysyntax_error(), and yytnamerr().

static int yysyntax_error ( YYSIZE_T yymsg_alloc,
char **  yymsg,
yytype_int16 yyssp,
int  yytoken 
)
static
static YYSIZE_T yytnamerr ( char *  yyres,
const char *  yystr 
)
static

References YYSIZE_T, yystpcpy(), and yystrlen().

Referenced by yysyntax_error().

Variable Documentation

ParserBuilder* ch
static
char rootTransId[MAXLEN]
static

Referenced by yyparse().

syntax_t syntax
static

Referenced by parseProperty(), and parseXTA().

int syntax_token = 0
static

Referenced by setStartToken(), and utap_lex().

int types = 0
static
YYLTYPE utap_lloc
YYSTYPE utap_lval
int yychar
const yytype_int16 yycheck[]
static

Referenced by yyparse(), and yysyntax_error().

const yytype_uint16 yydefact[]
static

Referenced by yyparse().

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 30, 32, 124, 156, 744, 142, 438, 319, 157,
158, 452, 453, 454, 159, 314, 805, 806, 308, 447,
459, 662, 568, 739, 859, 917, 966, 1010, 1011, 1038,
1083, 33, 160, 564, 161, 162, 163, 665, 873, 437,
52, 53, 258, 315, 316, 463, 667, 812, 813, 814,
328, 329, 477, 746, 165, 440, 441, 554, 259, 114,
100, 322, 323, 469, 470, 574, 55, 168, 654, 733,
35, 801, 848, 849, 851, 908, 909, 894, 965, 1004,
1005, 1097, 1099, 1078, 1063, 1123, 1124, 1120, 116, 1141,
1136, 109, 144, 1158, 834, 895, 896, 946, 943, 117,
874, 929, 740, 811, 875, 1128, 1085, 973, 921, 976,
1048, 1093, 1114, 1090, 1091, 1150, 1149, 1132, 1151, 111,
112, 372, 373, 361, 754, 749, 751, 102, 337, 593,
677, 679, 682, 680, 103, 244, 104, 105, 106, 496,
119, 120, 260, 387, 505, 506, 604, 261, 699, 767,
694, 607, 612, 511, 127, 128, 266, 268, 129, 265,
397, 692, 693, 764, 832, 833, 131, 949, 990, 991,
1094, 1055, 1117, 1116, 133, 135, 136, 622, 296, 297,
107, 526, 955, 794, 535, 536, 637, 638, 639, 640,
641, 642, 643, 718, 633, 531, 630, 298, 428, 429,
299, 300, 301
}

Referenced by yyparse().

YYLTYPE yylloc
YYSTYPE yylval
int yynerrs
const yytype_int16 yypact[]
static

Referenced by yyparse(), and yysyntax_error().

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-1073, -1073, 791, 678, -87, -1073, -1073, -1073, 234, 551,
-1073, -1073, -194, -695, -1073, -1073, -1073, -48, -1073, -1073,
-1073, -1073, -1073, -1073, -1073, -1073, -1073, -1073, -237, -1073,
-1073, 372, -1073, -1073, -1073, -1073, -31, -1073, -1073, -166,
-244, 633, -27, -1073, 351, -1073, -1073, -630, -1073, -59,
-273, -1073, -613, -1073, -32, -1073, 267, -1073, 22, -125,
951, 495, -243, -1073, 243, -1073, -1073, 799, -1073, -1073,
172, -1073, -1073, -79, -1073, -1073, -134, -800, -133, -1073,
-206, -1073, -1073, -1073, -1073, -1073, -1073, -1046, -282, -1039,
-768, -296, -1073, -1072, -739, -1073, -1073, -1073, -1073, -58,
-1073, -1073, -85, -790, -750, -1073, -1073, -1073, -1073, -1073,
-1073, -1073, -1073, -1073, -242, -1073, -1073, -1073, -1073, -4,
-7, -1073, -1073, -1073, -1073, -1073, -1073, -1073, -1073, -1073,
-1073, -1073, -1073, -1073, -1073, -1073, -1073, -1073, -1073, -411,
-1073, 833, -112, -1073, -1073, 247, -1073, -1073, -1073, -1073,
-1073, -1073, -1073, -1073, 340, 583, -1073, -1073, 588, -1073,
-1073, -572, 839, -1073, -1073, -30, -29, -1073, -1073, -167,
-1073, -1073, -1073, -254, -251, -1073, -1073, -1073, -401, -1073,
-1073, -407, -1073, -231, -387, -486, -1073, -1073, -1073, -1073,
-1073, -1073, -1073, -290, 156, -582, -1073, -1073, 157, -274,
-1073, -1073, -1073
}

Referenced by yyparse().

const yytype_uint16 yyr1[]
static

Referenced by yyparse().

const yytype_uint8 yyr2[]
static

Referenced by yyparse().

const yytype_uint16 yystos[]
static

Referenced by yyparse().

const yytype_int16 yytable[]
static

Referenced by yyparse(), and yysyntax_error().

const char* const yytname[]
static

Referenced by yysyntax_error().

const yytype_uint8 yytranslate[]
static