yast2-core
Classes | Macros | Typedefs | Enumerations | Functions | Variables
parser.cc File Reference
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <fstream>
#include <string>
#include <list>
#include "YCP.h"
#include "ycp/Scanner.h"
#include "ycp/y2log.h"
#include "ycp/pathsearch.h"
#include "ycp/ExecutionEnvironment.h"
#include "ycp/StaticDeclaration.h"
#include "ycp/YCode.h"
#include "ycp/Type.h"
#include "ycp/YExpression.h"
#include "ycp/YStatement.h"
#include "ycp/YBlock.h"
#include "ycp/SymbolTable.h"
#include "ycp/YSymbolEntry.h"
#include "ycp/Point.h"
#include "ycp/Bytecode.h"
#include "ycp/Parser.h"

Classes

struct  yystype_type
struct  stack
 general stack handling More...
struct  blockstack_t
 stack for blocks More...
struct  switchstack_t
 stack for switch More...
struct  scannerstack_t
 stack for scanners More...
union  yyalloc

Macros

#define YYBISON   1
#define YYBISON_VERSION   "2.5"
#define YYSKELETON_NAME   "yacc.c"
#define YYPURE   1
#define YYPUSH   0
#define YYPULL   1
#define YYLSP_NEEDED   0
#define DO_DEBUG   0
#define YYDEBUG   0
#define YYERROR_VERBOSE   1
#define YYINITDEPTH   1000
#define YYMAXDEPTH   50000
#define YYSTYPE   yystype_type
#define YYPARSE_PARAM   vp_parser
#define YYLEX_PARAM   vp_parser
#define p_parser   ((Parser *) vp_parser)
#define LINE_NOW   (p_parser->m_lineno)
#define FILE_NOW   (p_parser->scanner()->filename ())
#define yyerror(text)   yyerror_with_lineinfo (p_parser, -1, text)
#define yywarning(text, lineno)   yywarning_with_lineinfo (p_parser, lineno, text)
#define yyConstAssignError(name, lineno)   yyerror_assign_const (p_parser, lineno, name)
#define yyLerror(text, lineno)   yyerror_with_lineinfo (p_parser, lineno, text)
#define yyCerror(code, type, lineno)   yyerror_with_code (p_parser, lineno, code, type)
#define yyVerror(name, lineno)   yyerror_with_name (p_parser, lineno, name)
#define yyFerror(name, lineno)   yyerror_with_file (p_parser, lineno, name)
#define yyTerror(text, lineno, tentry)   yyerror_with_tableentry (p_parser, lineno, text, tentry)
#define yyTwarning(tentry)   yywarning_with_tableentry (p_parser, 0, tentry)
#define yyTypeMismatch(text, expected, seen, lineno)   yyerror_type_mismatch (p_parser, lineno, text, expected, seen)
#define yyMissingArgument(type, lineno)   yyerror_missing_argument (p_parser, lineno, type)
#define yyCantCast(from, to, lineno)   yyerror_cant_cast (p_parser, lineno, from, to)
#define yyNoModule(module, lineno)   yyerror_no_module (p_parser, lineno, module)
#define check_unary_op(result, e1, op)   i_check_unary_op (result, e1, op, p_parser)
#define check_binary_op(result, e1, op, e2)   i_check_binary_op (result, e1, op, e2, p_parser)
#define check_compare_op(result, e1, op, e2)   i_check_compare_op (result, e1, op, e2, p_parser)
#define check_void_assign(lhs, rhs)   i_check_void_assign (lhs, rhs, p_parser)
#define blockstack_push(s, e)   _blockstack_push(&(s), e)
#define blockstack_pop(s)   _blockstack_pop(p_parser, &(s))
#define blockstack_at_toplevel()   (p_parser->m_blockstack_depth == 1)
#define switchstack_push(s, e)   _switchstack_push(&(s), e)
#define switchstack_pop(s)   _switchstack_pop(&(s))
#define scannerstack_push(s, e)   _scannerstack_push(&(s), e)
#define scannerstack_pop(s)   _scannerstack_pop (&(s))
#define scannerstack_empty()   (p_parser->m_scanner_stack == 0)
#define YYERROR_VERBOSE   1
#define YYTOKEN_TABLE   0
#define YYTOKENTYPE
#define SCANNER_ERROR   258
#define END_OF_FILE   259
#define EMPTY   260
#define LIST   261
#define MAP   262
#define STRUCT   263
#define BLOCK   264
#define DEFINE   265
#define UNDEFINE   266
#define I18N   267
#define RETURN   268
#define CONTINUE   269
#define BREAK   270
#define IF   271
#define DO   272
#define WHILE   273
#define REPEAT   274
#define UNTIL   275
#define IS   276
#define ISNIL   277
#define SYMBOL   278
#define DCSYMBOL   279
#define DCQUOTED_BLOCK   280
#define QUOTED_BLOCK   281
#define QUOTED_EXPRESSION   282
#define CLOSEBRACKET   283
#define TYPEDEF   284
#define MODULE   285
#define IMPORT   286
#define EXPORT   287
#define MAPEXPR   288
#define INCLUDE   289
#define GLOBAL   290
#define TEXTDOMAIN   291
#define CONST   292
#define FULLNAME   293
#define STATIC   294
#define EXTERN   295
#define LOOKUP   296
#define SELECT   297
#define SWITCH   298
#define CASE   299
#define DEFAULT   300
#define SYM_NAMESPACE   301
#define IDENTIFIER   302
#define STRING   303
#define C_VOID   304
#define C_BOOLEAN   305
#define C_INTEGER   306
#define C_FLOAT   307
#define C_BYTEBLOCK   308
#define C_PATH   309
#define C_SYMBOL   310
#define C_TYPE   311
#define OR   312
#define AND   313
#define NEQ   314
#define EQUALS   315
#define GE   316
#define LE   317
#define RIGHT   318
#define LEFT   319
#define ELSE   320
#define UMINUS   321
#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_NEEDED   1
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define YYCOPY(To, From, Count)
#define YYFINAL   55
#define YYLAST   1346
#define YYNTOKENS   90
#define YYNNTS   48
#define YYNRULES   155
#define YYNSTATES   309
#define YYUNDEFTOK   2
#define YYMAXUTOK   321
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYPACT_NINF   -245
#define YYTABLE_NINF   -152
#define yypact_value_is_default(yystate)   ((yystate) == (-245))
#define yytable_value_is_error(yytable_value)   YYID (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 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 (&yylval, YYLEX_PARAM)
#define YYDPRINTF(Args)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define YY_STACK_PRINT(Bottom, Top)
#define YY_REDUCE_PRINT(Rule)
#define YYCASE_(N, S)
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
#define YYSYNTAX_ERROR

Typedefs

typedef struct stack stack_t
 general stack handling
typedef unsigned char yytype_uint8
typedef short int yytype_int8
typedef unsigned short int yytype_uint16
typedef short int yytype_int16

Enumerations

enum  scan_states { SCAN_FILE, SCAN_START_INCLUDE, SCAN_INCLUDE }
enum  yytokentype {
  SCANNER_ERROR = 258, END_OF_FILE = 259, EMPTY = 260, LIST = 261,
  MAP = 262, STRUCT = 263, BLOCK = 264, DEFINE = 265,
  UNDEFINE = 266, I18N = 267, RETURN = 268, CONTINUE = 269,
  BREAK = 270, IF = 271, DO = 272, WHILE = 273,
  REPEAT = 274, UNTIL = 275, IS = 276, ISNIL = 277,
  SYMBOL = 278, DCSYMBOL = 279, DCQUOTED_BLOCK = 280, QUOTED_BLOCK = 281,
  QUOTED_EXPRESSION = 282, CLOSEBRACKET = 283, TYPEDEF = 284, MODULE = 285,
  IMPORT = 286, EXPORT = 287, MAPEXPR = 288, INCLUDE = 289,
  GLOBAL = 290, TEXTDOMAIN = 291, CONST = 292, FULLNAME = 293,
  STATIC = 294, EXTERN = 295, LOOKUP = 296, SELECT = 297,
  SWITCH = 298, CASE = 299, DEFAULT = 300, SYM_NAMESPACE = 301,
  IDENTIFIER = 302, STRING = 303, C_VOID = 304, C_BOOLEAN = 305,
  C_INTEGER = 306, C_FLOAT = 307, C_BYTEBLOCK = 308, C_PATH = 309,
  C_SYMBOL = 310, C_TYPE = 311, OR = 312, AND = 313,
  NEQ = 314, EQUALS = 315, GE = 316, LE = 317,
  RIGHT = 318, LEFT = 319, ELSE = 320, UMINUS = 321,
  SCANNER_ERROR = 258, END_OF_FILE = 259, EMPTY = 260, LIST = 261,
  MAP = 262, STRUCT = 263, BLOCK = 264, DEFINE = 265,
  UNDEFINE = 266, I18N = 267, RETURN = 268, CONTINUE = 269,
  BREAK = 270, IF = 271, DO = 272, WHILE = 273,
  REPEAT = 274, UNTIL = 275, IS = 276, ISNIL = 277,
  SYMBOL = 278, DCSYMBOL = 279, DCQUOTED_BLOCK = 280, QUOTED_BLOCK = 281,
  QUOTED_EXPRESSION = 282, CLOSEBRACKET = 283, TYPEDEF = 284, MODULE = 285,
  IMPORT = 286, EXPORT = 287, MAPEXPR = 288, INCLUDE = 289,
  GLOBAL = 290, TEXTDOMAIN = 291, CONST = 292, FULLNAME = 293,
  STATIC = 294, EXTERN = 295, LOOKUP = 296, SELECT = 297,
  SWITCH = 298, CASE = 299, DEFAULT = 300, SYM_NAMESPACE = 301,
  IDENTIFIER = 302, STRING = 303, C_VOID = 304, C_BOOLEAN = 305,
  C_INTEGER = 306, C_FLOAT = 307, C_BYTEBLOCK = 308, C_PATH = 309,
  C_SYMBOL = 310, C_TYPE = 311, OR = 312, AND = 313,
  NEQ = 314, EQUALS = 315, GE = 316, LE = 317,
  RIGHT = 318, LEFT = 319, ELSE = 320, UMINUS = 321,
  SCANNER_ERROR = 258, END_OF_FILE = 259, EMPTY = 260, LIST = 261,
  MAP = 262, STRUCT = 263, BLOCK = 264, DEFINE = 265,
  UNDEFINE = 266, I18N = 267, RETURN = 268, CONTINUE = 269,
  BREAK = 270, IF = 271, DO = 272, WHILE = 273,
  REPEAT = 274, UNTIL = 275, IS = 276, ISNIL = 277,
  SYMBOL = 278, DCSYMBOL = 279, DCQUOTED_BLOCK = 280, QUOTED_BLOCK = 281,
  QUOTED_EXPRESSION = 282, CLOSEBRACKET = 283, TYPEDEF = 284, MODULE = 285,
  IMPORT = 286, EXPORT = 287, MAPEXPR = 288, INCLUDE = 289,
  GLOBAL = 290, TEXTDOMAIN = 291, CONST = 292, FULLNAME = 293,
  STATIC = 294, EXTERN = 295, LOOKUP = 296, SELECT = 297,
  SWITCH = 298, CASE = 299, DEFAULT = 300, SYM_NAMESPACE = 301,
  IDENTIFIER = 302, STRING = 303, C_VOID = 304, C_BOOLEAN = 305,
  C_INTEGER = 306, C_FLOAT = 307, C_BYTEBLOCK = 308, C_PATH = 309,
  C_SYMBOL = 310, C_TYPE = 311, OR = 312, AND = 313,
  NEQ = 314, EQUALS = 315, GE = 316, LE = 317,
  RIGHT = 318, LEFT = 319, ELSE = 320, UMINUS = 321
}

Functions

static void yyerror_with_lineinfo (Parser *parser, int lineno, const char *s)
static void yywarning_with_lineinfo (Parser *parser, int lineno, const char *s)
static void yyerror_with_code (Parser *parser, int lineno, YCodePtr c, constTypePtr t)
static void yyerror_with_name (Parser *parser, int lineno, const char *s)
static void yyerror_with_file (Parser *parser, int lineno, const char *s)
static void yyerror_with_tableentry (Parser *parser, int lineno, const char *s, TableEntry *entry)
static void yywarning_with_tableentry (Parser *parser, int lineno, TableEntry *entry)
static void yyerror_type_mismatch (Parser *parser, int lineno, const char *s, constTypePtr expected_type, constTypePtr seen_type)
static void yyerror_missing_argument (Parser *parser, int lineno, constTypePtr type)
static void yyerror_assign_const (Parser *parser, int lineno, const char *s)
static void yyerror_cant_cast (Parser *parser, int lineno, constTypePtr from, constTypePtr to)
static void yyerror_no_module (Parser *parser, int lineno, const char *module)
static constTypePtr attach_parameter (Parser *parser, YCodePtr code, YYSTYPE *parm, YYSTYPE *parm1=0)
static YBlockPtr start_block (Parser *parser, constTypePtr type)
int yylex (YYSTYPE *, void *)
static void i_check_unary_op (YYSTYPE *result, YYSTYPE *e1, const char *op, Parser *parser)
static void i_check_binary_op (YYSTYPE *result, YYSTYPE *e1, const char *op, YYSTYPE *e2, Parser *parser)
static void i_check_compare_op (YYSTYPE *result, YYSTYPE *e1, YECompare::c_op op, YYSTYPE *e2, Parser *parser)
static void i_check_void_assign (YYSTYPE *lhs, YYSTYPE *rhs, Parser *parser)
static void stack_push (stack_t **stack, stack_t *element)
 push element to stack
static stack_tstack_pop (stack_t **stack)
 pop element to stack
static void _blockstack_push (blockstack_t **blockstackptr, blockstack_t *blockelement)
static blockstack_t_blockstack_pop (Parser *parser, blockstack_t **blockstackptr)
static void _switchstack_push (switchstack_t **switchstack, stack_t *e)
static switchstack_t_switchstack_pop (switchstack_t **switchstack)
static void _scannerstack_push (scannerstack_t **scannerstackptr, stack_t *element)
static scannerstack_t_scannerstack_pop (scannerstack_t **scannerstackptr)
static YYSIZE_T yystrlen (yystr) const char *yystr
 for (yylen=0;yystr[yylen];yylen++) continue
static char * yystpcpy (yydest, yysrc) char *yydest
int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM

Variables

static constTypePtr declared_return_type = Type::Unspec
 set by function declaration in order to predefine a definitions block return type
static constTypePtr found_return_type = Type::Unspec
 set when a return statement is encountered
StaticDeclaration static_declarations
static bool in_switch = false
static bool inside_module = false
static int repeat_count = 0
static int do_while_count = 0
static const yytype_uint8 yytranslate []
static const char *const yytname []
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 []
YYSIZE_T yylen
const char * yysrc
int yytype
YYSTYPEyyvaluep

Macro Definition Documentation

#define AND   313
#define BLOCK   264
#define blockstack_at_toplevel ( )    (p_parser->m_blockstack_depth == 1)
#define blockstack_pop (   s)    _blockstack_pop(p_parser, &(s))
#define blockstack_push (   s,
 
)    _blockstack_push(&(s), e)
#define BREAK   270
#define C_BOOLEAN   305
#define C_BYTEBLOCK   308
#define C_FLOAT   307
#define C_INTEGER   306
#define C_PATH   309
#define C_SYMBOL   310
#define C_TYPE   311
#define C_VOID   304
#define CASE   299
#define check_binary_op (   result,
  e1,
  op,
  e2 
)    i_check_binary_op (result, e1, op, e2, p_parser)
#define check_compare_op (   result,
  e1,
  op,
  e2 
)    i_check_compare_op (result, e1, op, e2, p_parser)
#define check_unary_op (   result,
  e1,
  op 
)    i_check_unary_op (result, e1, op, p_parser)
#define check_void_assign (   lhs,
  rhs 
)    i_check_void_assign (lhs, rhs, p_parser)
#define CLOSEBRACKET   283
#define CONST   292
#define CONTINUE   269
#define DCQUOTED_BLOCK   280
#define DCSYMBOL   279
#define DEFAULT   300
#define DEFINE   265
#define DO   272
#define DO_DEBUG   0
#define ELSE   320
#define EMPTY   260
#define END_OF_FILE   259

Referenced by parsefile().

#define EQUALS   315
#define EXPORT   287
#define EXTERN   295
#define FILE_NOW   (p_parser->scanner()->filename ())
#define FULLNAME   293
#define GE   316
#define GLOBAL   290
#define I18N   267
#define IDENTIFIER   302
#define IF   271
#define IMPORT   286
#define INCLUDE   289
#define IS   276
#define ISNIL   277
#define LE   317
#define LEFT   319
#define LINE_NOW   (p_parser->m_lineno)
#define LIST   261
#define LOOKUP   296
#define MAP   262
#define MAPEXPR   288
#define MODULE   285
#define NEQ   314
#define OR   312
#define p_parser   ((Parser *) vp_parser)
#define QUOTED_BLOCK   281
#define QUOTED_EXPRESSION   282
#define REPEAT   274
#define RETURN   268
#define RIGHT   318
#define SCANNER_ERROR   258
#define scannerstack_empty ( )    (p_parser->m_scanner_stack == 0)
#define scannerstack_pop (   s)    _scannerstack_pop (&(s))
#define scannerstack_push (   s,
 
)    _scannerstack_push(&(s), e)
#define SELECT   297
#define STATIC   294
#define STRING   303
#define STRUCT   263
#define SWITCH   298
#define switchstack_pop (   s)    _switchstack_pop(&(s))
#define switchstack_push (   s,
 
)    _switchstack_push(&(s), e)
#define SYM_NAMESPACE   301
#define SYMBOL   278
#define TEXTDOMAIN   291
#define TYPEDEF   284
#define UMINUS   321
#define UNDEFINE   266
#define UNTIL   275
#define WHILE   273
#define YY_ (   msgid)    msgid
#define YY_LOCATION_PRINT (   File,
  Loc 
)    ((void) 0)
#define YY_REDUCE_PRINT (   Rule)
#define YY_STACK_PRINT (   Bottom,
  Top 
)
#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)
#define YYABORT   goto yyabortlab
#define YYACCEPT   goto yyacceptlab
#define YYBACKUP (   Token,
  Value 
)
Value:
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (1); \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (YYID (0))
#define YYBISON   1
#define YYBISON_VERSION   "2.5"
#define yyCantCast (   from,
  to,
  lineno 
)    yyerror_cant_cast (p_parser, lineno, from, to)
#define YYCASE_ (   N,
 
)
Value:
case N: \
yyformat = S; \
break
#define yyCerror (   code,
  type,
  lineno 
)    yyerror_with_code (p_parser, lineno, code, type)
#define yyclearin   (yychar = YYEMPTY)
#define yyConstAssignError (   name,
  lineno 
)    yyerror_assign_const (p_parser, lineno, name)
#define YYCOPY (   To,
  From,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
#define YYCOPY_NEEDED   1
#define YYDEBUG   0
#define YYDPRINTF (   Args)
#define YYEMPTY   (-2)
#define YYEOF   0
#define YYERRCODE   256
#define yyerrok   (yyerrstatus = 0)
#define yyerror (   text)    yyerror_with_lineinfo (p_parser, -1, text)
#define YYERROR   goto yyerrorlab
#define YYERROR_VERBOSE   1
#define YYERROR_VERBOSE   1
#define YYFAIL   goto yyerrlab
#define yyFerror (   name,
  lineno 
)    yyerror_with_file (p_parser, lineno, name)
#define YYFINAL   55
#define YYFREE   free
#define YYID (   n)    (n)
#define YYINITDEPTH   1000
#define YYLAST   1346
#define yyLerror (   text,
  lineno 
)    yyerror_with_lineinfo (p_parser, lineno, text)
#define YYLEX   yylex (&yylval, YYLEX_PARAM)
#define YYLEX_PARAM   vp_parser
#define YYLLOC_DEFAULT (   Current,
  Rhs,
 
)
Value:
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   50000
#define YYMAXUTOK   321
#define yyMissingArgument (   type,
  lineno 
)    yyerror_missing_argument (p_parser, lineno, type)
#define YYNNTS   48
#define yyNoModule (   module,
  lineno 
)    yyerror_no_module (p_parser, lineno, module)
#define YYNRULES   155
#define YYNSTATES   309
#define YYNTOKENS   90
#define YYPACT_NINF   -245
#define yypact_value_is_default (   yystate)    ((yystate) == (-245))
#define YYPARSE_PARAM   vp_parser
#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N))
#define YYPULL   1
#define YYPURE   1
#define YYPUSH   0
#define YYRECOVERING ( )    (!!yyerrstatus)
#define YYRHSLOC (   Rhs,
 
)    ((Rhs)[K])
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
#define YYSIZE_T   unsigned int
#define YYSKELETON_NAME   "yacc.c"
#define YYSTACK_ALLOC   YYMALLOC
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
#define YYSTACK_FREE   YYFREE
#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 (YYID (0))
#define YYSTYPE   yystype_type
#define YYSYNTAX_ERROR
Value:
yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
#define YYTABLE_NINF   -152
#define yytable_value_is_error (   yytable_value)    YYID (0)
#define yyTerror (   text,
  lineno,
  tentry 
)    yyerror_with_tableentry (p_parser, lineno, text, tentry)
#define YYTERROR   1
#define YYTOKEN_TABLE   0
#define YYTOKENTYPE
#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define yyTwarning (   tentry)    yywarning_with_tableentry (p_parser, 0, tentry)
#define yyTypeMismatch (   text,
  expected,
  seen,
  lineno 
)    yyerror_type_mismatch (p_parser, lineno, text, expected, seen)
#define YYUNDEFTOK   2
#define YYUSE (   e)    ((void) (e))
#define yyVerror (   name,
  lineno 
)    yyerror_with_name (p_parser, lineno, name)
#define yywarning (   text,
  lineno 
)    yywarning_with_lineinfo (p_parser, lineno, text)

Typedef Documentation

typedef struct stack stack_t

general stack handling

typedef short int yytype_int16
typedef short int yytype_int8
typedef unsigned short int yytype_uint16
typedef unsigned char yytype_uint8

Enumeration Type Documentation

Enumerator:
SCAN_FILE 

a plain file

SCAN_START_INCLUDE 

before the first token of an include file (see start_block())

SCAN_INCLUDE 

inside an include file

Enumerator:
SCANNER_ERROR 
END_OF_FILE 
EMPTY 
LIST 
MAP 
STRUCT 
BLOCK 
DEFINE 
UNDEFINE 
I18N 
RETURN 
CONTINUE 
BREAK 
IF 
DO 
WHILE 
REPEAT 
UNTIL 
IS 
ISNIL 
SYMBOL 
DCSYMBOL 
DCQUOTED_BLOCK 
QUOTED_BLOCK 
QUOTED_EXPRESSION 
CLOSEBRACKET 
TYPEDEF 
MODULE 
IMPORT 
EXPORT 
MAPEXPR 
INCLUDE 
GLOBAL 
TEXTDOMAIN 
CONST 
FULLNAME 
STATIC 
EXTERN 
LOOKUP 
SELECT 
SWITCH 
CASE 
DEFAULT 
SYM_NAMESPACE 
IDENTIFIER 
STRING 
C_VOID 
C_BOOLEAN 
C_INTEGER 
C_FLOAT 
C_BYTEBLOCK 
C_PATH 
C_SYMBOL 
C_TYPE 
OR 
AND 
NEQ 
EQUALS 
GE 
LE 
RIGHT 
LEFT 
ELSE 
UMINUS 
SCANNER_ERROR 
END_OF_FILE 
EMPTY 
LIST 
MAP 
STRUCT 
BLOCK 
DEFINE 
UNDEFINE 
I18N 
RETURN 
CONTINUE 
BREAK 
IF 
DO 
WHILE 
REPEAT 
UNTIL 
IS 
ISNIL 
SYMBOL 
DCSYMBOL 
DCQUOTED_BLOCK 
QUOTED_BLOCK 
QUOTED_EXPRESSION 
CLOSEBRACKET 
TYPEDEF 
MODULE 
IMPORT 
EXPORT 
MAPEXPR 
INCLUDE 
GLOBAL 
TEXTDOMAIN 
CONST 
FULLNAME 
STATIC 
EXTERN 
LOOKUP 
SELECT 
SWITCH 
CASE 
DEFAULT 
SYM_NAMESPACE 
IDENTIFIER 
STRING 
C_VOID 
C_BOOLEAN 
C_INTEGER 
C_FLOAT 
C_BYTEBLOCK 
C_PATH 
C_SYMBOL 
C_TYPE 
OR 
AND 
NEQ 
EQUALS 
GE 
LE 
RIGHT 
LEFT 
ELSE 
UMINUS 
SCANNER_ERROR 
END_OF_FILE 
EMPTY 
LIST 
MAP 
STRUCT 
BLOCK 
DEFINE 
UNDEFINE 
I18N 
RETURN 
CONTINUE 
BREAK 
IF 
DO 
WHILE 
REPEAT 
UNTIL 
IS 
ISNIL 
SYMBOL 
DCSYMBOL 
DCQUOTED_BLOCK 
QUOTED_BLOCK 
QUOTED_EXPRESSION 
CLOSEBRACKET 
TYPEDEF 
MODULE 
IMPORT 
EXPORT 
MAPEXPR 
INCLUDE 
GLOBAL 
TEXTDOMAIN 
CONST 
FULLNAME 
STATIC 
EXTERN 
LOOKUP 
SELECT 
SWITCH 
CASE 
DEFAULT 
SYM_NAMESPACE 
IDENTIFIER 
STRING 
C_VOID 
C_BOOLEAN 
C_INTEGER 
C_FLOAT 
C_BYTEBLOCK 
C_PATH 
C_SYMBOL 
C_TYPE 
OR 
AND 
NEQ 
EQUALS 
GE 
LE 
RIGHT 
LEFT 
ELSE 
UMINUS 

Function Documentation

static blockstack_t* _blockstack_pop ( Parser parser,
blockstack_t **  blockstackptr 
)
static
static void _blockstack_push ( blockstack_t **  blockstackptr,
blockstack_t blockelement 
)
static

References stack_push().

static scannerstack_t* _scannerstack_pop ( scannerstack_t **  scannerstackptr)
static

References stack_pop().

static void _scannerstack_push ( scannerstack_t **  scannerstackptr,
stack_t element 
)
static

References stack_push().

static switchstack_t* _switchstack_pop ( switchstack_t **  switchstack)
static

References stack_pop().

static void _switchstack_push ( switchstack_t **  switchstack,
stack_t e 
)
static

References stack_push().

static constTypePtr attach_parameter ( Parser parser,
YCodePtr  code,
YYSTYPE parm,
YYSTYPE parm1 = 0 
)
static
for ( yylen  = 0;yystr[yylen];yylen++)
static void i_check_binary_op ( YYSTYPE result,
YYSTYPE e1,
const char *  op,
YYSTYPE e2,
Parser parser 
)
static
static void i_check_compare_op ( YYSTYPE result,
YYSTYPE e1,
YECompare::c_op  op,
YYSTYPE e2,
Parser parser 
)
static
static void i_check_unary_op ( YYSTYPE result,
YYSTYPE e1,
const char *  op,
Parser parser 
)
static
static void i_check_void_assign ( YYSTYPE lhs,
YYSTYPE rhs,
Parser parser 
)
static
static stack_t* stack_pop ( stack_t **  stack)
static

pop element to stack

Referenced by _blockstack_pop(), _scannerstack_pop(), and _switchstack_pop().

static void stack_push ( stack_t **  stack,
stack_t element 
)
static

push element to stack

Referenced by _blockstack_push(), _scannerstack_push(), and _switchstack_push().

static YBlockPtr start_block ( Parser parser,
constTypePtr  type 
)
static

begin of a block

Parameters:
typedeclared return type
static void yyerror_assign_const ( Parser parser,
int  lineno,
const char *  s 
)
static
static void yyerror_cant_cast ( Parser parser,
int  lineno,
constTypePtr  from,
constTypePtr  to 
)
static
static void yyerror_missing_argument ( Parser parser,
int  lineno,
constTypePtr  type 
)
static
static void yyerror_no_module ( Parser parser,
int  lineno,
const char *  module 
)
static
static void yyerror_type_mismatch ( Parser parser,
int  lineno,
const char *  s,
constTypePtr  expected_type,
constTypePtr  seen_type 
)
static
static void yyerror_with_code ( Parser parser,
int  lineno,
YCodePtr  c,
constTypePtr  t 
)
static
static void yyerror_with_file ( Parser parser,
int  lineno,
const char *  s 
)
static
static void yyerror_with_lineinfo ( Parser parser,
int  lineno,
const char *  s 
)
static
static void yyerror_with_name ( Parser parser,
int  lineno,
const char *  s 
)
static
static void yyerror_with_tableentry ( Parser parser,
int  lineno,
const char *  s,
TableEntry entry 
)
static
int yylex ( YYSTYPE ,
void *   
)
int yyparse ( YYPARSE_PARAM  )
static char* yystpcpy ( yydest  ,
yysrc   
)
static
static YYSIZE_T yystrlen ( yystr  ) const
static
static void yywarning_with_lineinfo ( Parser parser,
int  lineno,
const char *  s 
)
static
static void yywarning_with_tableentry ( Parser parser,
int  lineno,
TableEntry entry 
)
static

Variable Documentation

constTypePtr declared_return_type = Type::Unspec
static

set by function declaration in order to predefine a definitions block return type

int do_while_count = 0
static
constTypePtr found_return_type = Type::Unspec
static

set when a return statement is encountered

bool in_switch = false
static
bool inside_module = false
static
int repeat_count = 0
static
StaticDeclaration static_declarations
const yytype_int16 yycheck[]
static
const yytype_uint8 yydefact[]
static
const yytype_int16 yydefgoto[]
static
Initial value:
{
-1, 23, 51, 41, 214, 42, 43, 44, 25, 54,
35, 61, 62, 128, 243, 129, 288, 181, 267, 183,
269, 290, 296, 206, 207, 212, 130, 131, 132, 133,
201, 246, 247, 248, 134, 33, 26, 27, 52, 95,
28, 47, 29, 102, 173, 30, 31, 188
}
return yylen
const yytype_int16 yypact[]
static
const yytype_int16 yypgoto[]
static
Initial value:
{
-245, -245, -6, 53, -245, 72, 3, -245, -46, -245,
-245, -50, -245, -244, -245, -245, -245, -245, -245, -245,
-245, -245, -245, -4, -134, -245, -245, -245, -245, -245,
-245, -245, -245, -61, -245, 158, -245, -245, -85, 166,
-245, -245, -60, -245, -245, -245, -56, -14
}
const yytype_uint8 yyr1[]
static
Initial value:
{
0, 90, 91, 91, 91, 92, 92, 92, 92, 93,
94, 94, 94, 94, 95, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96, 96, 97,
97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 99, 98, 100, 98, 101, 102, 102, 103, 104,
103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
103, 103, 103, 103, 103, 105, 106, 105, 107, 108,
105, 109, 110, 105, 105, 105, 105, 105, 111, 105,
112, 112, 113, 113, 113, 113, 113, 113, 113, 113,
113, 113, 114, 114, 115, 115, 116, 116, 116, 116,
117, 118, 119, 119, 120, 120, 121, 121, 122, 122,
123, 124, 124, 125, 125, 126, 126, 126, 126, 126,
126, 126, 126, 127, 127, 128, 128, 129, 129, 130,
130, 131, 131, 133, 132, 134, 134, 134, 134, 134,
135, 135, 136, 136, 137, 137
}
const yytype_uint8 yyr2[]
static
Initial value:
{
0, 2, 1, 1, 0, 1, 1, 1, 1, 5,
0, 1, 1, 1, 4, 1, 8, 8, 1, 3,
3, 6, 1, 7, 3, 1, 1, 1, 1, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
3, 3, 3, 3, 3, 3, 3, 3, 2, 2,
5, 0, 3, 0, 3, 2, 2, 0, 1, 0,
4, 3, 3, 3, 3, 3, 3, 4, 1, 2,
2, 1, 1, 3, 2, 6, 0, 6, 0, 0,
9, 0, 0, 9, 2, 2, 2, 3, 0, 6,
2, 0, 1, 1, 3, 1, 5, 3, 2, 2,
3, 4, 2, 2, 1, 3, 4, 2, 2, 4,
4, 4, 1, 0, 1, 0, 0, 1, 1, 3,
2, 3, 6, 1, 2, 1, 1, 1, 1, 1,
1, 1, 1, 2, 4, 1, 3, 1, 0, 2,
4, 3, 5, 0, 5, 0, 2, 1, 4, 3,
1, 1, 1, 1, 1, 3
}
const char* yysrc
const yytype_uint8 yystos[]
static
const yytype_int16 yytable[]
static
const char* const yytname[]
static
Initial value:
{
"$end", "error", "$undefined", "SCANNER_ERROR", "END_OF_FILE", "EMPTY",
"LIST", "MAP", "STRUCT", "BLOCK", "DEFINE", "UNDEFINE", "I18N", "RETURN",
"CONTINUE", "BREAK", "IF", "DO", "WHILE", "REPEAT", "UNTIL", "IS",
"ISNIL", "SYMBOL", "DCSYMBOL", "DCQUOTED_BLOCK", "QUOTED_BLOCK",
"QUOTED_EXPRESSION", "CLOSEBRACKET", "TYPEDEF", "MODULE", "IMPORT",
"EXPORT", "MAPEXPR", "INCLUDE", "GLOBAL", "TEXTDOMAIN", "CONST",
"FULLNAME", "STATIC", "EXTERN", "LOOKUP", "SELECT", "SWITCH", "CASE",
"DEFAULT", "SYM_NAMESPACE", "IDENTIFIER", "STRING", "C_VOID",
"C_BOOLEAN", "C_INTEGER", "C_FLOAT", "C_BYTEBLOCK", "C_PATH", "C_SYMBOL",
"C_TYPE", "'='", "'?'", "OR", "AND", "'|'", "'^'", "'&'", "NEQ",
"EQUALS", "'<'", "'>'", "GE", "LE", "RIGHT", "LEFT", "'+'", "'-'", "'*'",
"'/'", "'%'", "'!'", "ELSE", "'~'", "UMINUS", "':'", "'['", "'('", "')'",
"','", "'{'", "'}'", "';'", "']'", "$accept", "ycp", "expression",
"bracket_expression", "castable_expression", "casted_expression",
"compact_expression", "infix_expression", "block", "@1", "@2",
"block_end", "statements", "statement", "$@3", "control_statement", "@4",
"$@5", "@6", "$@7", "@8", "@9", "opt_else", "type", "type_gt", "types",
"definition", "function_start", "opt_global_identifier", "opt_global",
"opt_define", "tupletypes", "tupletype", "formal_param", "assignment",
"string", "constant", "list", "list_elements", "opt_comma", "map",
"map_elements", "function_call", "@10", "parameters", "function_name",
"identifier", "identifier_list", 0
}
const yytype_uint8 yytranslate[]
static
int yytype
YYSTYPE* yyvaluep

Generated on a sunny day for yast2-core by doxygen 1.8.1