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

Unified Diff: src/lexer/lexer_py.re

Issue 141483008: Experimental parser: add docs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/lexer_py.re
diff --git a/src/lexer/lexer_py.re b/src/lexer/lexer_py.re
index 0b7ef3895bc7806ebda882f10edeef3c1a85bc09..328fda5e863c8ec3b8a946a0030a8ca5d53265bf 100644
--- a/src/lexer/lexer_py.re
+++ b/src/lexer/lexer_py.re
@@ -25,6 +25,8 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Character classes and auxiliary regexps.
+
line_terminator = [:line_terminator:];
identifier_start = [$_:letter:];
identifier_char = [:identifier_start::identifier_part_not_letter:];
@@ -51,11 +53,20 @@ harmony_number = "0"[bBoO][:digit:]+;
line_terminator_sequence = /[:line_terminator:]|(\r\n|\n\r)/;
eos = [:eos:];
-# grammar is
-# regex <action_on_state_entry|action_on_match|transition>
+# Rules.
+
+# Grammar is
+# regex <entry_action|match_action|transition>
+#
+# Actions are identifiers to be passed to codegen.
+#
+# Entry action is executed when we enter the corresponding automaton state, that
+# is, right after seeing something that matches the regex. Match action is
+# executed when we have matched the regex but cannot continue to match something
+# bigger (there is no legal transition out with the next character we're
+# lexing).
#
-# actions are identifiers to be passed to codegen
-# transition must be 'continue' or the name of a subgraph
+# Transition must be 'continue' or the name of a subgraph.
<<default>>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698