ao-syntax.cpp File Reference

#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <map>
#include <vector>
#include "ao-lexer.h"
#include "sao-printer.h"
#include "ao-grammar.h"

Include dependency graph for ao-syntax.cpp:

Go to the source code of this file.

Classes

union  YYSTYPE
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 yyparse   aoparse
#define yylex   aolex
#define yyerror   aoerror
#define yylval   aolval
#define yychar   aochar
#define yydebug   aodebug
#define yynerrs   aonerrs
#define YYSTTYPE   char*
#define YYDEBUG   0
#define YYERROR_VERBOSE   0
#define YYTOKEN_TABLE   0
#define YYSTYPE_IS_TRIVIAL   1
#define yystype   YYSTYPE
#define YYSTYPE_IS_DECLARED   1
#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   61
#define YYNTOKENS   22
#define YYNNTS   12
#define YYNRULES   29
#define YYNSTATES   63
#define YYUNDEFTOK   2
#define YYMAXUTOK   276
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYPACT_NINF   -23
#define YYTABLE_NINF   -1
#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 {
  META = 258, NAME = 259, LPAREN = 260, RPAREN = 261,
  MESSAGE = 262, SEMICOLON = 263, NUMBER = 264, INIT = 265,
  ACTIVE = 266, COMMA = 267, LBRACE = 268, RBRACE = 269,
  STAR = 270, PRECOMPILER = 271, VOLATILE = 272, CLASS = 273,
  USES = 274, TEMPLATE_OPEN = 275, TEMPLATE_CLOSE = 276, META = 258,
  NAME = 259, LPAREN = 260, RPAREN = 261, MESSAGE = 262,
  SEMICOLON = 263, NUMBER = 264, INIT = 265, ACTIVE = 266,
  COMMA = 267, LBRACE = 268, RBRACE = 269, STAR = 270,
  PRECOMPILER = 271, VOLATILE = 272, CLASS = 273, USES = 274,
  TEMPLATE_OPEN = 275, TEMPLATE_CLOSE = 276
}

Functions

void aoerror (const char *text)
char * cat (const char *a, const char *b)
char * args2str (vector< s_arg > *args, string sepi=", ", string prefix="")
char * argnames2str (vector< s_arg > *args, string prefix="")
char * copyargs (vector< s_arg > *args)
int yyparse ()

Variables

bool pascal
outputbuf object
outputbuf object2
outputbuf meta
outputbuf msgs
outputbuf msgs1
outputbuf impl
outputbuf useslist
outputbuf globhead
char * current_ao
map< string, string > field2init
int yytype
YYSTYPEyyvaluep
int yychar
YYSTYPE yylval
int yynerrs


Define Documentation

#define YY_ ( msgid   )     msgid

Definition at line 330 of file ao-syntax.cpp.

#define YY_LOCATION_PRINT ( File,
Loc   )     ((void) 0)

Definition at line 774 of file ao-syntax.cpp.

#define YY_REDUCE_PRINT ( Rule   ) 

Definition at line 947 of file ao-syntax.cpp.

#define YY_STACK_PRINT ( Bottom,
Top   ) 

Definition at line 946 of file ao-syntax.cpp.

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

Definition at line 945 of file ao-syntax.cpp.

#define YYABORT   goto yyabortlab

Definition at line 703 of file ao-syntax.cpp.

#define YYACCEPT   goto yyacceptlab

Definition at line 702 of file ao-syntax.cpp.

#define YYBACKUP ( Token,
Value   ) 

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))

Definition at line 715 of file ao-syntax.cpp.

#define YYBISON   1

Definition at line 46 of file ao-syntax.cpp.

#define YYBISON_VERSION   "2.4.1"

Definition at line 49 of file ao-syntax.cpp.

#define yychar   aochar

Definition at line 71 of file ao-syntax.cpp.

#define yyclearin   (yychar = YYEMPTY)

Definition at line 698 of file ao-syntax.cpp.

#define YYCOPY ( To,
From,
Count   ) 

Value:

do                                      \
        {                                       \
          YYSIZE_T yyi;                         \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (To)[yyi] = (From)[yyi];            \
        }                                       \
      while (YYID (0))

Definition at line 456 of file ao-syntax.cpp.

#define YYDEBUG   0

Definition at line 200 of file ao-syntax.cpp.

#define yydebug   aodebug

Definition at line 72 of file ao-syntax.cpp.

#define YYDPRINTF ( Args   ) 

Definition at line 944 of file ao-syntax.cpp.

#define YYEMPTY   (-2)

Definition at line 699 of file ao-syntax.cpp.

#define YYEOF   0

Definition at line 700 of file ao-syntax.cpp.

#define YYERRCODE   256

Definition at line 734 of file ao-syntax.cpp.

#define yyerrok   (yyerrstatus = 0)

Definition at line 697 of file ao-syntax.cpp.

#define YYERROR   goto yyerrorlab

Definition at line 704 of file ao-syntax.cpp.

#define yyerror   aoerror

Definition at line 69 of file ao-syntax.cpp.

#define YYERROR_VERBOSE   0

Definition at line 208 of file ao-syntax.cpp.

#define YYFAIL   goto yyerrlab

Definition at line 711 of file ao-syntax.cpp.

#define YYFINAL   2

Definition at line 486 of file ao-syntax.cpp.

#define YYFREE   free

Definition at line 419 of file ao-syntax.cpp.

#define YYID (  )     (n)

Definition at line 343 of file ao-syntax.cpp.

#define YYINITDEPTH   200

Definition at line 953 of file ao-syntax.cpp.

#define YYLAST   61

Definition at line 488 of file ao-syntax.cpp.

#define YYLEX   yylex ()

Definition at line 784 of file ao-syntax.cpp.

#define yylex   aolex

Definition at line 68 of file ao-syntax.cpp.

#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))

Definition at line 743 of file ao-syntax.cpp.

#define YYLSP_NEEDED   0

Definition at line 64 of file ao-syntax.cpp.

#define yylval   aolval

Definition at line 70 of file ao-syntax.cpp.

#define YYMALLOC   malloc

Definition at line 412 of file ao-syntax.cpp.

#define YYMAXDEPTH   10000

Definition at line 964 of file ao-syntax.cpp.

#define YYMAXUTOK   276

Definition at line 501 of file ao-syntax.cpp.

#define yynerrs   aonerrs

Definition at line 73 of file ao-syntax.cpp.

#define YYNNTS   12

Definition at line 493 of file ao-syntax.cpp.

#define YYNRULES   29

Definition at line 495 of file ao-syntax.cpp.

#define YYNSTATES   63

Definition at line 497 of file ao-syntax.cpp.

#define YYNTOKENS   22

Definition at line 491 of file ao-syntax.cpp.

#define YYPACT_NINF   -23

Definition at line 638 of file ao-syntax.cpp.

#define yyparse   aoparse

Definition at line 67 of file ao-syntax.cpp.

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

#define YYPULL   1

Definition at line 61 of file ao-syntax.cpp.

#define YYPURE   0

Definition at line 55 of file ao-syntax.cpp.

#define YYPUSH   0

Definition at line 58 of file ao-syntax.cpp.

 
#define YYRECOVERING (  )     (!!yyerrstatus)

Definition at line 713 of file ao-syntax.cpp.

#define YYRHSLOC ( Rhs,
 )     ((Rhs)[K])

Definition at line 741 of file ao-syntax.cpp.

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 320 of file ao-syntax.cpp.

#define YYSIZE_T   unsigned int

Definition at line 316 of file ao-syntax.cpp.

#define YYSKELETON_NAME   "yacc.c"

Definition at line 52 of file ao-syntax.cpp.

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 398 of file ao-syntax.cpp.

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 401 of file ao-syntax.cpp.

#define YYSTACK_BYTES (  ) 

Value:

((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

Definition at line 445 of file ao-syntax.cpp.

#define YYSTACK_FREE   YYFREE

Definition at line 399 of file ao-syntax.cpp.

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

Definition at line 441 of file ao-syntax.cpp.

#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))

Definition at line 472 of file ao-syntax.cpp.

#define YYSTTYPE   char*

Definition at line 192 of file ao-syntax.cpp.

#define yystype   YYSTYPE

Definition at line 264 of file ao-syntax.cpp.

#define YYSTYPE_IS_DECLARED   1

Definition at line 265 of file ao-syntax.cpp.

#define YYSTYPE_IS_TRIVIAL   1

Definition at line 263 of file ao-syntax.cpp.

#define YYTABLE_NINF   -1

Definition at line 661 of file ao-syntax.cpp.

#define YYTERROR   1

Definition at line 733 of file ao-syntax.cpp.

#define YYTOKEN_TABLE   0

Definition at line 213 of file ao-syntax.cpp.

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

Definition at line 503 of file ao-syntax.cpp.

#define YYUNDEFTOK   2

Definition at line 500 of file ao-syntax.cpp.

#define YYUSE (  )     ((void) (e))

Definition at line 336 of file ao-syntax.cpp.


Typedef Documentation

typedef short int yytype_int16

Definition at line 303 of file ao-syntax.cpp.

typedef short int yytype_int8

Definition at line 291 of file ao-syntax.cpp.

typedef unsigned short int yytype_uint16

Definition at line 297 of file ao-syntax.cpp.

typedef unsigned char yytype_uint8

Definition at line 282 of file ao-syntax.cpp.


Enumeration Type Documentation

Enumerator:
META 
NAME 
LPAREN 
RPAREN 
MESSAGE 
SEMICOLON 
NUMBER 
INIT 
ACTIVE 
COMMA 
LBRACE 
RBRACE 
STAR 
PRECOMPILER 
VOLATILE 
CLASS 
USES 
TEMPLATE_OPEN 
TEMPLATE_CLOSE 
META 
NAME 
LPAREN 
RPAREN 
MESSAGE 
SEMICOLON 
NUMBER 
INIT 
ACTIVE 
COMMA 
LBRACE 
RBRACE 
STAR 
PRECOMPILER 
VOLATILE 
CLASS 
USES 
TEMPLATE_OPEN 
TEMPLATE_CLOSE 

Definition at line 222 of file ao-syntax.cpp.


Function Documentation

void aoerror ( const char *  text  ) 

Definition at line 1979 of file ao-lexer.cpp.

char* argnames2str ( vector< s_arg > *  args,
string  prefix = "" 
)

Definition at line 137 of file ao-syntax.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

char* args2str ( vector< s_arg > *  args,
string  sepi = ", ",
string  prefix = "" 
)

Definition at line 103 of file ao-syntax.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

char* cat ( const char *  a,
const char *  b 
)

Definition at line 90 of file ao-syntax.cpp.

Here is the caller graph for this function:

char* copyargs ( vector< s_arg > *  args  ) 

Definition at line 151 of file ao-syntax.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int yyparse (  ) 

Definition at line 1259 of file ao-syntax.cpp.

Here is the call graph for this function:


Variable Documentation

char* current_ao

Definition at line 44 of file aoc.cpp.

map<string,string> field2init

Definition at line 43 of file aoc.cpp.

Definition at line 40 of file aoc.cpp.

Definition at line 42 of file aoc.cpp.

Definition at line 37 of file aoc.cpp.

Definition at line 38 of file aoc.cpp.

Definition at line 39 of file aoc.cpp.

Definition at line 35 of file aoc.cpp.

Definition at line 36 of file aoc.cpp.

bool pascal

Definition at line 48 of file aoc.cpp.

Definition at line 41 of file aoc.cpp.

int yychar

Definition at line 1222 of file ao-syntax.cpp.

Definition at line 1231 of file ao-syntax.cpp.

int yynerrs

Definition at line 1234 of file ao-syntax.cpp.

int yytype

Definition at line 1193 of file ao-syntax.cpp.

Definition at line 1194 of file ao-syntax.cpp.


Generated on Sun Apr 4 23:26:02 2010 for Active Objects by  doxygen 1.5.9