diff src/lex.h @ 2857:5448c8cba402

[project @ 1997-03-31 07:06:10 by jwe]
author jwe
date Mon, 31 Mar 1997 07:06:20 +0000
parents 8b262e771614
children 5c1b9e545dd1
line wrap: on
line diff
--- a/src/lex.h	Mon Mar 31 06:39:28 1997 +0000
+++ b/src/lex.h	Mon Mar 31 07:06:20 1997 +0000
@@ -28,7 +28,7 @@
 #ifdef YY_INPUT
 #undef YY_INPUT
 #endif
-#define YY_INPUT(buf,result,max_size) \
+#define YY_INPUT(buf, result, max_size) \
   if ((result = octave_read (buf, max_size)) < 0) \
     YY_FATAL_ERROR ("octave_read () in flex scanner failed");
 
@@ -49,14 +49,14 @@
   do \
     { \
       current_input_column += yyleng; \
-      lexer_flags.quote_is_transpose = 0; \
-      lexer_flags.cant_be_identifier = 0; \
-      lexer_flags.convert_spaces_to_comma = 1; \
+      lexer_flags.quote_is_transpose = false; \
+      lexer_flags.cant_be_identifier = false; \
+      lexer_flags.convert_spaces_to_comma = true; \
       return (tok); \
     } \
   while (0)
 
-#define TOK_PUSH_AND_RETURN(name,tok) \
+#define TOK_PUSH_AND_RETURN(name, tok) \
   do \
     { \
       yylval.tok_val = new token (name, input_line_number, \
@@ -66,14 +66,14 @@
     } \
   while (0)
 
-#define BIN_OP_RETURN(tok,convert) \
+#define BIN_OP_RETURN(tok, convert) \
   do \
     { \
       yylval.tok_val = new token (input_line_number, current_input_column); \
       token_stack.push (yylval.tok_val); \
       current_input_column += yyleng; \
-      lexer_flags.quote_is_transpose = 0; \
-      lexer_flags.cant_be_identifier = 0; \
+      lexer_flags.quote_is_transpose = false; \
+      lexer_flags.cant_be_identifier = true; \
       lexer_flags.convert_spaces_to_comma = convert; \
       return (tok); \
     } \
@@ -119,55 +119,55 @@
 
   void init (void);
 
-  // Nonzero means we think we are looking at the beginning of a
-  // function definition.
-  int beginning_of_function;
-
   // Brace level count.
   int braceflag;
 
-  // Another context hack, this time for the plot command's `using',
-  // `title', and `with' keywords.
-  int cant_be_identifier;
-
-  // Nonzero means that we should convert spaces to a comma inside a
-  // matrix definition.
-  int convert_spaces_to_comma;
-
-  // Nonzero means we're in the middle of defining a function.
-  int defining_func;
-
-  // Nonzero means we're parsing the return list for a function.
-  int looking_at_return_list;
-
-  // Nonzero means we're parsing the parameter list for a function.
-  int looking_at_parameter_list;
-
-  // GAG.  Stupid kludge so that [[1,2][3,4]] will work.
-  int do_comma_insert;
-
-  // Nonzero means we think we are looking at a set command.
-  int doing_set;
-
-  // Nonzero means we're looking at the range part of a plot command.
-  int in_plot_range;
-
-  // Nonzero means we're looking at the using part of a plot command.
-  int in_plot_using;
-
-  // Nonzero means we're looking at the style part of a plot command.
-  int in_plot_style;
-
-  // Nonzero means we're looking at an indirect reference to a
-  // structure element.
-  int looking_at_indirect_ref;
-
   // Nonzero means we're in the middle of defining a loop.
   int looping;
 
+  // Nonzero means we think we are looking at the beginning of a
+  // function definition.
+  bool beginning_of_function;
+
+  // Another context hack, this time for the plot command's `using',
+  // `title', and `with' keywords.
+  bool cant_be_identifier;
+
+  // Nonzero means that we should convert spaces to a comma inside a
+  // matrix definition.
+  bool convert_spaces_to_comma;
+
+  // Nonzero means we're in the middle of defining a function.
+  bool defining_func;
+
+  // Nonzero means we're parsing the return list for a function.
+  bool looking_at_return_list;
+
+  // Nonzero means we're parsing the parameter list for a function.
+  bool looking_at_parameter_list;
+
+  // GAG.  Stupid kludge so that [[1,2][3,4]] will work.
+  bool do_comma_insert;
+
+  // Nonzero means we think we are looking at a set command.
+  bool doing_set;
+
+  // Nonzero means we're looking at the range part of a plot command.
+  bool in_plot_range;
+
+  // Nonzero means we're looking at the using part of a plot command.
+  bool in_plot_using;
+
+  // Nonzero means we're looking at the style part of a plot command.
+  bool in_plot_style;
+
+  // Nonzero means we're looking at an indirect reference to a
+  // structure element.
+  bool looking_at_indirect_ref;
+
   // Nonzero means we need to do some extra lookahead to avoid being
   // screwed by bogus function syntax.
-  int maybe_screwed;
+  bool maybe_screwed;
 
   // Nonzero means we need to do some extra lookahead to avoid being
   // screwed by bogus function syntax.
@@ -175,13 +175,13 @@
 
   // Nonzero means we've seen something that means we must be past the
   // range part of a plot command.
-  int past_plot_range;
+  bool past_plot_range;
 
   // Nonzero means we're working on a plot command.
-  int plotting;
+  bool plotting;
 
   // Return transpose or start a string?
-  int quote_is_transpose;
+  bool quote_is_transpose;
 
 private: