Revision: 18765
Author:   [email protected]
Date:     Thu Jan 23 09:11:01 2014 UTC
Log:      Experimental parser: add comments for NfaBuilder.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/143803015
http://code.google.com/p/v8/source/detail?r=18765

Modified:
 /branches/experimental/parser/tools/lexer_generator/nfa_builder.py

=======================================
--- /branches/experimental/parser/tools/lexer_generator/nfa_builder.py Wed Jan 22 09:26:03 2014 UTC +++ /branches/experimental/parser/tools/lexer_generator/nfa_builder.py Thu Jan 23 09:11:01 2014 UTC
@@ -29,6 +29,15 @@
 from inspect import getmembers
 from nfa import *

+# Nfa is built in two stages:
+# 1. Build a tree of operations on rules.
+#    Each node in the tree is a tuple (operation, subtree1, ... subtreeN).
+#    Rule parser builds this tree by invoking static methods of NfaBuilder.
+# 2. For each node, perform the operation of the node to produce an Nfa.
+#    If an operation is called X, then it is performed by the method
+#    of NfaBuilder called __x(). See __process() for mapping from
+#    operation to processing methods.
+
 class NfaBuilder(object):

   def __init__(self, encoding, character_classes = {}):

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to