Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: src/lexer/even-more-experimental-scanner.h

Issue 72693002: Experimental lexer generator: Don't go BACK(); (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/lexer/even-more-experimental-scanner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 18 matching lines...) Expand all
29 #define V8_LEXER_EVEN_MORE_EXPERIMENTAL_SCANNER_H 29 #define V8_LEXER_EVEN_MORE_EXPERIMENTAL_SCANNER_H
30 30
31 #include "token.h" 31 #include "token.h"
32 #include "flags.h" 32 #include "flags.h"
33 #include "v8stdint.h" 33 #include "v8stdint.h"
34 34
35 #define YYCTYPE uint8_t 35 #define YYCTYPE uint8_t
36 36
37 #define PUSH_TOKEN(T) { send(T); start_ = cursor_; } 37 #define PUSH_TOKEN(T) { send(T); start_ = cursor_; }
38 #define PUSH_LINE_TERMINATOR(s) { start_ = cursor_; } 38 #define PUSH_LINE_TERMINATOR(s) { start_ = cursor_; }
39 #define BACK() { yych = *(--cursor_); } 39 #define FORWARD() { yych = *(++cursor_); }
40 #define SKIP() { start_ = cursor_; } 40 #define SKIP() { start_ = cursor_; }
41 41
42 namespace v8 { 42 namespace v8 {
43 namespace internal { 43 namespace internal {
44 44
45 class ExperimentalScanner; 45 class ExperimentalScanner;
46 class UnicodeCache; 46 class UnicodeCache;
47 47
48 class EvenMoreExperimentalScanner { 48 class EvenMoreExperimentalScanner {
49 public: 49 public:
(...skipping 19 matching lines...) Expand all
69 YYCTYPE* start_; 69 YYCTYPE* start_;
70 YYCTYPE* cursor_; 70 YYCTYPE* cursor_;
71 71
72 YYCTYPE yych; 72 YYCTYPE yych;
73 ExperimentalScanner* sink_; 73 ExperimentalScanner* sink_;
74 }; 74 };
75 75
76 } } 76 } }
77 77
78 #endif // V8_LEXER_LEXER_H 78 #endif // V8_LEXER_LEXER_H
OLDNEW
« no previous file with comments | « no previous file | src/lexer/even-more-experimental-scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698