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:

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 yyparse   aoparse
#define yylex   aolex
#define yyerror   aoerror
#define yylval   aolval
#define yychar   aochar
#define yydebug   aodebug
#define yynerrs   aonerrs
#define T   ""
#define YYSTTYPE   char*
#define YYDEBUG   0
#define YYERROR_VERBOSE   0
#define YYTOKEN_TABLE   0
#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, BRACE_OPEN = 258, BRACE_CLOSE = 259,
  COLON = 260, BRACKET_OPEN = 261, BRACKET_CLOSE = 262, SYMBOL = 263,
  NUMBER = 264, STRING = 265, DIMENSION_OPEN = 266, DIMENSION_CLOSE = 267,
  BRACE_OPEN = 258, BRACE_CLOSE = 259, COLON = 260, BRACKET_OPEN = 261,
  BRACKET_CLOSE = 262, SYMBOL = 263, NUMBER = 264, STRING = 265,
  DIMENSION_OPEN = 266, DIMENSION_CLOSE = 267, META = 258, NAME = 259,
  LPAREN = 260, RPAREN = 261, MESSAGE = 262, SEMICOLON = 263,
  NUMBER = 264, DATA = 265, COMMA = 266, LBRACE = 267,
  RBRACE = 268, STAR = 269, PRECOMPILER = 270, READ = 271,
  WRITE = 272, VOLATILE = 273, CLASS = 274, COLON = 275,
  VIRTUAL = 276, ASSIGNMENT = 277, EQUALITY = 278, NEQ = 279,
  OPERATOR = 280, TEMPLATE_OPEN = 281, TEMPLATE_CLOSE = 282, BRACKETS = 283,
  TILDE = 284, CONST = 285, META = 258, NAME = 259,
  LPAREN = 260, RPAREN = 261, MESSAGE = 262, SEMICOLON = 263,
  NUMBER = 264, DATA = 265, COMMA = 266, LBRACE = 267,
  RBRACE = 268, STAR = 269, PRECOMPILER = 270, READ = 271,
  WRITE = 272, VOLATILE = 273, CLASS = 274, COLON = 275,
  VIRTUAL = 276, ASSIGNMENT = 277, EQUALITY = 278, NEQ = 279,
  OPERATOR = 280, TEMPLATE_OPEN = 281, TEMPLATE_CLOSE = 282, BRACKETS = 283,
  TILDE = 284, CONST = 285
}

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
YYSTYPE * yyvaluep
int yychar
YYSTYPE yylval
int yynerrs

Define Documentation

#define T   ""

Since some people want prefixes such as 'T' in the generated pascal code it is possible to declare them here. By default, the prefix is omitted since I believe it is a stupid convention; Active objects are no longer objects and even the 'objects' are already pointers, so they should basically be called pointers, but then it becomes even more confusing. However, T as a prefix is also not completely correct, semantically speaking. Maybe the prefix A would make more sense, or AO. One could also argue, that if your active obejcts needs a prefix, then you should call it like that.

Referenced by ArrayMeta< D, T >::address(), Array< D, T >::copyFrom(), findItem(), findOneItem(), firstItem(), IntegerClass< T, S, C >::IntegerClass(), lastItem(), main(), nextSibling(), ArrayIterator< D, T, PT, SM, ORDERED >::operator!=(), ArrayIterator< D, T, PT, SM, ORDERED >::operator*=(), ArrayIterator< D, T, PT, SM, ORDERED >::operator+=(), ArrayIterator< D, T, PT, SM, ORDERED >::operator-=(), ArrayIterator< D, T, PT, SM, ORDERED >::operator/=(), Array< D, T >::operator=(), ArrayIterator< D, T, PT, SM, ORDERED >::operator==(), rescanTempo(), split_raw(), Array< SM, T >::type_name(), treeWidgetIterator< T >::val(), DataBinner::visitArray(), DataTexter::visitArray(), wavelet_subtraction_test(), and yyparse().

#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

Referenced by yyparse().

#define YYACCEPT   goto yyacceptlab

Referenced by yyparse().

#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))
#define YYBISON   1
#define YYBISON_VERSION   "2.4.1"
#define yychar   aochar
#define yyclearin   (yychar = YYEMPTY)
#define YYCOPY ( To,
From,
Count   ) 
Value:
do                                      \
        {                                       \
          YYSIZE_T yyi;                         \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (To)[yyi] = (From)[yyi];            \
        }                                       \
      while (YYID (0))
#define YYDEBUG   0
#define yydebug   aodebug
#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   aoerror

Referenced by yyparse().

#define YYERROR_VERBOSE   0
#define YYFAIL   goto yyerrlab
#define YYFINAL   2

Referenced by yyparse().

#define YYFREE   free
#define YYID ( n   )     (n)

Referenced by yyparse().

#define YYINITDEPTH   200

Referenced by yyparse().

#define YYLAST   61

Referenced by yyparse().

#define YYLEX   yylex ()

Referenced by yyparse().

#define yylex   aolex
#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 yylval   aolval
#define YYMALLOC   malloc
#define YYMAXDEPTH   10000

Referenced by yyparse().

#define YYMAXUTOK   276
#define yynerrs   aonerrs
#define YYNNTS   12
#define YYNRULES   29
#define YYNSTATES   63
#define YYNTOKENS   22

Referenced by yyparse().

#define YYPACT_NINF   -23

Referenced by yyparse().

#define yyparse   aoparse

Referenced by DataTexter::read_into().

#define YYPOPSTACK (  )     (yyvsp -= (N), yyssp -= (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   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 (  ) 
Value:
((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   ) 
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))

Referenced by yyparse().

#define YYSTTYPE   char*
#define YYTABLE_NINF   -1

Referenced by yyparse().

#define YYTERROR   1

Referenced by yyparse().

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

Referenced by yyparse().

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

Typedef Documentation

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:
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 
BRACE_OPEN 
BRACE_CLOSE 
COLON 
BRACKET_OPEN 
BRACKET_CLOSE 
SYMBOL 
NUMBER 
STRING 
DIMENSION_OPEN 
DIMENSION_CLOSE 
BRACE_OPEN 
BRACE_CLOSE 
COLON 
BRACKET_OPEN 
BRACKET_CLOSE 
SYMBOL 
NUMBER 
STRING 
DIMENSION_OPEN 
DIMENSION_CLOSE 
META 
NAME 
LPAREN 
RPAREN 
MESSAGE 
SEMICOLON 
NUMBER 
DATA 
COMMA 
LBRACE 
RBRACE 
STAR 
PRECOMPILER 
READ 
WRITE 
VOLATILE 
CLASS 
COLON 
VIRTUAL 
ASSIGNMENT 
EQUALITY 
NEQ 
OPERATOR 
TEMPLATE_OPEN 
TEMPLATE_CLOSE 
BRACKETS 
TILDE 
CONST 
META 
NAME 
LPAREN 
RPAREN 
MESSAGE 
SEMICOLON 
NUMBER 
DATA 
COMMA 
LBRACE 
RBRACE 
STAR 
PRECOMPILER 
READ 
WRITE 
VOLATILE 
CLASS 
COLON 
VIRTUAL 
ASSIGNMENT 
EQUALITY 
NEQ 
OPERATOR 
TEMPLATE_OPEN 
TEMPLATE_CLOSE 
BRACKETS 
TILDE 
CONST 

Function Documentation

void aoerror ( const char *  text  ) 
char* argnames2str ( vector< s_arg > *  args,
string  prefix = "" 
)

References cat(), and i.

Referenced by yyparse().

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

References cat(), i, and pascal.

Referenced by yyparse().

char* cat ( const char *  a,
const char *  b 
)
char* copyargs ( vector< s_arg > *  args  ) 

References cat(), i, pascal, and sprintf().

Referenced by yyparse().

int yyparse (  ) 

Variable Documentation

char* current_ao

Referenced by yyparse().

map<string,string> field2init

Referenced by yyparse().

Referenced by cpp(), dopascal(), main(), and yyparse().

Referenced by cpp(), dopascal(), and yyparse().

Referenced by cpp(), dopascal(), main(), and yyparse().

Referenced by cpp(), dopascal(), and yyparse().

Referenced by cpp(), dopascal(), and yyparse().

Referenced by cpp(), dopascal(), and yyparse().

bool pascal

Referenced by cpp(), dopascal(), and yyparse().

int yychar
YYSTYPE yylval
int yynerrs
int yytype
YYSTYPE* yyvaluep
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by  doxygen 1.6.2