ELinks 0.18.0
plural.c File Reference
#include <stdlib.h>
#include "intl/gettext/gettextP.h"
#include "plural.h"
#include <limits.h>
Include dependency graph for plural.c:

Data Structures

union  yyalloc

Macros

#define YYBISON   30704
#define YYBISON_VERSION   "3.7.4"
#define YYSKELETON_NAME   "yacc.c"
#define YYPURE   2
#define YYPUSH   0
#define YYPULL   1
#define yyparse   gettext__parse
#define yylex   gettext__lex
#define yyerror   gettext__error
#define yydebug   gettext__debug
#define yynerrs   gettext__nerrs
#define YY_CAST(Type, Val)
#define YY_REINTERPRET_CAST(Type, Val)
#define YY_NULLPTR   ((void*)0)
#define YYPTRDIFF_T   long
#define YYPTRDIFF_MAXIMUM   LONG_MAX
#define YYSIZE_T   unsigned
#define YYSIZE_MAXIMUM
#define YYSIZEOF(X)
#define YY_(Msgid)
#define YY_ATTRIBUTE_PURE
#define YY_ATTRIBUTE_UNUSED
#define YYUSE(E)
#define YY_INITIAL_VALUE(Value)
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_IGNORE_USELESS_CAST_BEGIN
#define YY_IGNORE_USELESS_CAST_END
#define YY_ASSERT(E)
#define YYSTACK_ALLOC   YYMALLOC
#define YYSTACK_FREE   YYFREE
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
#define YYMALLOC   malloc
#define YYFREE   free
#define YYSTACK_GAP_MAXIMUM   (YYSIZEOF (union yyalloc) - 1)
#define YYSTACK_BYTES(N)
#define YYCOPY_NEEDED   1
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define YYFINAL   9
#define YYLAST   56
#define YYNTOKENS   16
#define YYNNTS   3
#define YYNRULES   13
#define YYNSTATES   27
#define YYMAXUTOK   262
#define YYTRANSLATE(YYX)
#define YY_ACCESSING_SYMBOL(State)
 Accessing symbol of state STATE.
#define YYPACT_NINF   (-4)
#define yypact_value_is_default(Yyn)
#define YYTABLE_NINF   (-1)
#define yytable_value_is_error(Yyn)
#define yyerrok   (yyerrstatus = 0)
#define yyclearin   (yychar = YYEMPTY)
#define YYACCEPT   goto yyacceptlab
#define YYABORT   goto yyabortlab
#define YYERROR   goto yyerrorlab
#define YYRECOVERING()
#define YYBACKUP(Token, Value)
#define YYERRCODE   YYUNDEF
#define YYDPRINTF(Args)
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
#define YY_STACK_PRINT(Bottom, Top)
#define YY_REDUCE_PRINT(Rule)
#define YYINITDEPTH   200
#define YYMAXDEPTH   10000
#define YYPOPSTACK(N)

Typedefs

typedef enum yysymbol_kind_t yysymbol_kind_t
typedef signed char yytype_int8
typedef short yytype_int16
typedef unsigned char yytype_uint8
typedef unsigned short yytype_uint16
typedef yytype_int8 yy_state_t
typedef int yy_state_fast_t

Enumerations

enum  yysymbol_kind_t {
  YYSYMBOL_YYEMPTY = -2 , YYSYMBOL_YYEOF = 0 , YYSYMBOL_YYerror = 1 , YYSYMBOL_YYUNDEF = 2 ,
  YYSYMBOL_3_ = 3 , YYSYMBOL_4_ = 4 , YYSYMBOL_5_ = 5 , YYSYMBOL_6_ = 6 ,
  YYSYMBOL_EQUOP2 = 7 , YYSYMBOL_CMPOP2 = 8 , YYSYMBOL_ADDOP2 = 9 , YYSYMBOL_MULOP2 = 10 ,
  YYSYMBOL_NUMBER = 11 , YYSYMBOL_12_ = 12 , YYSYMBOL_13_n_ = 13 , YYSYMBOL_14_ = 14 ,
  YYSYMBOL_15_ = 15 , YYSYMBOL_YYACCEPT = 16 , YYSYMBOL_start = 17 , YYSYMBOL_exp = 18
}
enum  { YYENOMEM = -2 }

Functions

static struct expressionnew_exp (int nargs, enum operator_ op, struct expression *const *args)
static struct expressionnew_exp_0 (enum operator_ op)
static struct expressionnew_exp_1 (enum operator_ op, struct expression *right)
static struct expressionnew_exp_2 (enum operator_ op, struct expression *left, struct expression *right)
static struct expressionnew_exp_3 (enum operator_ op, struct expression *bexp, struct expression *tbranch, struct expression *fbranch)
static int yylex (YYSTYPE *lval, struct parse_args *arg)
static void yyerror (struct parse_args *arg, const char *str)
void * malloc (YYSIZE_T)
void free (void *)
static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, struct parse_args *arg)
int yyparse (struct parse_args *arg)
void gettext_free_exp__ (struct expression *exp)

Variables

static const yytype_int8 yytranslate []
static const yytype_int8 yypact []
static const yytype_int8 yydefact []
static const yytype_int8 yypgoto []
static const yytype_int8 yydefgoto []
static const yytype_int8 yytable []
static const yytype_int8 yycheck []
static const yytype_int8 yystos []
static const yytype_int8 yyr1 []
static const yytype_int8 yyr2 []

Macro Definition Documentation

◆ YY_

#define YY_ ( Msgid)
Value:
Msgid

◆ YY_ACCESSING_SYMBOL

#define YY_ACCESSING_SYMBOL ( State)
Value:
yysymbol_kind_t
Definition plural.c:137
#define YY_CAST(Type, Val)
Definition plural.c:118
static const yytype_int8 yystos[]
Definition plural.c:720

Accessing symbol of state STATE.

◆ YY_ASSERT

#define YY_ASSERT ( E)
Value:
((void) (0 && (E)))

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

◆ YY_CAST

#define YY_CAST ( Type,
Val )
Value:
((Type) (Val))

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE ( Value)
Value:
Value

◆ YY_NULLPTR

#define YY_NULLPTR   ((void*)0)

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT ( Rule)

◆ YY_REINTERPRET_CAST

#define YY_REINTERPRET_CAST ( Type,
Val )
Value:
((Type) (Val))

◆ YY_STACK_PRINT

#define YY_STACK_PRINT ( Bottom,
Top )

◆ YY_SYMBOL_PRINT

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

◆ YYABORT

#define YYABORT   goto yyabortlab

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

◆ YYBACKUP

#define YYBACKUP ( Token,
Value )
Value:
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (arg, YY_("syntax error: cannot back up")); \
} \
while (0)
#define YY_(Msgid)
Definition plural.c:364
#define YYERROR
Definition plural.c:749
#define YYEMPTY
Definition plural.h:66

◆ YYBISON

#define YYBISON   30704

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.7.4"

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

◆ yydebug

#define yydebug   gettext__debug

◆ YYDPRINTF

#define YYDPRINTF ( Args)
Value:
((void) 0)

◆ YYERRCODE

#define YYERRCODE   YYUNDEF

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

◆ YYERROR

#define YYERROR   goto yyerrorlab

◆ yyerror

#define yyerror   gettext__error

◆ YYFINAL

#define YYFINAL   9

◆ YYFREE

#define YYFREE   free

◆ YYINITDEPTH

#define YYINITDEPTH   200

◆ YYLAST

#define YYLAST   56

◆ yylex

#define yylex   gettext__lex

◆ YYMALLOC

#define YYMALLOC   malloc

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

◆ YYMAXUTOK

#define YYMAXUTOK   262

◆ yynerrs

#define yynerrs   gettext__nerrs

◆ YYNNTS

#define YYNNTS   3

◆ YYNRULES

#define YYNRULES   13

◆ YYNSTATES

#define YYNSTATES   27

◆ YYNTOKENS

#define YYNTOKENS   16

◆ YYPACT_NINF

#define YYPACT_NINF   (-4)

◆ yypact_value_is_default

#define yypact_value_is_default ( Yyn)
Value:
((Yyn) == YYPACT_NINF)
#define YYPACT_NINF
Definition plural.c:654

◆ yyparse

#define yyparse   gettext__parse

◆ YYPOPSTACK

#define YYPOPSTACK ( N)
Value:
(yyvsp -= (N), yyssp -= (N))

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

◆ YYPULL

#define YYPULL   1

◆ YYPURE

#define YYPURE   2

◆ YYPUSH

#define YYPUSH   0

◆ YYRECOVERING

#define YYRECOVERING ( )
Value:
(!!yyerrstatus)

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition plural.c:324
#define YYSIZE_T
Definition plural.c:337
#define YYPTRDIFF_T
Definition plural.c:323

◆ YYSIZE_T

#define YYSIZE_T   unsigned

◆ YYSIZEOF

#define YYSIZEOF ( X)
Value:
YY_CAST (YYPTRDIFF_T, sizeof (X))
#define X(renderer)
Definition util.h:44

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

◆ YYSTACK_BYTES

#define YYSTACK_BYTES ( N)
Value:
#define YYSIZEOF(X)
Definition plural.c:347
yytype_int8 yy_state_t
Definition plural.c:351
#define YYSTACK_GAP_MAXIMUM
Definition plural.c:505
Definition plural.h:79

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

◆ YYSTACK_GAP_MAXIMUM

#define YYSTACK_GAP_MAXIMUM   (YYSIZEOF (union yyalloc) - 1)

◆ YYSTACK_RELOCATE

#define YYSTACK_RELOCATE ( Stack_alloc,
Stack )
Value:
do \
{ \
YYPTRDIFF_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / YYSIZEOF (*yyptr); \
} \
while (0)

◆ YYTABLE_NINF

#define YYTABLE_NINF   (-1)

◆ yytable_value_is_error

#define yytable_value_is_error ( Yyn)
Value:
0

◆ YYTRANSLATE

#define YYTRANSLATE ( YYX)
Value:
(0 <= (YYX) && (YYX) <= YYMAXUTOK \
static const yytype_int8 yytranslate[]
Definition plural.c:580
@ YYSYMBOL_YYUNDEF
Definition plural.c:141
#define YYMAXUTOK
Definition plural.c:568

◆ YYUSE

#define YYUSE ( E)
Value:
((void) (E))

Typedef Documentation

◆ yy_state_fast_t

typedef int yy_state_fast_t

◆ yy_state_t

◆ yysymbol_kind_t

◆ yytype_int16

typedef short yytype_int16

◆ yytype_int8

typedef signed char yytype_int8

◆ yytype_uint16

typedef unsigned short yytype_uint16

◆ yytype_uint8

typedef unsigned char yytype_uint8

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
YYENOMEM 

◆ yysymbol_kind_t

Enumerator
YYSYMBOL_YYEMPTY 
YYSYMBOL_YYEOF 
YYSYMBOL_YYerror 
YYSYMBOL_YYUNDEF 
YYSYMBOL_3_ 
YYSYMBOL_4_ 
YYSYMBOL_5_ 
YYSYMBOL_6_ 
YYSYMBOL_EQUOP2 
YYSYMBOL_CMPOP2 
YYSYMBOL_ADDOP2 
YYSYMBOL_MULOP2 
YYSYMBOL_NUMBER 
YYSYMBOL_12_ 
YYSYMBOL_13_n_ 
YYSYMBOL_14_ 
YYSYMBOL_15_ 
YYSYMBOL_YYACCEPT 
YYSYMBOL_start 
YYSYMBOL_exp 

Function Documentation

◆ free()

void free ( void * )

◆ gettext_free_exp__()

void gettext_free_exp__ ( struct expression * exp)

◆ malloc()

void * malloc ( YYSIZE_T )

◆ new_exp()

struct expression * new_exp ( int nargs,
enum operator_ op,
struct expression *const * args )
static

◆ new_exp_0()

struct expression * new_exp_0 ( enum operator_ op)
inlinestatic

◆ new_exp_1()

struct expression * new_exp_1 ( enum operator_ op,
struct expression * right )
inlinestatic

◆ new_exp_2()

struct expression * new_exp_2 ( enum operator_ op,
struct expression * left,
struct expression * right )
static

◆ new_exp_3()

struct expression * new_exp_3 ( enum operator_ op,
struct expression * bexp,
struct expression * tbranch,
struct expression * fbranch )
inlinestatic

◆ yydestruct()

void yydestruct ( const char * yymsg,
yysymbol_kind_t yykind,
YYSTYPE * yyvaluep,
struct parse_args * arg )
static

◆ yyerror()

void yyerror ( struct parse_args * arg,
const char * str )
static

◆ yylex()

int yylex ( YYSTYPE * lval,
struct parse_args * arg )
static

◆ yyparse()

int yyparse ( struct parse_args * arg)

Variable Documentation

◆ yycheck

const yytype_int8 yycheck[]
static
Initial value:
=
{
1, 0, 5, 4, 7, 8, 9, 10, 10, 10,
11, 12, 13, 14, 15, 16, 3, 4, 5, -1,
7, 8, 9, 10, 25, 3, 4, 5, 15, 7,
8, 9, 10, 6, 12, 9, 10, -1, 11, -1,
13, 14, 3, 4, 5, -1, 7, 8, 9, 10,
7, 8, 9, 10, 8, 9, 10
}

◆ yydefact

const yytype_int8 yydefact[]
static
Initial value:
=
{
0, 0, 12, 11, 0, 0, 2, 10, 0, 1,
0, 0, 0, 0, 0, 0, 0, 13, 0, 4,
5, 6, 7, 8, 9, 0, 3
}

◆ yydefgoto

const yytype_int8 yydefgoto[]
static
Initial value:
=
{
-1, 5, 6
}

◆ yypact

const yytype_int8 yypact[]
static
Initial value:
=
{
27, 27, -4, -4, 27, 1, 39, -4, 13, -4,
27, 27, 27, 27, 27, 27, 27, -4, 22, -3,
43, 46, 26, -2, -4, 27, 39
}

◆ yypgoto

const yytype_int8 yypgoto[]
static
Initial value:
=
{
-4, -4, -1
}

◆ yyr1

const yytype_int8 yyr1[]
static
Initial value:
=
{
0, 16, 17, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18
}

◆ yyr2

const yytype_int8 yyr2[]
static
Initial value:
=
{
0, 2, 1, 5, 3, 3, 3, 3, 3, 3,
2, 1, 1, 3
}

◆ yystos

const yytype_int8 yystos[]
static
Initial value:
=
{
0, 6, 11, 13, 14, 17, 18, 18, 18, 0,
3, 4, 5, 7, 8, 9, 10, 15, 18, 18,
18, 18, 18, 18, 18, 12, 18
}

◆ yytable

const yytype_int8 yytable[]
static
Initial value:
=
{
7, 9, 12, 8, 13, 14, 15, 16, 16, 18,
19, 20, 21, 22, 23, 24, 10, 11, 12, 0,
13, 14, 15, 16, 26, 10, 11, 12, 17, 13,
14, 15, 16, 1, 25, 15, 16, 0, 2, 0,
3, 4, 10, 11, 12, 0, 13, 14, 15, 16,
13, 14, 15, 16, 14, 15, 16
}

◆ yytranslate

const yytype_int8 yytranslate[]
static
Initial value:
=
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 6, 2, 2, 2, 2, 5, 2,
14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 7, 8,
9, 10, 11
}