Update the compiler docs
authorMiguel de Icaza <miguel@gnome.org>
Fri, 27 Jan 2012 02:02:03 +0000 (21:02 -0500)
committerMiguel de Icaza <miguel@gnome.org>
Fri, 27 Jan 2012 02:02:03 +0000 (21:02 -0500)
mcs/docs/compiler.txt

index 14e4c5529b0358ca8df33342ad7794aaad5d28a5..351662ffe234f4211cc50bc975ff92c121c89a26 100755 (executable)
        top of the stack as a number of values `TAKING',
        `TAKEN_BEFORE', `ELSE_SEEN', `PARENT_TAKING'.
 
+       To debug problems in your grammar, you need to edit the
+       Makefile and make sure that the -ct options are passed to
+       jay.   The current incarnation says:
+
+       ./../jay/jay -c < ./../jay/skeleton.cs cs-parser.jay
+
+       During debugging, you want to change this to:
+
+       ./../jay/jay -c < ./../jay/skeleton.cs cs-parser.jay
+
+       This generates a parser with debugging information and allows
+       you to activate verbose parser output in both the csharp
+       command and the mcs command by passing the "-v -v" flag (-v
+       twice).
+
+       When you do this, standard output will have a dump of the
+       tokens parsed and how the parser reacted to those.   You can
+       look up the states with the y.output file that contains the
+       entire parser state diagram in human readable form.
+
 ** Locations
 
        Locations are encoded as a 32-bit number (the Location