Mercurial > hg > octave-lyh
comparison libinterp/parse-tree/lex.h @ 16257:db7f07b22b9b
1/10 commits reworking the lexer
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 11 Mar 2013 14:14:41 -0400 |
parents | 12bf6a3f8c45 |
children | 5c32368509a2 0b5ab09dfce4 |
comparison
equal
deleted
inserted
replaced
16255:12bf6a3f8c45 | 16257:db7f07b22b9b |
---|---|
280 | 280 |
281 void mark_previous_token_trailing_space (void); | 281 void mark_previous_token_trailing_space (void); |
282 | 282 |
283 bool space_follows_previous_token (void) const; | 283 bool space_follows_previous_token (void) const; |
284 | 284 |
285 bool previous_token_is_binop (void) const; | |
286 | |
287 bool previous_token_may_be_command (void) const; | |
288 | |
285 // true means that we have encountered eof on the input stream. | 289 // true means that we have encountered eof on the input stream. |
286 bool end_of_input; | 290 bool end_of_input; |
287 | 291 |
288 // true means that we should convert spaces to a comma inside a | 292 // true means that we should convert spaces to a comma inside a |
289 // matrix definition. | 293 // matrix definition. |
519 | 523 |
520 void scan_for_comments (const char *text); | 524 void scan_for_comments (const char *text); |
521 | 525 |
522 int eat_whitespace (void); | 526 int eat_whitespace (void); |
523 | 527 |
528 bool whitespace_is_significant (void); | |
529 | |
524 void handle_number (void); | 530 void handle_number (void); |
525 | 531 |
526 void handle_continuation (void); | 532 void handle_continuation (void); |
527 | 533 |
528 void finish_comment (octave_comment_elt::comment_type typ, | 534 void finish_comment (octave_comment_elt::comment_type typ, |
627 | 633 |
628 int handle_incompatible_op (const char *pattern, int tok, | 634 int handle_incompatible_op (const char *pattern, int tok, |
629 bool convert = false, bool bos = false, | 635 bool convert = false, bool bos = false, |
630 bool qit = false); | 636 bool qit = false); |
631 | 637 |
638 int handle_assign_op (const char *pattern, int tok); | |
639 | |
640 int handle_incompatible_assign_op (const char *pattern, int tok); | |
641 | |
632 int handle_op_internal (const char *pattern, int tok, bool convert, | 642 int handle_op_internal (const char *pattern, int tok, bool convert, |
633 bool bos, bool qit, bool compat); | 643 bool bos, bool qit, bool compat); |
634 | 644 |
635 int handle_token (const std::string& name, int tok); | 645 int handle_token (const std::string& name, int tok); |
636 | 646 |
637 int handle_token (int tok, token *tok_val = 0); | 647 int handle_token (int tok, token *tok_val = 0); |
638 | 648 |
639 int count_token (int tok); | 649 int count_token (int tok); |
640 | 650 |
651 int count_token_internal (int tok); | |
652 | |
641 int show_token (int tok); | 653 int show_token (int tok); |
642 | 654 |
643 // For unwind protect. | 655 // For unwind protect. |
644 static void cleanup (octave_lexer *lexer) { delete lexer; } | 656 static void cleanup (octave_lexer *lexer) { delete lexer; } |
645 | 657 |