diff libinterp/parse-tree/lex.h @ 16231:2b15ae55c721

put all tokens in the token cache * lex.h, lex.ll (octave_lexer::handle_token (int, token *)): New arg, tok_val, with default value 0. If tok_val is 0, create token object. Put token object in the token cache. (octave_lexer::handle_token (const std::string&, int)): Rename from push_token. Change all uses. Create token and pass to octave_lexer::handle_token (int, tok_val *).
author John W. Eaton <jwe@octave.org>
date Sat, 09 Mar 2013 02:02:22 -0500
parents 4bf907906134
children d8c0f46efaf0 a89cf57ba3a5
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.h	Sat Mar 09 01:20:23 2013 -0500
+++ b/libinterp/parse-tree/lex.h	Sat Mar 09 02:02:22 2013 -0500
@@ -600,9 +600,9 @@
   int handle_op_internal (const char *pattern, int tok, bool convert,
                           bool bos, bool qit, bool compat);
 
-  int push_token (const std::string& name, int tok);
+  int handle_token (const std::string& name, int tok);
 
-  int handle_token (int tok);
+  int handle_token (int tok, token *tok_val = 0);
 
   int count_token (int tok);