Commits

ecere  committed 4317c7e

eC test files

  • Participants
  • Parent commits f60eca6

Comments (0)

Files changed (2)

File tests/examplefiles/test.ec

+namespace gui;
+
+import "Window"
+
+public struct AnchorValue
+{
+   AnchorValueType type;
+
+   union
+   {
+      int distance;
+      float percent;      
+   };
+   property int
+   {
+      set { distance = value; type = offset; }
+      get { return distance; }
+   }
+   property double
+   {
+      set { percent = (float) value; type = relative; }
+      get { return (double) percent; }
+   }
+
+   char * OnGetString(char * stringOutput, void * fieldData, bool * needClass)
+   {
+      if(type == offset)
+      {
+         sprintf(stringOutput, "%d", distance);
+      }
+      else if(type == relative)
+      {
+         int c;
+         int last = 0;
+         sprintf(stringOutput, "%f", percent);
+         c = strlen(stringOutput)-1;
+         for( ; c >= 0; c--)
+         {
+            if(stringOutput[c] != '0') 
+               last = Max(last, c);
+            if(stringOutput[c] == '.')
+            {
+               if(last == c)
+               {
+                  stringOutput[c+1] = '0';
+                  stringOutput[c+2] = 0;
+               }
+               else
+                  stringOutput[last+1] = 0;
+               break;
+            }
+         }
+      }
+      if(needClass) *needClass = false;
+      return stringOutput;
+   }
+
+   bool OnGetDataFromString(char * stringOutput)
+   {
+      char * end;
+      if(strchr(stringOutput, '.'))
+      {
+         float percent = (float)strtod(stringOutput, &end);
+         
+         if(end != stringOutput)
+         {
+            this.percent = percent;
+            type = relative;
+            return true;
+         }
+      }
+      else if(stringOutput[0])
+      {
+         int distance = strtol(stringOutput, &end, 0);
+         if(end != stringOutput)
+         {
+            this.distance = distance;
+            type = offset;
+            return true;
+         }
+      }
+      else
+      {
+         distance = 0;
+         type = 0;
+      }
+      return false;
+   }
+};
+
+public struct MiddleAnchorValue
+{
+   AnchorValueType type;
+
+   union
+   {
+      int distance;
+      float percent;      
+   };
+   property int
+   {
+      set { distance = value; type = none; }
+      get { return distance; }
+   }
+   property double
+   {
+      set { percent = (float) value; type = middleRelative; }
+      get { return (double) percent; }
+   }
+
+   char * OnGetString(char * stringOutput, void * fieldData, bool * needClass)
+   {
+      if(type == middleRelative)
+      {
+         int c;
+         int last = 0;
+         sprintf(stringOutput, "%f", percent);
+         c = strlen(stringOutput)-1;
+         for( ; c >= 0; c--)
+         {
+            if(stringOutput[c] != '0') 
+               last = Max(last, c);
+            if(stringOutput[c] == '.')
+            {
+               if(last == c)
+               {
+                  stringOutput[c+1] = '0';
+                  stringOutput[c+2] = 0;
+               }
+               else
+                  stringOutput[last+1] = 0;
+               break;
+            }
+         }
+      }
+      else if(type == none && distance)
+      {
+         sprintf(stringOutput, "%d", distance);
+      }
+      if(needClass) *needClass = false;
+      return stringOutput;
+   }
+
+   bool OnGetDataFromString(char * stringOutput)
+   {
+      if(strchr(stringOutput, '.'))
+      {
+         percent = (float)strtod(stringOutput, null);
+         type = middleRelative;
+      }
+      else
+      {
+         distance = strtol(stringOutput, null, 0);
+         type = none;
+      }
+      return true;
+   }
+};
+
+public enum AnchorValueType { none, offset, relative, middleRelative, cascade, vTiled, hTiled };
+
+public struct Anchor
+{
+   union { AnchorValue left; MiddleAnchorValue horz; };
+   union { AnchorValue top; MiddleAnchorValue vert; };
+   AnchorValue right, bottom;      
+
+   char * OnGetString(char * stringOutput, void * fieldData, bool * needClass)
+   {
+      char tempString[256];
+      char * anchorValue;
+      bool subNeedClass;
+
+      tempString[0] = '\0';
+      anchorValue = left.OnGetString(tempString, null, &subNeedClass);
+      if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "left = "); strcat(stringOutput, anchorValue); }
+      
+      //if(((!left.type && !right.type) && horz.distance) || horz.type == middleRelative)
+      if(!right.type && ((!left.type && horz.distance) || horz.type == middleRelative))
+      {
+         tempString[0] = '\0';
+         anchorValue = horz.OnGetString(tempString, null, &subNeedClass);
+         if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "horz = "); strcat(stringOutput, anchorValue); }
+      }
+      
+      tempString[0] = '\0';
+      anchorValue = top.OnGetString(tempString, null, &subNeedClass);
+      if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "top = "); strcat(stringOutput, anchorValue); }
+      
+      tempString[0] = '\0';
+      anchorValue = right.OnGetString(tempString, null, &subNeedClass);
+      if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "right = "); strcat(stringOutput, anchorValue); }
+
+      // if(((!top.type && !bottom.type) && vert.distance) || vert.type == middleRelative)
+      if(!bottom.type && ((!top.type && vert.distance) || vert.type == middleRelative))
+      {
+         tempString[0] = '\0';
+         anchorValue = vert.OnGetString(tempString, null, &subNeedClass);
+         if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "vert = "); strcat(stringOutput, anchorValue); }
+      }
+      
+      tempString[0] = '\0';
+      anchorValue = bottom.OnGetString(tempString, null, &subNeedClass);
+      if(anchorValue[0]) { if(stringOutput[0]) strcat(stringOutput, ", "); strcat(stringOutput, "bottom = "); strcat(stringOutput, anchorValue); }
+      
+      return stringOutput;
+   }
+
+   bool OnGetDataFromString(char * string)
+   {
+      this = Anchor {};
+      return class::OnGetDataFromString(string);
+   }
+
+   bool OnSaveEdit(DropBox dropBox, void * object)
+   {
+      return dropBox.Save();
+   }
+
+   Window OnEdit(Window listBox, Window master, int x, int y, int w, int h, Window control)
+   {
+      char * string = "";
+      AnchorDropBox comboBox
+      {
+         editText = true;
+         parent = listBox;
+         master = master;
+         position = Point { x, y };
+         //clientSize = Size { h = h };
+         //size.w = w;
+         size = { w, h };
+         anchorValue = this;
+         control = control;
+         borderStyle = 0;
+      };
+      
+      comboBox.Create();
+
+      {
+         char tempString[MAX_F_STRING] = "";
+         bool needClass = false;
+         char * result = OnGetString(tempString, null, &needClass);
+         if(result) string = result;
+      }
+      comboBox.contents = string;
+      return comboBox;
+   }
+};
+
+private class AnchorButton : Button
+{
+   toggle = true, bevel = false;
+
+   void OnRedraw(Surface surface)
+   {
+      int cw = clientSize.w;
+      int ch = clientSize.h;
+
+      surface.SetForeground(black);
+      if(checked)
+      {
+         surface.SetBackground(Color { 85,85,85 });
+         surface.Area(0,0, cw-1, ch-1);
+      }
+      else
+         surface.LineStipple(0xAAAA);
+
+      surface.Rectangle(0,0,cw-1,ch-1);
+
+      if(active)
+      {
+         surface.LineStipple(0xAAAA);
+         surface.Rectangle(2,2,cw-3,ch-3);
+      }
+   }
+
+   bool AnchorEditor::NotifyClicked(Button button, int x, int y, Modifiers mods)
+   {
+      AnchorDropBox anchorDropBox = (AnchorDropBox)master;
+      Anchor anchor = anchorDropBox.anchorValue;
+      Window control = anchorDropBox.control;
+      DataBox dropMaster = (DataBox)anchorDropBox.master;
+      int id = button.id;
+
+      switch(id)
+      {
+         case 0: anchor.left.type   = button.checked ? offset : none; break;
+         case 1: anchor.top.type    = button.checked ? offset : none; break;
+         case 2: anchor.right.type  = button.checked ? offset : none; break;
+         case 3: anchor.bottom.type = button.checked ? offset : none; break;
+      }
+
+      if(anchor.horz.type == middleRelative && (id == 0 || id == 2))
+      {
+         anchorDropBox.relButtons[0].checked = false;
+         anchorDropBox.relButtons[2].checked = false;
+      }
+      if(anchor.vert.type == middleRelative && (id == 1 || id == 3))
+      {
+         anchorDropBox.relButtons[1].checked = false;
+         anchorDropBox.relButtons[3].checked = false;
+      }
+      anchorDropBox.relButtons[id].checked = false;
+
+      //anchor.horz.type = none;
+      //anchor.vert.type = none;
+
+      {
+         int vpw, vph;
+         int x,y,w,h;
+         Window parent = control.parent;
+
+         // Fix Anchor
+         x = control.position.x;
+         y = control.position.y;
+         w = control.size.w;
+         h = control.size.h;
+
+         vpw = parent.clientSize.w;
+         vph = parent.clientSize.h;
+         if(control.nonClient)
+         {
+            vpw = parent.size.w;
+            vph = parent.size.h;
+         }
+         else if(((BorderBits)control.borderStyle).fixed)
+         {
+            if(!control.dontScrollHorz && parent.scrollArea.w) vpw = parent.scrollArea.w;
+            if(!control.dontScrollVert && parent.scrollArea.h) vph = parent.scrollArea.h;
+         }
+
+         if(anchor.left.type == offset) anchor.left.distance = x;
+         else if(anchor.left.type == relative) anchor.left.percent = (float)x / vpw;
+         if(anchor.top.type == offset) anchor.top.distance = y;
+         else if(anchor.top.type == relative) anchor.top.percent = (float)y / vph;
+         if(anchor.right.type == offset) anchor.right.distance = vpw - (x + w);
+         //else if(anchor.right.type == relative) anchor.right.percent = (float) (x + w) / vpw;
+         else if(anchor.right.type == relative) anchor.right.percent = (float) (vpw - (x + w)) / vpw;
+         if(anchor.bottom.type == offset) anchor.bottom.distance = vph - (y + h);
+         //else if(anchor.bottom.type == relative) anchor.bottom.percent = (float) (y + h) / vph;
+         else if(anchor.bottom.type == relative) anchor.bottom.percent = (float) (vph - (y + h)) / vph;
+
+         if(!anchor.left.type && !anchor.right.type)
+         {
+            anchor.horz.distance = (x + w / 2) - (vpw / 2);
+            //anchor.horz.type = anchor.horz.distance ? offset : 0;
+         }
+         else if(anchor.horz.type == middleRelative) anchor.horz.percent = (float) ((x + w / 2) - (vpw / 2)) / vpw;
+         if(!anchor.top.type && !anchor.bottom.type)
+         {
+            anchor.vert.distance = (y + h / 2) - (vph / 2);
+            //anchor.vert.type = anchor.vert.distance ? offset : 0;
+         }
+         else if(anchor.vert.type == middleRelative) anchor.vert.percent = (float)((y + h / 2) - (vph / 2)) / vph;
+      }
+
+      {
+         char tempString[1024] = "";
+         bool needClass = false;
+         char * string = anchor.OnGetString(tempString, null, &needClass);
+         anchorDropBox.contents = string;
+      }
+
+      dropMaster.SetData(&anchor, false);
+      anchorDropBox.anchorValue = anchor;
+      return true;
+   }
+}
+
+private class AnchorRelButton : Button
+{
+   toggle = true;
+   bevel = false;
+   text = "%";
+   //bevelOver = true;
+
+   void OnRedraw(Surface surface)
+   {
+      int cw = clientSize.w;
+      int ch = clientSize.h;
+      
+      if(checked)
+      {
+         surface.SetForeground(black);
+      }
+      else
+      {
+         surface.SetForeground(Color{170,170,170});
+      }
+      surface.WriteText(5,2, "%", 1);
+
+      if(active)
+      {
+         surface.LineStipple(0xAAAA);
+         surface.Rectangle(3,3,cw-4,ch-4);
+      }
+   }
+
+   bool AnchorEditor::NotifyClicked(Button button, int x, int y, Modifiers mods)
+   {
+      AnchorDropBox anchorDropBox = (AnchorDropBox)master;
+      Anchor anchor = anchorDropBox.anchorValue;
+      Window control = anchorDropBox.control;
+      DataBox dropMaster = (DataBox)anchorDropBox.master;
+      int id = button.id;
+
+      if((id == 0 || id == 2) && ((!anchor.left.type && !anchor.right.type) || anchor.left.type == middleRelative))
+      {
+         if(button.checked) anchor.horz.type = middleRelative; else anchor.horz.type = none;
+         anchorDropBox.relButtons[(id + 2)%4].checked = button.checked;
+      }
+      else if((id == 1 || id == 3) && ((!anchor.top.type && !anchor.bottom.type) || anchor.top.type == middleRelative))
+      {
+         if(button.checked) anchor.vert.type = middleRelative; else anchor.vert.type = none;
+         anchorDropBox.relButtons[(id + 2)%4].checked = button.checked;
+      }
+      else
+      {
+         switch(id)
+         {
+            case 0: anchor.left.type   = button.checked ? relative : (anchor.left.type   ? offset : none); break;
+            case 1: anchor.top.type    = button.checked ? relative : (anchor.top.type    ? offset : none); break;
+            case 2: anchor.right.type  = button.checked ? relative : (anchor.right.type  ? offset : none); break;
+            case 3: anchor.bottom.type = button.checked ? relative : (anchor.bottom.type ? offset : none); break;
+         }
+         anchorDropBox.buttons[id].checked = true;
+         if(anchor.horz.type == middleRelative) anchor.horz.type = none;
+         if(anchor.vert.type == middleRelative) anchor.vert.type = none;
+      }
+
+      {
+         int vpw, vph;
+         int x,y,w,h;
+         Window parent = control.parent;
+
+         // Fix Anchor
+         x = control.position.x;
+         y = control.position.y;
+         w = control.size.w;
+         h = control.size.h;
+
+         vpw = parent.clientSize.w;
+         vph = parent.clientSize.h;
+         if(control.nonClient)
+         {
+            vpw = parent.size.w;
+            vph = parent.size.h;
+         }
+         else if(((BorderBits)control.borderStyle).fixed)
+         {
+            if(!control.dontScrollHorz && parent.scrollArea.w)  vpw = parent.scrollArea.w;
+            if(!control.dontScrollVert && parent.scrollArea.h) vph = parent.scrollArea.h;
+         }
+
+         if(anchor.left.type == offset) anchor.left.distance = x;
+         else if(anchor.left.type == relative) anchor.left.percent = (float)x / vpw;
+         if(anchor.top.type == offset) anchor.top.distance = y;
+         else if(anchor.top.type == relative) anchor.top.percent = (float)y / vph;
+         if(anchor.right.type == offset) anchor.right.distance = vpw - (x + w);
+         //else if(anchor.right.type == relative) anchor.right.percent = (float) (x + w) / vpw;
+         else if(anchor.right.type == relative) anchor.right.percent = (float) (vpw - (x + w)) / vpw;
+         if(anchor.bottom.type == offset) anchor.bottom.distance = vph - (y + h);
+         //else if(anchor.bottom.type == relative) anchor.bottom.percent = (float) (y + h) / vph;
+         else if(anchor.bottom.type == relative) anchor.bottom.percent = (float) (vph - (y + h)) / vph;
+
+         if(!anchor.left.type && !anchor.right.type)
+         {
+            anchor.horz.distance = (x + w / 2) - (vpw / 2);
+            //anchor.horz.type = anchor.horz.distance ? offset : none;
+         }
+         else if(anchor.horz.type == middleRelative) anchor.horz.percent = (float) ((x + w / 2) - (vpw / 2)) / vpw;
+         if(!anchor.top.type && !anchor.bottom.type) 
+         {
+            anchor.vert.distance = (y + h / 2) - (vph / 2);
+            //anchor.vert.type = anchor.vert.distance ? offset : none;
+         }
+         else if(anchor.vert.type == middleRelative) anchor.vert.percent = (float)((y + h / 2) - (vph / 2)) / vph;
+      }
+
+      {
+         char tempString[1024] = "";
+         bool needClass = false;
+         char * string = anchor.OnGetString(tempString, null, &needClass);
+         anchorDropBox.contents = string;
+      }
+
+      dropMaster.SetData(&anchor, false);
+      anchorDropBox.anchorValue = anchor;
+      return true;
+   }
+}
+
+private class AnchorEditor : Window
+{
+   interim = true;
+   borderStyle = deepContour;
+   size.h = 92;
+
+   bool OnKeyDown(Key key, unichar ch)
+   {
+      if(key == escape)
+         return master.OnKeyDown(key, ch);
+      return true;
+   }
+}
+
+private class AnchorDropBox : DropBox
+{
+   Anchor anchorValue;
+   Window control;
+   Button relButtons[4], buttons[4];
+
+   AnchorEditor anchorEditor
+   {
+      master = this;
+      autoCreate = false;
+   };
+
+   Window OnDropDown()
+   {
+      int c;
+      Button
+      {
+         anchorEditor,
+         anchor = Anchor { left = 28, top = 28, right = 28, bottom = 28 },
+         inactive = true, disabled = true
+      };
+      for(c = 0; c<4; c++)
+      {
+         Button button = buttons[c] = AnchorButton 
+         { 
+            anchorEditor, id = c,
+            size = Size { (c%2)?10:28, (c%2)?28:10 }
+         };
+         Button relButton = relButtons[c] = AnchorRelButton
+         {
+            anchorEditor, id = c;
+         };
+
+         switch(c)
+         {
+            case 0:
+               if(anchorValue.left.type && anchorValue.left.type != middleRelative) button.checked = true;
+               if(anchorValue.left.type == relative || anchorValue.horz.type == middleRelative) relButton.checked = true;
+               
+               button.anchor = Anchor { left = 0 };
+               relButton.anchor = Anchor { left = 5, vert = 16 };
+               break;
+            case 1:
+               if(anchorValue.top.type && anchorValue.top.type != middleRelative) button.checked = true;
+               if(anchorValue.top.type == relative || anchorValue.vert.type == middleRelative) relButton.checked = true;
+
+               button.anchor = Anchor { top = 0 };
+               relButton.anchor = Anchor { top = 5, horz = 16 };
+               break;
+            case 2: 
+               if(anchorValue.right.type && anchorValue.right.type != middleRelative) button.checked = true;
+               if(anchorValue.right.type == relative || anchorValue.horz.type == middleRelative) relButton.checked = true;
+               
+               button.anchor = Anchor { right = 0 };
+               relButton.anchor = Anchor { right = 5, vert = 16 };
+               break;
+            case 3: 
+               if(anchorValue.bottom.type && anchorValue.bottom.type != middleRelative) button.checked = true;
+               if(anchorValue.bottom.type == relative || anchorValue.vert.type == middleRelative) relButton.checked = true;
+
+               button.anchor = Anchor { bottom = 0 };
+               relButton.anchor = Anchor { bottom = 5, horz = 16 };
+               break;
+         }
+      }
+      anchorEditor.Create();
+      return anchorEditor;
+   }
+      
+   void OnCloseDropDown(Window anchorEditor)
+   {
+      // TOFIX: Patch for update bug
+      master.Update(null);
+      anchorEditor.Destroy(0);
+   }
+
+   bool DataBox::NotifyTextEntry(AnchorDropBox dropBox, char * string, bool save)
+   {
+      Anchor anchor = dropBox.anchorValue;
+      Window control = dropBox.control;
+
+      if(save)
+      {
+         if(anchor.OnGetDataFromString(string))
+         {
+            SetData(&anchor, false);
+            dropBox.anchorValue = anchor;
+         }
+      }
+      else
+      {
+         char tempString[1024] = "";
+         bool needClass = false;
+         char * string = anchor.OnGetString(tempString, null, &needClass);
+         dropBox.contents = string;
+      }
+      return true;
+   }
+}

File tests/examplefiles/test.eh

+/* A Bison parser, made by GNU Bison 2.0.  */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     IDENTIFIER = 258,
+     CONSTANT = 259,
+     STRING_LITERAL = 260,
+     SIZEOF = 261,
+     PTR_OP = 262,
+     INC_OP = 263,
+     DEC_OP = 264,
+     LEFT_OP = 265,
+     RIGHT_OP = 266,
+     LE_OP = 267,
+     GE_OP = 268,
+     EQ_OP = 269,
+     NE_OP = 270,
+     AND_OP = 271,
+     OR_OP = 272,
+     MUL_ASSIGN = 273,
+     DIV_ASSIGN = 274,
+     MOD_ASSIGN = 275,
+     ADD_ASSIGN = 276,
+     SUB_ASSIGN = 277,
+     LEFT_ASSIGN = 278,
+     RIGHT_ASSIGN = 279,
+     AND_ASSIGN = 280,
+     XOR_ASSIGN = 281,
+     OR_ASSIGN = 282,
+     TYPE_NAME = 283,
+     TYPEDEF = 284,
+     EXTERN = 285,
+     STATIC = 286,
+     AUTO = 287,
+     REGISTER = 288,
+     CHAR = 289,
+     SHORT = 290,
+     INT = 291,
+     UINT = 292,
+     INT64 = 293,
+     LONG = 294,
+     SIGNED = 295,
+     UNSIGNED = 296,
+     FLOAT = 297,
+     DOUBLE = 298,
+     CONST = 299,
+     VOLATILE = 300,
+     VOID = 301,
+     VALIST = 302,
+     STRUCT = 303,
+     UNION = 304,
+     ENUM = 305,
+     ELLIPSIS = 306,
+     CASE = 307,
+     DEFAULT = 308,
+     IF = 309,
+     SWITCH = 310,
+     WHILE = 311,
+     DO = 312,
+     FOR = 313,
+     GOTO = 314,
+     CONTINUE = 315,
+     BREAK = 316,
+     RETURN = 317,
+     IFX = 318,
+     ELSE = 319,
+     CLASS = 320,
+     THISCLASS = 321,
+     CLASS_NAME = 322,
+     PROPERTY = 323,
+     SETPROP = 324,
+     GETPROP = 325,
+     NEWOP = 326,
+     RENEW = 327,
+     DELETE = 328,
+     EXT_DECL = 329,
+     EXT_STORAGE = 330,
+     IMPORT = 331,
+     DEFINE = 332,
+     VIRTUAL = 333,
+     EXT_ATTRIB = 334,
+     PUBLIC = 335,
+     PRIVATE = 336,
+     TYPED_OBJECT = 337,
+     ANY_OBJECT = 338,
+     _INCREF = 339,
+     EXTENSION = 340,
+     ASM = 341,
+     TYPEOF = 342,
+     WATCH = 343,
+     STOPWATCHING = 344,
+     FIREWATCHERS = 345,
+     WATCHABLE = 346,
+     CLASS_DESIGNER = 347,
+     CLASS_NO_EXPANSION = 348,
+     CLASS_FIXED = 349,
+     ISPROPSET = 350,
+     CLASS_DEFAULT_PROPERTY = 351,
+     PROPERTY_CATEGORY = 352,
+     CLASS_DATA = 353,
+     CLASS_PROPERTY = 354,
+     SUBCLASS = 355,
+     NAMESPACE = 356,
+     NEW0OP = 357,
+     RENEW0 = 358,
+     VAARG = 359,
+     DBTABLE = 360,
+     DBFIELD = 361,
+     DBINDEX = 362,
+     DATABASE_OPEN = 363
+   };
+#endif
+#define IDENTIFIER 258
+#define CONSTANT 259
+#define STRING_LITERAL 260
+#define SIZEOF 261
+#define PTR_OP 262
+#define INC_OP 263
+#define DEC_OP 264
+#define LEFT_OP 265
+#define RIGHT_OP 266
+#define LE_OP 267
+#define GE_OP 268
+#define EQ_OP 269
+#define NE_OP 270
+#define AND_OP 271
+#define OR_OP 272
+#define MUL_ASSIGN 273
+#define DIV_ASSIGN 274
+#define MOD_ASSIGN 275
+#define ADD_ASSIGN 276
+#define SUB_ASSIGN 277
+#define LEFT_ASSIGN 278
+#define RIGHT_ASSIGN 279
+#define AND_ASSIGN 280
+#define XOR_ASSIGN 281
+#define OR_ASSIGN 282
+#define TYPE_NAME 283
+#define TYPEDEF 284
+#define EXTERN 285
+#define STATIC 286
+#define AUTO 287
+#define REGISTER 288
+#define CHAR 289
+#define SHORT 290
+#define INT 291
+#define UINT 292
+#define INT64 293
+#define LONG 294
+#define SIGNED 295
+#define UNSIGNED 296
+#define FLOAT 297
+#define DOUBLE 298
+#define CONST 299
+#define VOLATILE 300
+#define VOID 301
+#define VALIST 302
+#define STRUCT 303
+#define UNION 304
+#define ENUM 305
+#define ELLIPSIS 306
+#define CASE 307
+#define DEFAULT 308
+#define IF 309
+#define SWITCH 310
+#define WHILE 311
+#define DO 312
+#define FOR 313
+#define GOTO 314
+#define CONTINUE 315
+#define BREAK 316
+#define RETURN 317
+#define IFX 318
+#define ELSE 319
+#define CLASS 320
+#define THISCLASS 321
+#define CLASS_NAME 322
+#define PROPERTY 323
+#define SETPROP 324
+#define GETPROP 325
+#define NEWOP 326
+#define RENEW 327
+#define DELETE 328
+#define EXT_DECL 329
+#define EXT_STORAGE 330
+#define IMPORT 331
+#define DEFINE 332
+#define VIRTUAL 333
+#define EXT_ATTRIB 334
+#define PUBLIC 335
+#define PRIVATE 336
+#define TYPED_OBJECT 337
+#define ANY_OBJECT 338
+#define _INCREF 339
+#define EXTENSION 340
+#define ASM 341
+#define TYPEOF 342
+#define WATCH 343
+#define STOPWATCHING 344
+#define FIREWATCHERS 345
+#define WATCHABLE 346
+#define CLASS_DESIGNER 347
+#define CLASS_NO_EXPANSION 348
+#define CLASS_FIXED 349
+#define ISPROPSET 350
+#define CLASS_DEFAULT_PROPERTY 351
+#define PROPERTY_CATEGORY 352
+#define CLASS_DATA 353
+#define CLASS_PROPERTY 354
+#define SUBCLASS 355
+#define NAMESPACE 356
+#define NEW0OP 357
+#define RENEW0 358
+#define VAARG 359
+#define DBTABLE 360
+#define DBFIELD 361
+#define DBINDEX 362
+#define DATABASE_OPEN 363
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 42 "grammar.y"
+typedef union YYSTYPE {
+   SpecifierType specifierType;
+   int i;
+   AccessMode declMode;
+   Identifier id;
+   Expression exp;
+   Specifier specifier;
+   OldList * list;
+   Enumerator enumerator;
+   Declarator declarator;
+   Pointer pointer;
+   Initializer initializer;
+   InitDeclarator initDeclarator;
+   TypeName typeName;
+   Declaration declaration;
+   Statement stmt;
+   FunctionDefinition function;
+   External external;
+   Context context;
+   AsmField asmField;
+
+   Instantiation instance;
+   MembersInit membersInit;
+   MemberInit memberInit;
+   ClassFunction classFunction;
+   ClassDefinition _class;
+   ClassDef classDef;
+   PropertyDef prop;
+   char * string;
+   Symbol symbol;
+   PropertyWatch propertyWatch;
+   TemplateParameter templateParameter;
+   TemplateArgument templateArgument;
+   TemplateDatatype templateDatatype;
+   
+   DBTableEntry dbtableEntry;
+   DBIndexItem dbindexItem;
+   DBTableDef dbtableDef;
+} YYSTYPE;
+/* Line 1318 of yacc.c.  */
+#line 293 "grammar.eh"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+extern YYSTYPE yylval;
+
+#if ! defined (YYLTYPE) && ! defined (YYLTYPE_IS_DECLARED)
+typedef struct YYLTYPE
+{
+  int first_line;
+  int first_column;
+  int last_line;
+  int last_column;
+} YYLTYPE;
+# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif
+
+extern YYLTYPE yylloc;
+
+