adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_circle.cc,1.2,1


From: Kai Sterker <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_circle.cc,1.2,1.3 dlg_circle_entry.cc,1.3,1.4 dlg_circle_entry.h,1.2,1.3 dlg_compiler.cc,1.6,1.7 dlg_compiler.h,1.3,1.4 dlg_module.cc,1.3,1.4 dlg_module.h,1.2,1.3 dlg_types.h,1.2,1.3 gui_circle.cc,1.2,1.3 gui_circle.h,1.2,1.3 gui_dlgedit.cc,1.3,1.4 gui_dlgedit.h,1.3,1.4 gui_graph.cc,1.2,1.3 gui_graph.h,1.2,1.3 lex.loadlg.cc,1.14,1.15 loadlg.l,1.11,1.12
Date: Tue, 25 Jun 2002 12:25:55 -0400

Update of /cvsroot/adonthell/adonthell/src/tools/dlgedit
In directory subversions:/tmp/cvs-serv4064

Modified Files:
        dlg_circle.cc dlg_circle_entry.cc dlg_circle_entry.h 
        dlg_compiler.cc dlg_compiler.h dlg_module.cc dlg_module.h 
        dlg_types.h gui_circle.cc gui_circle.h gui_dlgedit.cc 
        gui_dlgedit.h gui_graph.cc gui_graph.h lex.loadlg.cc loadlg.l 
Log Message:
RE-ENABLED 'loop' feature
CENTER dialogue in view after loading


Index: dlg_circle.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_circle.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dlg_circle.cc       7 Apr 2002 09:51:28 -0000       1.2
--- dlg_circle.cc       25 Jun 2002 16:25:52 -0000      1.3
***************
*** 128,134 ****
      
      // Indicate wether node contains additional code
!     if (hasCode ())
      {
!         GString *code = g_string_new ("!");
          
          // get the font to use
--- 128,137 ----
      
      // Indicate wether node contains additional code
!     if (hasCode () || entry_->loop ())
      {
!         GString *code = g_string_sized_new (2);
!         
!         if (hasCode ()) g_string_append_c (code, '!');
!         if (entry_->loop ()) g_string_append_c (code, 'o');
          
          // get the font to use
***************
*** 168,175 ****
              {
                  if (parse_dlgfile (str, n) == LOAD_NUM) type_ = (node_type) n;
- 
                  break;
              }
! 
              // Coordinates of Circle
              case LOAD_POS:
--- 171,184 ----
              {
                  if (parse_dlgfile (str, n) == LOAD_NUM) type_ = (node_type) n;
                  break;
              }
!             
!             // Loop
!             case LOAD_LOOP:
!             {
!                 if (parse_dlgfile (str, n) == LOAD_NUM) entry_->setLoop (n);
!                 break;
!             }
!             
              // Coordinates of Circle
              case LOAD_POS:
***************
*** 259,262 ****
--- 268,275 ----
      if (entry_->code () != "")
          file << "  Vars §" << entry_->code () << "§\n";
+     
+     // loop
+     if (entry_->loop () != false)
+         file << "  Loop 1\n";
      
      file << "End\n";

Index: dlg_circle_entry.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_circle_entry.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** dlg_circle_entry.cc 9 Apr 2002 13:15:37 -0000       1.3
--- dlg_circle_entry.cc 25 Jun 2002 16:25:52 -0000      1.4
***************
*** 32,35 ****
--- 32,36 ----
  DlgCircleEntry::DlgCircleEntry ()
  {
+     loop_ = false;
      text_ = "";
      annotation_ = "";

Index: dlg_circle_entry.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_circle_entry.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dlg_circle_entry.h  7 Apr 2002 09:51:28 -0000       1.2
--- dlg_circle_entry.h  25 Jun 2002 16:25:52 -0000      1.3
***************
*** 64,67 ****
--- 64,72 ----
       */
      std::string condition ()        { return condition_; }
+     /**
+      * Get whether the circle may loop.
+      * @return <b>true</b> if that's the case, <b>false</b> otherwise.
+      */
+     bool loop ()                    { return loop_; }
      
      void setText (std::string t);
***************
*** 70,73 ****
--- 75,79 ----
      void setCondition (std::string c);
      void setCode (std::string c)         { code_ = c; }
+     void setLoop (bool l)                { loop_ = l; }
      //@}
          
***************
*** 75,78 ****
--- 81,85 ----
                  
  private:
+     bool loop_;                  // whether the text may loop
      std::string text_;           // the node's actual text
      std::string annotation_;     // comments of the author

Index: dlg_compiler.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_compiler.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** dlg_compiler.cc     28 Apr 2002 15:31:55 -0000      1.6
--- dlg_compiler.cc     25 Jun 2002 16:25:52 -0000      1.7
***************
*** 97,101 ****
      // write the dialogue text
      writeText ();
!     
      // write the conditions
      writeConditions ();
--- 97,104 ----
      // write the dialogue text
      writeText ();
! 
!     // write loop table
!     writeLoop ();
!         
      // write the conditions
      writeConditions ();
***************
*** 163,173 ****
          (*i)->setIndex (++j);
  
!         // build up condition vector
          if (entry->condition () != "")
              addCondition ((DlgCircle *) *i, j);
      
!         // build up code vector
          if (entry->code () != "")
              addCode (entry->code (), j);
          
          // write text of the node
--- 166,180 ----
          (*i)->setIndex (++j);
  
!         // build condition vector
          if (entry->condition () != "")
              addCondition ((DlgCircle *) *i, j);
      
!         // build code vector
          if (entry->code () != "")
              addCode (entry->code (), j);
+ 
+         // build loop vector
+         if (entry->loop () != false)
+             loop.push_back (j);
          
          // write text of the node
***************
*** 176,179 ****
--- 183,201 ----
      
      // close text array
+     file << "]\n\n";
+ }
+ 
+ // write loops
+ void DlgCompiler::writeLoop ()
+ {
+     file << "\tloop = [";
+     
+     for (std::vector<int>::iterator i = loop.begin (); i != loop.end (); i++)
+     {
+         if (i != loop.begin ()) file << ", ";
+         file << (*i);
+     }
+     
+     // close array
      file << "]\n\n";
  }

Index: dlg_compiler.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_compiler.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** dlg_compiler.h      28 Apr 2002 15:31:55 -0000      1.3
--- dlg_compiler.h      25 Jun 2002 16:25:52 -0000      1.4
***************
*** 112,115 ****
--- 112,116 ----
      void writeText ();
      void writeCode ();
+     void writeLoop ();
      void writeConditions ();
      void writeStart ();
***************
*** 138,142 ****
      std::vector<std::string> code;  // Temporary storage for all code
      std::vector<std::string> conditions; // Temporary storage for all 
conditions
! 
      int errors;                     // number of errors in dialogue
      
--- 139,143 ----
      std::vector<std::string> code;  // Temporary storage for all code
      std::vector<std::string> conditions; // Temporary storage for all 
conditions
!     std::vector<int> loop;          // nodes that are allowed to looped
      int errors;                     // number of errors in dialogue
      

Index: dlg_module.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_module.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** dlg_module.cc       12 Apr 2002 15:35:41 -0000      1.3
--- dlg_module.cc       25 Jun 2002 16:25:52 -0000      1.4
***************
*** 180,187 ****
  }
  
  // load a dialogue from file
  bool DlgModule::load ()
  {
!     int i = 1, n, y_min = 0, x_min = 0, x_max = 0;
      DlgCircle *circle;
      DlgArrow *arrow;
--- 180,204 ----
  }
  
+ // Get extension of the graph for proper displaying
+ void DlgModule::extension (int &min_x, int &max_x, int &y)
+ {
+     y = 0;
+     min_x = 0;
+     max_x = 0;
+     
+     for (std::vector<DlgNode*>::iterator i=nodes.begin(); i != nodes.end(); 
i++)
+         if ((*i)->type () != LINK)
+         {
+             if ((*i)->y () < y) y = (*i)->y ();
+ 
+             if ((*i)->x () < min_x) min_x = (*i)->x ();
+             else if ((*i)->x () > max_x) max_x = (*i)->x ();
+         }
+ }
+ 
  // load a dialogue from file
  bool DlgModule::load ()
  {
!     int i = 1, n;
      DlgCircle *circle;
      DlgArrow *arrow;
***************
*** 246,261 ****
              case LOAD_NPC:
              {
-                 // racter *mynpc = NULL;
- 
                  if (parse_dlgfile (s, n) == LOAD_STR);
-                 //    mynpc = data::characters.find (s.c_str ())->second;
- 
-                 // if (mynpc == NULL)
-                 // {
-                 //     dictionary <character *>::const_iterator itc = 
data::characters.begin ();
-                 //     mynpc = itc->second;
-                 // }
- 
-                 // wnd->set_npc (mynpc);
                  break;
              }
--- 263,267 ----
***************
*** 267,276 ****
  
                  nodes.push_back (circle);
- 
-                 // Get extension of the graph for proper displaying
-                 if (circle->y () < y_min) y_min = circle->y ();
- 
-                 if (circle->x () < x_min) x_min = circle->x ();
-                 else if (circle->x () > x_max) x_max = circle->x ();
  
                  break;
--- 273,276 ----

Index: dlg_module.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_module.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dlg_module.h        7 Apr 2002 09:51:28 -0000       1.2
--- dlg_module.h        25 Jun 2002 16:25:52 -0000      1.3
***************
*** 104,107 ****
--- 104,116 ----
  
      /**
+      * Get the extension of the module for centering in view.
+      *
+      * @param min_x will contain position of leftmost node
+      * @param min_y will contain position of rightmost node
+      * @param y will contain position of topmost node
+      */
+     void extension (int &min_x, int &max_x, int &y);
+     
+     /**
       * Init the Dialogue from a file
       * @return <b>true</b> if loading was successful, <b>false</b>

Index: dlg_types.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_types.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dlg_types.h 7 Apr 2002 09:51:28 -0000       1.2
--- dlg_types.h 25 Jun 2002 16:25:52 -0000      1.3
***************
*** 122,126 ****
      LOAD_DTOR       = 23,
      LOAD_PROJECT    = 24,
!     LOAD_UNKNOWN    = 25
  };
  
--- 122,127 ----
      LOAD_DTOR       = 23,
      LOAD_PROJECT    = 24,
!     LOAD_LOOP       = 25,
!     LOAD_UNKNOWN    = 26
  };
  

Index: gui_circle.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_circle.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gui_circle.cc       7 Apr 2002 09:51:28 -0000       1.2
--- gui_circle.cc       25 Jun 2002 16:25:52 -0000      1.3
***************
*** 47,51 ****
      GtkWidget *ok_button;
      GtkWidget *cancel_button;
! 
      // color to use for Player and Narrator text and labels    
      GdkColor dark_blue  = { 0, 0, 0, 35000 };
--- 47,52 ----
      GtkWidget *ok_button;
      GtkWidget *cancel_button;
!     GtkWidget *ebox;
!     
      // color to use for Player and Narrator text and labels    
      GdkColor dark_blue  = { 0, 0, 0, 35000 };
***************
*** 278,281 ****
--- 279,297 ----
          &annotation_entry->style->black, &annotation_entry->style->white,
          e->annotation ().c_str (), -1);
+     
+     // the loop checkbox
+     ebox = gtk_event_box_new ();
+     gtk_widget_ref (ebox);
+     gtk_widget_show (ebox);
+     gtk_object_set_data_full (GTK_OBJECT (window), "ebox", ebox, 
(GtkDestroyNotify) gtk_widget_unref);
+     gtk_box_pack_end (GTK_BOX (vbox2), ebox, FALSE, FALSE, 0);
+     gtk_tooltips_set_tip (tooltips, ebox, "Unless this is checked, the text 
becomes unavailable after being uttered.", NULL);
+     
+     loop = gtk_check_button_new_with_label ("Loop");
+     gtk_widget_ref (loop);
+     gtk_object_set_data_full (GTK_OBJECT (window), "loop", loop, 
(GtkDestroyNotify) gtk_widget_unref);
+     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (loop), e->loop ());
+     gtk_widget_show (loop);
+     gtk_container_add (GTK_CONTAINER (ebox), loop);
  
      // Condition-editor
***************
*** 378,381 ****
--- 394,398 ----
      entry->setCondition (cond_edit->getText ());
      entry->setNpc (getOption (GTK_OPTION_MENU (npc_selection)));
+     entry->setLoop (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (loop)));
  }
  

Index: gui_circle.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_circle.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gui_circle.h        7 Apr 2002 09:51:28 -0000       1.2
--- gui_circle.h        25 Jun 2002 16:25:52 -0000      1.3
***************
*** 60,63 ****
--- 60,64 ----
      GuiEdit *cond_edit;             // Text entry for conditions
      GuiEdit *code_edit;             // Text entry for code
+     GtkWidget *loop;                // Checkbox for looping text
      GtkWidget *text_entry;          // Entry for dialogue text
      GtkWidget *annotation_entry;    // Entry for annotations

Index: gui_dlgedit.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_dlgedit.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** gui_dlgedit.cc      9 Apr 2002 13:15:37 -0000       1.3
--- gui_dlgedit.cc      25 Jun 2002 16:25:52 -0000      1.4
***************
*** 391,396 ****
      else 
      {
!         message->display (200);        
!         showDialogue (module);
      }
  }
--- 391,396 ----
      else 
      {
!         message->display (200);      
!         showDialogue (module, true);
      }
  }
***************
*** 449,453 ****
  
  // display a certain dialogue
! void GuiDlgedit::showDialogue (DlgModule *module)
  {
      // remove the current module from the view
--- 449,453 ----
  
  // display a certain dialogue
! void GuiDlgedit::showDialogue (DlgModule *module, bool center)
  {
      // remove the current module from the view
***************
*** 455,459 ****
      
      // attach the dialogue to the view
!     graph_->attachModule (module);
      
      // update the custom code entry if neccessary
--- 455,459 ----
      
      // attach the dialogue to the view
!     graph_->attachModule (module, center);
      
      // update the custom code entry if neccessary

Index: gui_dlgedit.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_dlgedit.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** gui_dlgedit.h       9 Apr 2002 13:15:37 -0000       1.3
--- gui_dlgedit.h       25 Jun 2002 16:25:52 -0000      1.4
***************
*** 132,137 ****
       * Display a dialogue
       * @param module The dialogue to display.
       */
!     void showDialogue (DlgModule *module);
      /**
       * Compile a dialogue
--- 132,138 ----
       * Display a dialogue
       * @param module The dialogue to display.
+      * @param center whether to center the dialgue in view or not
       */
!     void showDialogue (DlgModule *module, bool center = false);
      /**
       * Compile a dialogue

Index: gui_graph.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_graph.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gui_graph.cc        7 Apr 2002 09:51:28 -0000       1.2
--- gui_graph.cc        25 Jun 2002 16:25:52 -0000      1.3
***************
*** 58,62 ****
  
  // attach a module
! void GuiGraph::attachModule (DlgModule *m)
  {
      module = m;
--- 58,62 ----
  
  // attach a module
! void GuiGraph::attachModule (DlgModule *m, bool cntr)
  {
      module = m;
***************
*** 64,67 ****
--- 64,70 ----
      // get reference of the module's offset
      offset = &m->offset ();
+     
+     // center the module in view
+     if (cntr) center ();    
  
      // if a node is selected, update the instant preview
***************
*** 430,433 ****
--- 433,451 ----
  }
  
+ // center whole dialogue in view
+ void GuiGraph::center ()
+ {
+     if (module == NULL) return;
+     
+     int min_x, max_x, y;
+     
+     module->extension (min_x, max_x, y);
+     
+     int x_off = (graph->allocation.width - (max_x - min_x))/2 - min_x;
+     int y_off = -y + 20;
+     
+     offset->move (x_off, y_off);
+ }
+ 
  // edit selected node
  bool GuiGraph::editNode ()
***************
*** 660,664 ****
      DlgRect rect (t);
  
!     // prevent changes to the drawing are to propagate to the screen
      updateBackground = false;
      
--- 678,682 ----
      DlgRect rect (t);
  
!     // prevent changes to the drawing area to propagate to the screen
      updateBackground = false;
      

Index: gui_graph.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_graph.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gui_graph.h 7 Apr 2002 09:51:28 -0000       1.2
--- gui_graph.h 25 Jun 2002 16:25:52 -0000      1.3
***************
*** 49,54 ****
       * Attach a dialogue module to the view for drawing.
       * @param m the DlgModule to display and edit.
       */ 
!     void attachModule (DlgModule *m);
      /**
       * Detach the dialogue module attached to the view.
--- 49,55 ----
       * Attach a dialogue module to the view for drawing.
       * @param m the DlgModule to display and edit.
+      * @param cntr whether the module should be centered in the view
       */ 
!     void attachModule (DlgModule *m, bool cntr = false);
      /**
       * Detach the dialogue module attached to the view.
***************
*** 83,86 ****
--- 84,91 ----
       */
      void clear ();
+     /**
+      * Center the displayed dialogue on the drawing area.
+      */
+     void center ();
      //@}
      

Index: lex.loadlg.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/lex.loadlg.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** lex.loadlg.cc       17 Apr 2002 10:01:17 -0000      1.14
--- lex.loadlg.cc       25 Jun 2002 16:25:52 -0000      1.15
***************
*** 28,32 ****
  
  #include <stdio.h>
! #include <errno.h>
  
  /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
--- 28,32 ----
  
  #include <stdio.h>
! 
  
  /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
***************
*** 41,53 ****
  
  #include <stdlib.h>
- #ifndef _WIN32
  #include <unistd.h>
- #else
- #ifndef YY_ALWAYS_INTERACTIVE
- #ifndef YY_NEVER_INTERACTIVE
- extern int isatty YY_PROTO(( int ));
- #endif
- #endif
- #endif
  
  /* Use prototypes in function declarations. */
--- 41,45 ----
***************
*** 312,329 ****
        yy_c_buf_p = yy_cp;
  
! #define YY_NUM_RULES 29
! #define YY_END_OF_BUFFER 30
! static yyconst short int yy_accept[97] =
      {   0,
!         0,    0,    0,    0,   30,   28,   27,   27,    1,   28,
!        26,   28,   28,   28,   28,   28,   28,   28,   28,   28,
!        28,   28,   28,   28,   23,   25,   24,   27,    1,    1,
!        26,    0,    0,    0,    0,    0,    0,    0,    0,    0,
          0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
!         0,   25,    0,    0,    0,    0,    0,    4,    0,    0,
!        20,    0,   15,    0,    0,    0,    9,    0,    0,    0,
!         0,    0,    0,    0,    0,   12,   22,   21,   14,    0,
!         8,   16,    7,   10,    6,   19,   17,   11,    5,   13,
!         3,    0,    0,    2,   18,    0
  
      } ;
--- 304,321 ----
        yy_c_buf_p = yy_cp;
  
! #define YY_NUM_RULES 30
! #define YY_END_OF_BUFFER 31
! static yyconst short int yy_accept[100] =
      {   0,
!         0,    0,    0,    0,   31,   29,   28,   28,    1,   29,
!        27,   29,   29,   29,   29,   29,   29,   29,   29,   29,
!        29,   29,   29,   29,   24,   26,   25,   28,    1,    1,
!        27,    0,    0,    0,    0,    0,    0,    0,    0,    0,
          0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
!         0,    0,   26,    0,    0,    0,    0,    0,    4,    0,
!         0,   21,    0,    0,   15,    0,    0,    0,    9,    0,
!         0,    0,    0,    0,    0,    0,    0,   12,   23,   22,
!        14,    0,    8,   19,   16,    7,   10,    6,   20,   17,
!        11,    5,   13,    3,    0,    0,    2,   18,    0
  
      } ;
***************
*** 369,403 ****
      } ;
  
! static yyconst short int yy_base[100] =
      {   0,
!         0,    0,   82,   81,  120,  123,   39,   41,  116,  112,
!       111,   84,   21,   81,   85,   78,   89,   82,   86,   30,
!        17,   89,   25,   88,  123,    0,  123,   54,  104,  123,
!       100,   73,   72,   74,   72,   71,   78,   70,   69,   76,
!        67,   87,   66,   55,   58,   58,   29,   69,   51,   57,
!        55,    0,   56,   64,   62,   51,   50,  123,   60,   58,
!       123,   53,  123,   55,   43,   53,  123,   39,   49,   50,
!        38,   48,   37,   32,   36,  123,  123,  123,  123,   39,
!       123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
!       123,   38,   26,  123,  123,  123,   64,   66,   53
  
      } ;
  
! static yyconst short int yy_def[100] =
      {   0,
!        96,    1,   97,   97,   96,   96,   96,   96,   98,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,   99,   96,   96,   98,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   99,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,    0,   96,   96,   96
  
      } ;
  
! static yyconst short int yy_nxt[164] =
      {   0,
          6,    7,    8,    9,   10,   11,   12,   13,   14,   15,
--- 361,397 ----
      } ;
  
! static yyconst short int yy_base[103] =
      {   0,
!         0,    0,   85,   84,  123,  126,   39,   41,  119,  115,
!       114,   87,   21,   84,   88,   81,   92,   85,   22,   33,
!        18,   93,   31,   92,  126,    0,  126,   55,  108,  126,
!       104,   77,   76,   78,   76,   75,   82,   74,   73,   80,
!        71,   69,   90,   69,   58,   61,   61,   36,   72,   54,
!        60,   58,    0,   59,   67,   65,   54,   53,  126,   63,
!        61,  126,   56,   50,  126,   57,   45,   55,  126,   41,
!        51,   52,   35,   45,   34,   28,   37,  126,  126,  126,
!       126,   39,  126,  126,  126,  126,  126,  126,  126,  126,
!       126,  126,  126,  126,   38,   28,  126,  126,  126,   70,
  
+        72,   46
      } ;
  
! static yyconst short int yy_def[103] =
      {   0,
!        99,    1,  100,  100,   99,   99,   99,   99,  101,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,  102,   99,   99,  101,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,  102,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,    0,   99,
  
+        99,   99
      } ;
  
! static yyconst short int yy_nxt[167] =
      {   0,
          6,    7,    8,    9,   10,   11,   12,   13,   14,   15,
***************
*** 405,425 ****
          6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
          6,    6,    6,    6,    6,    6,    6,    6,    6,   25,
!        28,   28,   28,   28,   33,   42,   46,   49,   47,   43,
!        34,   68,   44,   52,   35,   28,   28,   95,   69,   45,
!        94,   93,   92,   50,   26,   26,   29,   29,   91,   90,
!        89,   88,   87,   86,   85,   84,   83,   82,   81,   80,
!        79,   78,   77,   76,   75,   74,   73,   72,   71,   70,
!        67,   66,   65,   64,   63,   62,   61,   60,   59,   58,
! 
!        57,   56,   55,   54,   53,   31,   30,   51,   48,   41,
!        40,   39,   38,   37,   36,   32,   31,   31,   30,   96,
!        27,   27,    5,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96
      } ;
  
! static yyconst short int yy_chk[164] =
      {   0,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
--- 399,419 ----
          6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
          6,    6,    6,    6,    6,    6,    6,    6,    6,   25,
!        28,   28,   28,   28,   33,   41,   53,   47,   43,   48,
!        34,   42,   44,   50,   35,   45,   28,   28,   70,   98,
!        97,   96,   46,   95,   94,   71,   93,   92,   91,   51,
!        26,   26,   29,   29,   90,   89,   88,   87,   86,   85,
!        84,   83,   82,   81,   80,   79,   78,   77,   76,   75,
!        74,   73,   72,   69,   68,   67,   66,   65,   64,   63,
! 
!        62,   61,   60,   59,   58,   57,   56,   55,   54,   31,
!        30,   52,   49,   40,   39,   38,   37,   36,   32,   31,
!        31,   30,   99,   27,   27,    5,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99
      } ;
  
! static yyconst short int yy_chk[167] =
      {   0,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
***************
*** 427,444 ****
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
!         7,    7,    8,    8,   13,   20,   21,   23,   21,   20,
!        13,   47,   20,   99,   13,   28,   28,   93,   47,   20,
!        92,   80,   75,   23,   97,   97,   98,   98,   74,   73,
!        72,   71,   70,   69,   68,   66,   65,   64,   62,   60,
!        59,   57,   56,   55,   54,   53,   51,   50,   49,   48,
!        46,   45,   44,   43,   42,   41,   40,   39,   38,   37,
! 
!        36,   35,   34,   33,   32,   31,   29,   24,   22,   19,
!        18,   17,   16,   15,   14,   12,   11,   10,    9,    5,
!         4,    3,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
!        96,   96,   96
      } ;
  
--- 421,438 ----
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
!         7,    7,    8,    8,   13,   19,  102,   21,   20,   21,
!        13,   19,   20,   23,   13,   20,   28,   28,   48,   96,
!        95,   82,   20,   77,   76,   48,   75,   74,   73,   23,
!       100,  100,  101,  101,   72,   71,   70,   68,   67,   66,
!        64,   63,   61,   60,   58,   57,   56,   55,   54,   52,
!        51,   50,   49,   47,   46,   45,   44,   43,   42,   41,
! 
!        40,   39,   38,   37,   36,   35,   34,   33,   32,   31,
!        29,   24,   22,   18,   17,   16,   15,   14,   12,   11,
!        10,    9,    5,    4,    3,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
!        99,   99,   99,   99,   99,   99
      } ;
  
***************
*** 480,484 ****
  #define YY_NO_UNPUT 1
  #define YY_NEVER_INTERACTIVE 1
! #line 483 "lex.loadlg.cc"
  
  /* Macros after this point can all be overridden by user definitions in
--- 474,478 ----
  #define YY_NO_UNPUT 1
  #define YY_NEVER_INTERACTIVE 1
! #line 477 "lex.loadlg.cc"
  
  /* Macros after this point can all be overridden by user definitions in
***************
*** 580,597 ****
                result = n; \
                } \
!       else \
!               { \
!               errno=0; \
!               while ( (result = fread(buf, 1, max_size, yyin))==0 && 
ferror(yyin)) \
!                       { \
!                       if( errno != EINTR) \
!                               { \
!                               YY_FATAL_ERROR( "input in flex scanner failed" 
); \
!                               break; \
!                               } \
!                       errno=0; \
!                       clearerr(yyin); \
!                       } \
!               }
  #endif
  
--- 574,580 ----
                result = n; \
                } \
!       else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
!                 && ferror( yyin ) ) \
!               YY_FATAL_ERROR( "input in flex scanner failed" );
  #endif
  
***************
*** 645,649 ****
  
  
! #line 648 "lex.loadlg.cc"
  
        if ( yy_init )
--- 628,632 ----
  
  
! #line 631 "lex.loadlg.cc"
  
        if ( yy_init )
***************
*** 696,700 ****
                                {
                                yy_current_state = (int) 
yy_def[yy_current_state];
!                               if ( yy_current_state >= 97 )
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
--- 679,683 ----
                                {
                                yy_current_state = (int) 
yy_def[yy_current_state];
!                               if ( yy_current_state >= 100 )
                                        yy_c = yy_meta[(unsigned int) yy_c];
                                }
***************
*** 702,706 ****
                        ++yy_cp;
                        }
!               while ( yy_base[yy_current_state] != 123 );
  
  yy_find_action:
--- 685,689 ----
                        ++yy_cp;
                        }
!               while ( yy_base[yy_current_state] != 126 );
  
  yy_find_action:
***************
*** 821,877 ****
  YY_RULE_SETUP
  #line 50 "loadlg.l"
! return LOAD_PROJECT;
        YY_BREAK
  case 20:
  YY_RULE_SETUP
  #line 51 "loadlg.l"
! return LOAD_IMPORTS;
        YY_BREAK
  case 21:
  YY_RULE_SETUP
  #line 52 "loadlg.l"
! return LOAD_DTOR;
        YY_BREAK
  case 22:
  YY_RULE_SETUP
  #line 53 "loadlg.l"
! return LOAD_CTOR;
        YY_BREAK
  case 23:
  YY_RULE_SETUP
! #line 55 "loadlg.l"
! mytext = ""; BEGIN(text);
        YY_BREAK
  case 24:
  YY_RULE_SETUP
  #line 56 "loadlg.l"
! BEGIN(INITIAL); return LOAD_STR;
        YY_BREAK
  case 25:
  YY_RULE_SETUP
  #line 57 "loadlg.l"
! mytext += yytext;
        YY_BREAK
  case 26:
  YY_RULE_SETUP
! #line 59 "loadlg.l"
! mynum = atoi (yytext); return LOAD_NUM;
        YY_BREAK
  case 27:
  YY_RULE_SETUP
! #line 61 "loadlg.l"
! ;
        YY_BREAK
  case 28:
  YY_RULE_SETUP
  #line 62 "loadlg.l"
! return LOAD_UNKNOWN;
        YY_BREAK
  case 29:
  YY_RULE_SETUP
  #line 63 "loadlg.l"
  ECHO;
        YY_BREAK
! #line 876 "lex.loadlg.cc"
  case YY_STATE_EOF(INITIAL):
  case YY_STATE_EOF(text):
--- 804,865 ----
  YY_RULE_SETUP
  #line 50 "loadlg.l"
! return LOAD_LOOP;
        YY_BREAK
  case 20:
  YY_RULE_SETUP
  #line 51 "loadlg.l"
! return LOAD_PROJECT;
        YY_BREAK
  case 21:
  YY_RULE_SETUP
  #line 52 "loadlg.l"
! return LOAD_IMPORTS;
        YY_BREAK
  case 22:
  YY_RULE_SETUP
  #line 53 "loadlg.l"
! return LOAD_DTOR;
        YY_BREAK
  case 23:
  YY_RULE_SETUP
! #line 54 "loadlg.l"
! return LOAD_CTOR;
        YY_BREAK
  case 24:
  YY_RULE_SETUP
  #line 56 "loadlg.l"
! mytext = ""; BEGIN(text);
        YY_BREAK
  case 25:
  YY_RULE_SETUP
  #line 57 "loadlg.l"
! BEGIN(INITIAL); return LOAD_STR;
        YY_BREAK
  case 26:
  YY_RULE_SETUP
! #line 58 "loadlg.l"
! mytext += yytext;
        YY_BREAK
  case 27:
  YY_RULE_SETUP
! #line 60 "loadlg.l"
! mynum = atoi (yytext); return LOAD_NUM;
        YY_BREAK
  case 28:
  YY_RULE_SETUP
  #line 62 "loadlg.l"
! ;
        YY_BREAK
  case 29:
  YY_RULE_SETUP
  #line 63 "loadlg.l"
+ return LOAD_UNKNOWN;
+       YY_BREAK
+ case 30:
+ YY_RULE_SETUP
+ #line 64 "loadlg.l"
  ECHO;
        YY_BREAK
! #line 864 "lex.loadlg.cc"
  case YY_STATE_EOF(INITIAL):
  case YY_STATE_EOF(text):
***************
*** 1166,1170 ****
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
!                       if ( yy_current_state >= 97 )
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
--- 1154,1158 ----
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
!                       if ( yy_current_state >= 100 )
                                yy_c = yy_meta[(unsigned int) yy_c];
                        }
***************
*** 1201,1209 ****
                {
                yy_current_state = (int) yy_def[yy_current_state];
!               if ( yy_current_state >= 97 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) 
yy_c];
!       yy_is_jam = (yy_current_state == 96);
  
        return yy_is_jam ? 0 : yy_current_state;
--- 1189,1197 ----
                {
                yy_current_state = (int) yy_def[yy_current_state];
!               if ( yy_current_state >= 100 )
                        yy_c = yy_meta[(unsigned int) yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) 
yy_c];
!       yy_is_jam = (yy_current_state == 99);
  
        return yy_is_jam ? 0 : yy_current_state;
***************
*** 1438,1448 ****
  
  
- #ifndef _WIN32
- #include <unistd.h>
- #else
  #ifndef YY_ALWAYS_INTERACTIVE
  #ifndef YY_NEVER_INTERACTIVE
! extern int isatty YY_PROTO(( int ));
! #endif
  #endif
  #endif
--- 1426,1432 ----
  
  
  #ifndef YY_ALWAYS_INTERACTIVE
  #ifndef YY_NEVER_INTERACTIVE
! #include<unistd.h>
  #endif
  #endif
***************
*** 1764,1766 ****
        }
  #endif
! #line 63 "loadlg.l"
--- 1748,1750 ----
        }
  #endif
! #line 64 "loadlg.l"

Index: loadlg.l
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/loadlg.l,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** loadlg.l    17 Apr 2002 10:01:17 -0000      1.11
--- loadlg.l    25 Jun 2002 16:25:52 -0000      1.12
***************
*** 48,51 ****
--- 48,52 ----
  Race            return LOAD_RACE;
  Gender          return LOAD_GENDER;
+ Loop            return LOAD_LOOP;
  Proj            return LOAD_PROJECT;
  Inc             return LOAD_IMPORTS;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]