home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / octave-1.1.1p1-base.tgz / octave-1.1.1p1-base.tar / fsf / octave / src / parse.h < prev    next >
C/C++ Source or Header  |  1995-02-01  |  3KB  |  107 lines

  1. // parse.h                                                 -*- C++ -*-
  2. /*
  3.  
  4. Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton
  5.  
  6. This file is part of Octave.
  7.  
  8. Octave is free software; you can redistribute it and/or modify it
  9. under the terms of the GNU General Public License as published by the
  10. Free Software Foundation; either version 2, or (at your option) any
  11. later version.
  12.  
  13. Octave is distributed in the hope that it will be useful, but WITHOUT
  14. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16. for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with Octave; see the file COPYING.  If not, write to the Free
  20. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22. */
  23.  
  24. #if !defined (octave_parse_h)
  25. #define octave_parse_h 1
  26.  
  27. #include "SLStack.h"
  28.  
  29. extern void discard_until (char c);
  30. extern void reset_parser (void);
  31. extern int yylex (void);
  32. extern int yyparse (void);
  33.  
  34. class tree;
  35. class tree_matrix;
  36. class tree_identifier;
  37. class symbol_table;
  38.  
  39. // Nonzero means we're in the middle of defining a function.
  40. extern int defining_func;
  41.  
  42. // Nonzero means we're in the middle of defining a loop.
  43. extern int looping;
  44.  
  45. // Nonzero means we're in the middle of defining a conditional expression.
  46. extern int iffing;
  47.  
  48. // Nonzero means we need to do some extra lookahead to avoid being
  49. // screwed by bogus function syntax.
  50. extern int maybe_screwed;
  51.  
  52. // Nonzero means we need to do some extra lookahead to avoid being
  53. // screwed by bogus function syntax.
  54. extern int maybe_screwed_again;
  55.  
  56. // Temporary symbol table pointer used to cope with bogus function syntax.
  57. extern symbol_table *tmp_local_sym_tab;
  58.  
  59. // Stack to hold list of literal matrices.
  60. extern SLStack <tree_matrix *> ml;
  61.  
  62. // A nonzero element corresponding to an element of ml means we just
  63. // started reading a new matrix.  This should probably be part of a
  64. // new struct for matrix lists...
  65. extern SLStack <int> mlnm;
  66.  
  67. // Nonzero means print parser debugging info (-d).
  68. extern int yydebug;
  69.  
  70. // The current input line number.
  71. extern int input_line_number;
  72.  
  73. // The column of the current token.
  74. extern int current_input_column;
  75.  
  76. // Buffer for help text snagged from function files.
  77. extern char *help_buf;
  78.  
  79. // Nonzero means we're working on a plot command.
  80. extern int plotting;
  81.  
  82. // Nonzero means we've seen something that means we must be past the
  83. // range part of a plot command.
  84. extern int past_plot_range;
  85.  
  86. // Nonzero means we're looking at the range part of a plot command.
  87. extern int in_plot_range;
  88.  
  89. // Nonzero means we're looking at the using part of a plot command.
  90. extern int in_plot_using;
  91.  
  92. // Nonzero means we're looking at the style part of a plot command.
  93. extern int in_plot_style;
  94.  
  95. // Nonzero means we're looking at an indirect reference to a structure
  96. // element.
  97. extern int looking_at_indirect_ref;
  98.  
  99. #endif
  100.  
  101. /*
  102. ;;; Local Variables: ***
  103. ;;; mode: C++ ***
  104. ;;; page-delimiter: "^/\\*" ***
  105. ;;; End: ***
  106. */
  107.