#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <iostream>
#include "nodes.h"
#include "GlobalVariables.h"
#include "StochModel.h"
#include "StochModelComp.h"
#include "symtab.h"
#include "SetNode.h"
#include "AmplModel.h"
Classes | |
union | yyalloc |
Defines | |
#define | YYBISON 1 |
#define | YYBISON_VERSION "2.4.1" |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 0 |
#define | YYPUSH 0 |
#define | YYPULL 1 |
#define | YYLSP_NEEDED 0 |
#define | YYERROR_VERBOSE |
#define | YYDEBUG 1 |
#define | YYERROR_VERBOSE 0 |
#define | YYTOKEN_TABLE 0 |
#define | YYTOKENTYPE |
#define | ID 258 |
#define | INT_VAL 259 |
#define | FLOAT_VAL 260 |
#define | INFINITY 261 |
#define | COEFF 262 |
#define | COVER 263 |
#define | OBJ 264 |
#define | DEFAULT 265 |
#define | FROM 266 |
#define | TO 267 |
#define | TO_COME 268 |
#define | MODELTYPE 269 |
#define | DOTDOT 270 |
#define | NET_IN 271 |
#define | NET_OUT 272 |
#define | DIMEN 273 |
#define | ORDERED 274 |
#define | CIRCULAR 275 |
#define | REVERSED 276 |
#define | SYMBOLIC 277 |
#define | ARC 278 |
#define | INTEGER 279 |
#define | BINARY 280 |
#define | CHECK 281 |
#define | CLOSE 282 |
#define | DISPLAY 283 |
#define | DROP 284 |
#define | INCLUDE 285 |
#define | PRINT 286 |
#define | PRINTF 287 |
#define | QUIT 288 |
#define | RESET 289 |
#define | RESTORE 290 |
#define | SOLVE 291 |
#define | UPDATE 292 |
#define | WRITE 293 |
#define | SHELL 294 |
#define | MODEL 295 |
#define | DATA 296 |
#define | OPTION 297 |
#define | LET 298 |
#define | SOLUTION 299 |
#define | FIX 300 |
#define | UNFIX 301 |
#define | END 302 |
#define | FUNCTION 303 |
#define | PIPE 304 |
#define | FORMAT 305 |
#define | SETOF 306 |
#define | BY 307 |
#define | LESS 308 |
#define | MOD 309 |
#define | DIV 310 |
#define | MIN 311 |
#define | MAX 312 |
#define | IF 313 |
#define | THEN 314 |
#define | ELSE 315 |
#define | AND 316 |
#define | OR 317 |
#define | EXISTS 318 |
#define | FORALL 319 |
#define | NOT 320 |
#define | WITHIN 321 |
#define | WHILE 322 |
#define | REPEAT 323 |
#define | FOR 324 |
#define | CARD 325 |
#define | NEXT 326 |
#define | NEXTW 327 |
#define | PREV 328 |
#define | PREVW 329 |
#define | FIRST 330 |
#define | LAST 331 |
#define | MEMBER 332 |
#define | ORD 333 |
#define | ORD_ZERO 334 |
#define | VAR 335 |
#define | PARAM 336 |
#define | SET 337 |
#define | MAXIMIZE 338 |
#define | MINIMIZE 339 |
#define | OBJECTIVE 340 |
#define | SUBJECTTO 341 |
#define | SUM 342 |
#define | PROD 343 |
#define | IN 344 |
#define | POWER 345 |
#define | NE 346 |
#define | LE 347 |
#define | GE 348 |
#define | EQ 349 |
#define | LT 350 |
#define | GT 351 |
#define | UNION 352 |
#define | DIFF 353 |
#define | CROSS 354 |
#define | INTER 355 |
#define | SYMDIFF 356 |
#define | LBRACE 357 |
#define | RBRACE 358 |
#define | COMMA 359 |
#define | SEMICOLON 360 |
#define | LSBRACKET 361 |
#define | RSBRACKET 362 |
#define | COLON 363 |
#define | LBRACKET 364 |
#define | RBRACKET 365 |
#define | DEFINED 366 |
#define | LOGICAL_OR 367 |
#define | LOGICAL_AND 368 |
#define | ELLIPSE 369 |
#define | DOT 370 |
#define | SUFFIX 371 |
#define | BLOCK 372 |
#define | IDREF 373 |
#define | IDREFM 374 |
#define | STAGE 375 |
#define | NODE 376 |
#define | USING 377 |
#define | DETERMINISTIC 378 |
#define | EXPECTATION 379 |
#define | STOCHASTIC 380 |
#define | STAGES 381 |
#define | ANCESTOR 382 |
#define | ASSIGN 383 |
#define | YYSIZE_T unsigned int |
#define | YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
#define | YY_(msgid) msgid |
#define | YYUSE(e) ((void) (e)) |
#define | YYID(n) (n) |
#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(To, From, Count) |
#define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
#define | YYFINAL 2 |
#define | YYLAST 741 |
#define | YYNTOKENS 134 |
#define | YYNNTS 56 |
#define | YYNRULES 163 |
#define | YYNSTATES 326 |
#define | YYUNDEFTOK 2 |
#define | YYMAXUTOK 383 |
#define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define | YYPACT_NINF -133 |
#define | YYTABLE_NINF -163 |
#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 | YYRHSLOC(Rhs, K) ((Rhs)[K]) |
#define | YYLLOC_DEFAULT(Current, Rhs, N) |
#define | YY_LOCATION_PRINT(File, Loc) ((void) 0) |
#define | YYLEX yylex () |
#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 | YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
Typedefs | |
typedef unsigned char | yytype_uint8 |
typedef short int | yytype_int8 |
typedef unsigned short int | yytype_uint16 |
typedef short int | yytype_int16 |
Enumerations | |
enum | yytokentype { ID = 258, INT_VAL = 259, FLOAT_VAL = 260, INFINITY = 261, COEFF = 262, COVER = 263, OBJ = 264, DEFAULT = 265, FROM = 266, TO = 267, TO_COME = 268, MODELTYPE = 269, NET_IN = 270, NET_OUT = 271, DIMEN = 272, ORDERED = 273, CIRCULAR = 274, REVERSED = 275, SYMBOLIC = 276, ARC = 277, INTEGER = 278, BINARY = 279, CHECK = 280, CLOSE = 281, DISPLAY = 282, DROP = 283, INCLUDE = 284, PRINT = 285, PRINTF = 286, QUIT = 287, RESET = 288, RESTORE = 289, SOLVE = 290, UPDATE = 291, WRITE = 292, SHELL = 293, MODEL = 294, DATA = 295, OPTION = 296, LET = 297, SOLUTION = 298, FIX = 299, UNFIX = 300, END = 301, FUNCTION = 302, PIPE = 303, FORMAT = 304, SETOF = 305, BY = 306, LESS = 307, MOD = 308, DIV = 309, MIN = 310, MAX = 311, IF = 312, THEN = 313, ELSE = 314, AND = 315, OR = 316, EXISTS = 317, FORALL = 318, NOT = 319, WITHIN = 320, WHILE = 321, REPEAT = 322, FOR = 323, CARD = 324, NEXT = 325, NEXTW = 326, PREV = 327, PREVW = 328, FIRST = 329, LAST = 330, MEMBER = 331, ORD = 332, ORD_ZERO = 333, VAR = 334, PARAM = 335, SET = 336, MAXIMIZE = 337, MINIMIZE = 338, OBJECTIVE = 339, SUBJECTTO = 340, SUM = 341, PROD = 342, IN = 343, POWER = 344, NE = 345, LE = 346, GE = 347, EQ = 348, LT = 349, GT = 350, UNION = 351, DIFF = 352, CROSS = 353, INTER = 354, SYMDIFF = 355, LBRACE = 356, RBRACE = 357, COMMA = 358, SEMICOLON = 359, LSBRACKET = 360, RSBRACKET = 361, COLON = 362, LBRACKET = 363, RBRACKET = 364, DEFINED = 365, LOGICAL_OR = 366, LOGICAL_AND = 367, ELLIPSE = 368, PUBLIC = 369, CORE = 370, DOT = 371, BEG = 372, TIMESTAGE = 373, RANDOM = 374, SUFFIX = 375, BLOCK = 376, IDREF = 377, IDREFM = 378, SBLOCK = 379, USING = 380, DETERMINISTIC = 381, EXPECTATION = 382, STOCHASTIC = 383, STAGES = 384, STAGE = 385, NODE = 386, TR = 387, ASSIGN = 388, TOKPARAMSPECLIST = 389, TOKPARAMTEMPLATE = 390, TOKVALUETABLELIST = 391, TOKVALUETABLE = 392, CHARACTER_STRING = 393, TOKSETSPEC = 394, ID = 258, INT_VAL = 259, FLOAT_VAL = 260, INFINITY = 261, COEFF = 262, COVER = 263, OBJ = 264, DEFAULT = 265, FROM = 266, TO = 267, TO_COME = 268, MODELTYPE = 269, NET_IN = 270, NET_OUT = 271, DIMEN = 272, ORDERED = 273, CIRCULAR = 274, REVERSED = 275, SYMBOLIC = 276, ARC = 277, INTEGER = 278, BINARY = 279, CHECK = 280, CLOSE = 281, DISPLAY = 282, DROP = 283, INCLUDE = 284, PRINT = 285, PRINTF = 286, QUIT = 287, RESET = 288, RESTORE = 289, SOLVE = 290, UPDATE = 291, WRITE = 292, SHELL = 293, MODEL = 294, DATA = 295, OPTION = 296, LET = 297, SOLUTION = 298, FIX = 299, UNFIX = 300, END = 301, FUNCTION = 302, PIPE = 303, FORMAT = 304, SETOF = 305, BY = 306, LESS = 307, MOD = 308, DIV = 309, MIN = 310, MAX = 311, IF = 312, THEN = 313, ELSE = 314, AND = 315, OR = 316, EXISTS = 317, FORALL = 318, NOT = 319, WITHIN = 320, WHILE = 321, REPEAT = 322, FOR = 323, CARD = 324, NEXT = 325, NEXTW = 326, PREV = 327, PREVW = 328, FIRST = 329, LAST = 330, MEMBER = 331, ORD = 332, ORD_ZERO = 333, VAR = 334, PARAM = 335, SET = 336, MAXIMIZE = 337, MINIMIZE = 338, OBJECTIVE = 339, SUBJECTTO = 340, SUM = 341, PROD = 342, IN = 343, POWER = 344, NE = 345, LE = 346, GE = 347, EQ = 348, LT = 349, GT = 350, UNION = 351, DIFF = 352, CROSS = 353, INTER = 354, SYMDIFF = 355, LBRACE = 356, RBRACE = 357, COMMA = 358, SEMICOLON = 359, LSBRACKET = 360, RSBRACKET = 361, COLON = 362, LBRACKET = 363, RBRACKET = 364, DEFINED = 365, LOGICAL_OR = 366, LOGICAL_AND = 367, ELLIPSE = 368, PUBLIC = 369, CORE = 370, DOT = 371, BEG = 372, TIMESTAGE = 373, RANDOM = 374, SUFFIX = 375, BLOCK = 376, IDREF = 377, IDREFM = 378, SBLOCK = 379, USING = 380, DETERMINISTIC = 381, EXPECTATION = 382, STOCHASTIC = 383, STAGES = 384, STAGE = 385, NODE = 386, TR = 387, ASSIGN = 388, TOKPARAMSPECLIST = 389, TOKPARAMTEMPLATE = 390, TOKVALUETABLELIST = 391, TOKVALUETABLE = 392, CHARACTER_STRING = 393, TOKSETSPEC = 394, ID = 258, INT_VAL = 259, FLOAT_VAL = 260, INFINITY = 261, COEFF = 262, COVER = 263, OBJ = 264, DEFAULT = 265, FROM = 266, TO = 267, TO_COME = 268, MODELTYPE = 269, DOTDOT = 270, NET_IN = 271, NET_OUT = 272, DIMEN = 273, ORDERED = 274, CIRCULAR = 275, REVERSED = 276, SYMBOLIC = 277, ARC = 278, INTEGER = 279, BINARY = 280, CHECK = 281, CLOSE = 282, DISPLAY = 283, DROP = 284, INCLUDE = 285, PRINT = 286, PRINTF = 287, QUIT = 288, RESET = 289, RESTORE = 290, SOLVE = 291, UPDATE = 292, WRITE = 293, SHELL = 294, MODEL = 295, DATA = 296, OPTION = 297, LET = 298, SOLUTION = 299, FIX = 300, UNFIX = 301, END = 302, FUNCTION = 303, PIPE = 304, FORMAT = 305, SETOF = 306, BY = 307, LESS = 308, MOD = 309, DIV = 310, MIN = 311, MAX = 312, IF = 313, THEN = 314, ELSE = 315, AND = 316, OR = 317, EXISTS = 318, FORALL = 319, NOT = 320, WITHIN = 321, WHILE = 322, REPEAT = 323, FOR = 324, CARD = 325, NEXT = 326, NEXTW = 327, PREV = 328, PREVW = 329, FIRST = 330, LAST = 331, MEMBER = 332, ORD = 333, ORD_ZERO = 334, VAR = 335, PARAM = 336, SET = 337, MAXIMIZE = 338, MINIMIZE = 339, OBJECTIVE = 340, SUBJECTTO = 341, SUM = 342, PROD = 343, IN = 344, POWER = 345, NE = 346, LE = 347, GE = 348, EQ = 349, LT = 350, GT = 351, UNION = 352, DIFF = 353, CROSS = 354, INTER = 355, SYMDIFF = 356, LBRACE = 357, RBRACE = 358, COMMA = 359, SEMICOLON = 360, LSBRACKET = 361, RSBRACKET = 362, COLON = 363, LBRACKET = 364, RBRACKET = 365, DEFINED = 366, LOGICAL_OR = 367, LOGICAL_AND = 368, ELLIPSE = 369, DOT = 370, SUFFIX = 371, BLOCK = 372, IDREF = 373, IDREFM = 374, STAGE = 375, NODE = 376, USING = 377, DETERMINISTIC = 378, EXPECTATION = 379, STOCHASTIC = 380, STAGES = 381, ANCESTOR = 382, ASSIGN = 383, ID = 258, INT_VAL = 259, FLOAT_VAL = 260, INFINITY = 261, COEFF = 262, COVER = 263, OBJ = 264, DEFAULT = 265, FROM = 266, TO = 267, TO_COME = 268, MODELTYPE = 269, DOTDOT = 270, NET_IN = 271, NET_OUT = 272, DIMEN = 273, ORDERED = 274, CIRCULAR = 275, REVERSED = 276, SYMBOLIC = 277, ARC = 278, INTEGER = 279, BINARY = 280, CHECK = 281, CLOSE = 282, DISPLAY = 283, DROP = 284, INCLUDE = 285, PRINT = 286, PRINTF = 287, QUIT = 288, RESET = 289, RESTORE = 290, SOLVE = 291, UPDATE = 292, WRITE = 293, SHELL = 294, MODEL = 295, DATA = 296, OPTION = 297, LET = 298, SOLUTION = 299, FIX = 300, UNFIX = 301, END = 302, FUNCTION = 303, PIPE = 304, FORMAT = 305, SETOF = 306, BY = 307, LESS = 308, MOD = 309, DIV = 310, MIN = 311, MAX = 312, IF = 313, THEN = 314, ELSE = 315, AND = 316, OR = 317, EXISTS = 318, FORALL = 319, NOT = 320, WITHIN = 321, WHILE = 322, REPEAT = 323, FOR = 324, CARD = 325, NEXT = 326, NEXTW = 327, PREV = 328, PREVW = 329, FIRST = 330, LAST = 331, MEMBER = 332, ORD = 333, ORD_ZERO = 334, VAR = 335, PARAM = 336, SET = 337, MAXIMIZE = 338, MINIMIZE = 339, OBJECTIVE = 340, SUBJECTTO = 341, SUM = 342, PROD = 343, IN = 344, POWER = 345, NE = 346, LE = 347, GE = 348, EQ = 349, LT = 350, GT = 351, UNION = 352, DIFF = 353, CROSS = 354, INTER = 355, SYMDIFF = 356, LBRACE = 357, RBRACE = 358, COMMA = 359, SEMICOLON = 360, LSBRACKET = 361, RSBRACKET = 362, COLON = 363, LBRACKET = 364, RBRACKET = 365, DEFINED = 366, LOGICAL_OR = 367, LOGICAL_AND = 368, ELLIPSE = 369, DOT = 370, SUFFIX = 371, BLOCK = 372, IDREF = 373, IDREFM = 374, STAGE = 375, NODE = 376, USING = 377, DETERMINISTIC = 378, EXPECTATION = 379, STOCHASTIC = 380, STAGES = 381, ANCESTOR = 382, ASSIGN = 383 } |
Functions | |
void | add_indexing (SyntaxNodeIx *indexing) |
void | rem_indexing (SyntaxNodeIx *indexing) |
void | begin_model (char *name, SyntaxNode *indexing) |
void | end_model (char *name) |
void | begin_smodel (char *name, SyntaxNode *indexing, SyntaxNode *stochsets) |
void | end_smodel (char *name) |
int | yylex (void) |
void | yyerror (const char *s) |
void | addStochInfo (ModelComp *newmc, SyntaxNode *) |
static void | yydestruct (yymsg, yytype, yyvaluep) const char *yymsg |
int | yyparse () |
int | yywrap (void) |
int | parse_model (const string &filename) |
Variables | |
int | yylineno |
static AmplModel * | current_model |
static AmplModel * | local_context |
SyntaxNodeIx * | list_of_indexing [20] |
int | n_indexing |
static bool | is_stoch_model |
static bool | is_deterministic_glo |
static SyntaxNode * | stages_glo |
FILE * | yyin |
static const yytype_uint8 | yytranslate [] |
static const yytype_uint8 | yyr1 [] |
static const yytype_uint8 | yyr2 [] |
static const yytype_uint8 | yydefact [] |
static const yytype_int16 | yydefgoto [] |
static const yytype_int16 | yypact [] |
static const yytype_int16 | yypgoto [] |
static const yytype_int16 | yytable [] |
static const yytype_int16 | yycheck [] |
static const yytype_uint8 | yystos [] |
int | yytype |
YYSTYPE * | yyvaluep |
int | yychar |
YYSTYPE | yylval |
int | yynerrs |
#define ANCESTOR 382 |
#define AND 316 |
#define ARC 278 |
#define ASSIGN 383 |
#define BINARY 280 |
#define BLOCK 372 |
#define BY 307 |
#define CARD 325 |
#define CHECK 281 |
#define CIRCULAR 275 |
#define CLOSE 282 |
#define COEFF 262 |
#define COLON 363 |
#define COMMA 359 |
#define COVER 263 |
#define CROSS 354 |
#define DATA 296 |
#define DEFAULT 265 |
#define DEFINED 366 |
#define DETERMINISTIC 378 |
#define DIFF 353 |
#define DIMEN 273 |
#define DISPLAY 283 |
#define DIV 310 |
#define DOT 370 |
#define DOTDOT 270 |
Referenced by SyntaxNode::put().
#define DROP 284 |
#define ELLIPSE 369 |
#define ELSE 315 |
#define END 302 |
#define EQ 349 |
#define EXISTS 318 |
#define EXPECTATION 379 |
#define FIRST 330 |
#define FIX 300 |
#define FLOAT_VAL 260 |
#define FOR 324 |
#define FORALL 319 |
#define FORMAT 305 |
#define FROM 266 |
#define FUNCTION 303 |
#define GE 348 |
#define GT 351 |
#define ID 258 |
#define IDREF 373 |
#define IDREFM 374 |
#define IF 313 |
#define IN 344 |
#define INCLUDE 285 |
#define INFINITY 261 |
#define INT_VAL 259 |
#define INTEGER 279 |
#define INTER 355 |
#define LAST 331 |
#define LBRACE 357 |
#define LBRACKET 364 |
#define LE 347 |
#define LESS 308 |
#define LET 298 |
#define LOGICAL_AND 368 |
#define LOGICAL_OR 367 |
#define LSBRACKET 361 |
#define LT 350 |
#define MAX 312 |
#define MAXIMIZE 338 |
#define MEMBER 332 |
#define MIN 311 |
#define MINIMIZE 339 |
#define MOD 309 |
#define MODEL 295 |
#define MODELTYPE 269 |
#define NE 346 |
#define NET_IN 271 |
#define NET_OUT 272 |
#define NEXT 326 |
#define NEXTW 327 |
#define NODE 376 |
#define NOT 320 |
#define OBJ 264 |
#define OBJECTIVE 340 |
#define OPTION 297 |
#define OR 317 |
#define ORD 333 |
#define ORD_ZERO 334 |
#define ORDERED 274 |
#define PARAM 336 |
#define PIPE 304 |
#define POWER 345 |
#define PREV 328 |
#define PREVW 329 |
#define PRINT 286 |
#define PRINTF 287 |
#define PROD 343 |
#define QUIT 288 |
#define RBRACE 358 |
#define RBRACKET 365 |
#define REPEAT 323 |
#define RESET 289 |
#define RESTORE 290 |
#define REVERSED 276 |
#define RSBRACKET 362 |
#define SEMICOLON 360 |
#define SET 337 |
#define SETOF 306 |
#define SHELL 294 |
#define SOLUTION 299 |
#define SOLVE 291 |
#define STAGE 375 |
#define STAGES 381 |
#define STOCHASTIC 380 |
#define SUBJECTTO 341 |
#define SUFFIX 371 |
#define SUM 342 |
#define SYMBOLIC 277 |
#define SYMDIFF 356 |
#define THEN 314 |
#define TO 267 |
#define TO_COME 268 |
#define UNFIX 301 |
#define UNION 352 |
#define UPDATE 292 |
#define USING 377 |
#define VAR 335 |
#define WHILE 322 |
#define WITHIN 321 |
#define WRITE 293 |
#define YY_ | ( | msgid | ) | msgid |
Referenced by yyparse().
#define YY_LOCATION_PRINT | ( | File, | ||
Loc | ||||
) | ((void) 0) |
#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 yyparse().
#define YYABORT goto yyabortlab |
#define YYACCEPT goto yyacceptlab |
#define YYBACKUP | ( | Token, | ||
Value | ||||
) |
do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0))
#define YYBISON 1 |
#define YYBISON_VERSION "2.4.1" |
#define yyclearin (yychar = YYEMPTY) |
#define YYCOPY | ( | To, | ||
From, | ||||
Count | ||||
) |
#define YYDEBUG 1 |
#define YYDPRINTF | ( | Args | ) |
Referenced by yyparse().
#define YYEMPTY (-2) |
Referenced by yyparse().
#define YYEOF 0 |
Referenced by yyparse().
#define YYERRCODE 256 |
#define yyerrok (yyerrstatus = 0) |
#define YYERROR goto yyerrorlab |
#define YYERROR_VERBOSE 0 |
#define YYERROR_VERBOSE |
#define YYFAIL goto yyerrlab |
#define YYFINAL 2 |
Referenced by yyparse().
#define YYFREE free |
#define YYID | ( | n | ) | (n) |
Referenced by yyparse().
#define YYINITDEPTH 200 |
#define YYLAST 741 |
Referenced by yyparse().
#define YYLEX yylex () |
#define YYLLOC_DEFAULT | ( | Current, | ||
Rhs, | ||||
N | ||||
) |
do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0))
#define YYLSP_NEEDED 0 |
#define YYMALLOC malloc |
#define YYMAXDEPTH 10000 |
Referenced by yyparse().
#define YYMAXUTOK 383 |
#define YYNNTS 56 |
#define YYNRULES 163 |
#define YYNSTATES 326 |
#define YYNTOKENS 134 |
#define YYPACT_NINF -133 |
Referenced by yyparse().
#define YYPOPSTACK | ( | N | ) | (yyvsp -= (N), yyssp -= (N)) |
#define YYPULL 1 |
#define YYPURE 0 |
#define YYPUSH 0 |
#define YYRECOVERING | ( | ) | (!!yyerrstatus) |
#define YYRHSLOC | ( | Rhs, | ||
K | ||||
) | ((Rhs)[K]) |
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
#define YYSIZE_T unsigned int |
Referenced by yyparse().
#define YYSKELETON_NAME "yacc.c" |
#define YYSTACK_ALLOC YYMALLOC |
Referenced by yyparse().
#define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
Referenced by yyparse().
#define YYSTACK_BYTES | ( | N | ) |
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM)
Referenced by yyparse().
#define YYSTACK_FREE YYFREE |
Referenced by yyparse().
#define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
#define YYSTACK_RELOCATE | ( | Stack_alloc, | ||
Stack | ||||
) |
#define YYTABLE_NINF -163 |
Referenced by yyparse().
#define YYTERROR 1 |
Referenced by yyparse().
#define YYTOKEN_TABLE 0 |
#define YYTOKENTYPE |
#define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
Referenced by yyparse().
#define YYUNDEFTOK 2 |
#define YYUSE | ( | e | ) | ((void) (e)) |
typedef short int yytype_int16 |
typedef short int yytype_int8 |
typedef unsigned short int yytype_uint16 |
typedef unsigned char yytype_uint8 |
enum yytokentype |
void add_indexing | ( | SyntaxNodeIx * | indexing | ) |
References list_of_indexing, GlobalVariables::logParseModel, n_indexing, and print_SyntaxNodesymb().
Referenced by yyparse().
void addStochInfo | ( | ModelComp * | newmc, | |
SyntaxNode * | stochopt | |||
) |
References SyntaxNode::getOpCode(), is_deterministic_glo, ModelComp::setDeterministic(), ModelComp::setStageSet(), and stages_glo.
Referenced by yyparse().
void begin_model | ( | char * | name, | |
SyntaxNode * | indexing | |||
) |
References AmplModel::addComp(), current_model, AmplModel::node, ModelComp::other, AmplModel::setGlobalName(), and TMODEL.
Referenced by yyparse().
void begin_smodel | ( | char * | name, | |
SyntaxNode * | indexing, | |||
SyntaxNode * | stochsets | |||
) |
References AmplModel::addComp(), SyntaxNode::begin(), current_model, is_stoch_model, GlobalVariables::logParseModel, AmplModel::name, SyntaxNode::nchild(), AmplModel::node, ModelComp::other, AmplModel::setGlobalName(), and TMODEL.
Referenced by yyparse().
void end_model | ( | char * | name | ) |
References current_model, AmplModel::name, and AmplModel::parent.
Referenced by yyparse().
void end_smodel | ( | char * | name | ) |
References current_model, AmplModel::expandToFlatModel(), ModelComp::id, is_stoch_model, AmplModel::name, AmplModel::node, ModelComp::other, and AmplModel::parent.
Referenced by yyparse().
int parse_model | ( | const string & | filename | ) |
References current_model, GlobalVariables::datafilename, is_deterministic_glo, is_stoch_model, AmplModel::root, stages_glo, yyin, and yyparse.
Referenced by sml_generate().
void rem_indexing | ( | SyntaxNodeIx * | indexing | ) |
References list_of_indexing, GlobalVariables::logParseModel, and n_indexing.
Referenced by yyparse().
int yylex | ( | void | ) |
int yyparse | ( | ) |
References add_indexing(), AmplModel::addComp(), addItemToListOrCreate(), addStochInfo(), ASSIGN, begin_model(), begin_smodel(), BINARY, CARD, COLON, COMMA, CROSS, current_model, DEFAULT, DEFINED, SymbolTable::defineSymbol(), DETERMINISTIC, DIFF, DIMEN, ELLIPSE, end_model(), end_smodel(), EQ, EXPECTATION, find_var_ref_in_context(), FIRST, SyntaxNode::front(), GE, SyntaxNode::getOpCode(), IDNode::getStochParent(), GT, IF, IN, INFINITY, INTEGER, INTER, is_stoch_model, YYSTYPE::ival, LAST, LBRACE, LBRACKET, LE, local_context, LOGICAL_AND, LOGICAL_OR, GlobalVariables::logParseModel, LSBRACKET, LT, MAX, MIN, NE, YYSTYPE::opPtr, YYSTYPE::opPtrIx, YYSTYPE::optype, ORD, ORDERED, POWER, print_SyntaxNodesymb(), PROD, rem_indexing(), IDNode::setStochParent(), SymbolTable::ST_CONS, SymbolTable::ST_OBJ, SymbolTable::ST_PARAM, SymbolTable::ST_SET, SymbolTable::ST_VAR, stages_glo, YYSTYPE::string, SUFFIX, SUM, AmplModel::symbol_table, SYMBOLIC, SYMDIFF, TCON, TMAX, TMIN, TPARAM, TSET, TVAR, UNION, WITHIN, YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror(), YYFINAL, YYID, YYLAST, yylval, YYMAXDEPTH, yynerrs, yypact, YYPACT_NINF, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_ALLOC_MAXIMUM, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, yytable, YYTABLE_NINF, YYTERROR, YYTRANSLATE, and yyalloc::yyvs_alloc.
int yywrap | ( | void | ) |
AmplModel* current_model [static] |
Referenced by begin_model(), begin_smodel(), end_model(), end_smodel(), parse_model(), and yyparse().
bool is_deterministic_glo [static] |
Referenced by addStochInfo(), and parse_model().
bool is_stoch_model [static] |
Referenced by begin_smodel(), end_smodel(), parse_model(), and yyparse().
Referenced by add_indexing(), find_var_ref_in_indexing(), and rem_indexing().
AmplModel* local_context [static] |
Referenced by yyparse().
int n_indexing |
Referenced by add_indexing(), find_var_ref_in_indexing(), and rem_indexing().
SyntaxNode* stages_glo [static] |
Referenced by addStochInfo(), parse_model(), and yyparse().
int yychar |
const yytype_int16 yycheck[] [static] |
Referenced by yyparse().
const yytype_uint8 yydefact[] [static] |
Referenced by yyparse().
const yytype_int16 yydefgoto[] [static] |
{ -1, 1, 13, 14, 15, 137, 16, 17, 140, 197, 18, 19, 20, 21, 311, 100, 22, 153, 154, 155, 89, 29, 90, 81, 82, 83, 84, 101, 23, 152, 24, 236, 25, 151, 26, 256, 257, 258, 312, 313, 314, 208, 248, 249, 250, 85, 120, 60, 102, 62, 110, 63, 192, 64, 65, 66 }
Referenced by yyparse().
FILE* yyin |
int yylineno |
int yynerrs |
const yytype_int16 yypact[] [static] |
Referenced by yyparse().
const yytype_int16 yypgoto[] [static] |
{ -133, 20, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, 1, -133, -133, -133, -133, -21, -133, 2, -1, 122, -133, -133, -61, -133, -133, -133, -133, -133, -133, -133, -133, -133, 8, -133, -133, -57, -132, -133, -133, -11, -7, -133, -6, -12, -119, -52, 91, -133, -133, -133, -133 }
Referenced by yyparse().
const yytype_uint8 yyr1[] [static] |
{ 0, 134, 135, 135, 136, 136, 136, 137, 137, 138, 139, 139, 140, 140, 141, 142, 142, 143, 144, 145, 146, 146, 146, 146, 146, 146, 146, 147, 147, 148, 148, 148, 148, 148, 148, 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 151, 150, 152, 150, 153, 150, 154, 154, 155, 156, 156, 157, 157, 158, 158, 158, 159, 160, 160, 161, 161, 161, 163, 162, 165, 164, 167, 166, 168, 169, 169, 170, 170, 171, 171, 171, 171, 171, 172, 172, 173, 173, 174, 174, 174, 174, 174, 174, 174, 174, 175, 175, 175, 176, 176, 177, 177, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 179, 179, 179, 179, 179, 179, 179, 179, 180, 180, 180, 181, 181, 182, 182, 183, 183, 183, 183, 184, 184, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 186, 185, 185, 185, 185, 185, 185, 185, 187, 187, 188, 188, 188, 188, 189, 189, 189, 189 }
Referenced by yyparse().
const yytype_uint8 yyr2[] [static] |
{ 0, 2, 0, 2, 1, 1, 1, 3, 4, 4, 3, 4, 3, 4, 9, 3, 4, 2, 4, 3, 2, 2, 2, 2, 2, 1, 3, 1, 5, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 3, 5, 3, 5, 3, 5, 3, 0, 7, 0, 7, 0, 7, 0, 1, 2, 4, 2, 1, 3, 1, 3, 3, 2, 2, 3, 1, 3, 1, 0, 6, 0, 7, 0, 6, 0, 0, 1, 1, 2, 2, 2, 2, 2, 1, 0, 1, 1, 3, 1, 1, 1, 2, 2, 2, 2, 2, 0, 1, 2, 0, 1, 1, 3, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 1, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 3, 1, 4, 6, 6, 1, 3, 1, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 0, 4, 4, 6, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
Referenced by yyparse().
const yytype_uint8 yystos[] [static] |
Referenced by yyparse().
const yytype_int16 yytable[] [static] |
Referenced by yyparse().
const yytype_uint8 yytranslate[] [static] |
int yytype |