[Commit] mint-2004b tool.tex,1.3,1.4

Emma Kuo commit at keithp.com
Wed Dec 1 10:49:57 PST 2004


Committed by: ekuo

Update of /local/src/CVS/mint-2004b
In directory home.keithp.com:/tmp/cvs-serv23434

Modified Files:
	tool.tex 
Log Message:


Index: tool.tex
===================================================================
RCS file: /local/src/CVS/mint-2004b/tool.tex,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- tool.tex	1 Dec 2004 15:05:26 -0000	1.3
+++ tool.tex	1 Dec 2004 18:49:54 -0000	1.4
@@ -141,6 +141,33 @@
 a more complete resolution of shift/reduce and reduce/reduce
 conflicts via a more detailed specification of priorities.
 
+\subsection{Serialization of lex and parse tables}
+
+The serializer which saves and loads the lexing and parsing tables
+from disk is an important component distinguishing the MINT
+architecture.  It uses what is essentially a human-readable machine
+format. The Nickle data structures that represent the tables are
+traversed in a top-down fashion, writing the scalar values to the data
+file, one per line. A single character is appended to the beginning of
+each line, to indicate roughly what type of data it is. This was
+initially done to assist in the debugging of the serializer, though it
+is no longer necessary.
+
+\begin{tabular}{ll}
+\verb'b' & beginning of new record\\
+\verb'c' & length of following array or hash\\
+\verb'v' & scalar data\\
+\verb'k' & key used for hash value\\
+\end{tabular}
+
+Integers are printed in human-readable format, and unions are printed
+as their equivalent name, eg. ``shift'' or ``reduction''. String
+values are delimited by double quotes. Escaping of double quote
+characters has not been implemented, but since token and nonterminal
+names are the only string values appearing in the tables, this
+inability to represent strings containing double quotes is not a large
+handicap.
+
 \subsection{Achieving goals}
 
 MINT was able to generate parsers for the regular expression and BNF




More information about the Commit mailing list