diff src/sdl/exprNode.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/sdl/exprNode.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,68 @@
     1.4 +// -*- C++ -*-
     1.5 +// VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
     1.6 +// Copyright (C) 1999-2003 Forgotten
     1.7 +// Copyright (C) 2004 Forgotten and the VBA development team
     1.8 +
     1.9 +// This program is free software; you can redistribute it and/or modify
    1.10 +// it under the terms of the GNU General Public License as published by
    1.11 +// the Free Software Foundation; either version 2, or(at your option)
    1.12 +// any later version.
    1.13 +//
    1.14 +// This program is distributed in the hope that it will be useful,
    1.15 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.16 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.17 +// GNU General Public License for more details.
    1.18 +//
    1.19 +// You should have received a copy of the GNU General Public License
    1.20 +// along with this program; if not, write to the Free Software Foundation,
    1.21 +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    1.22 +
    1.23 +struct Node {
    1.24 +  Type *type;
    1.25 +  u32 location;
    1.26 +  u32 objLocation;
    1.27 +  LocationType locType;
    1.28 +  int value;
    1.29 +  int index;
    1.30 +  char *name;
    1.31 +  Node *expression;
    1.32 +  Member *member;
    1.33 +  void (*print)(Node *);
    1.34 +  bool (*resolve)(Node *, Function *f, CompileUnit *u);
    1.35 +};
    1.36 +
    1.37 +extern void exprNodeCleanUp();
    1.38 +
    1.39 +extern Node *exprNodeIdentifier();
    1.40 +extern void exprNodeIdentifierPrint(Node *);
    1.41 +extern bool exprNodeIdentifierResolve(Node *, Function *, CompileUnit *);
    1.42 +
    1.43 +extern Node *exprNodeNumber();
    1.44 +extern void exprNodeNumberPrint(Node *);
    1.45 +extern bool exprNodeNumberResolve(Node *, Function *, CompileUnit *);
    1.46 +
    1.47 +extern Node *exprNodeStar(Node *);
    1.48 +extern void exprNodeStarPrint(Node *);
    1.49 +extern bool exprNodeStarResolve(Node *, Function *, CompileUnit *);
    1.50 +
    1.51 +extern Node *exprNodeDot(Node *, Node *);
    1.52 +extern void exprNodeDotPrint(Node *);
    1.53 +extern bool exprNodeDotResolve(Node *, Function *, CompileUnit *);
    1.54 +
    1.55 +extern Node *exprNodeArrow(Node *, Node *);
    1.56 +extern void exprNodeArrowPrint(Node *);
    1.57 +extern bool exprNodeArrowResolve(Node *, Function *, CompileUnit *);
    1.58 +
    1.59 +extern Node *exprNodeAddr(Node *);
    1.60 +extern void exprNodeAddrPrint(Node *);
    1.61 +extern bool exprNodeAddrResolve(Node *, Function *, CompileUnit *);
    1.62 +
    1.63 +extern Node *exprNodeSizeof(Node *);
    1.64 +extern void exprNodeSizeofPrint(Node *);
    1.65 +extern bool exprNodeSizeofResolve(Node *, Function *, CompileUnit *);
    1.66 +
    1.67 +extern Node *exprNodeArray(Node *, Node *);
    1.68 +extern void exprNodeArrayPrint(Node *);
    1.69 +extern bool exprNodeArrayResolve(Node *, Function *, CompileUnit *);
    1.70 +
    1.71 +#define YYSTYPE struct Node *