diff options
author | Miguel de Icaza <miguel@gnome.org> | 2012-01-27 06:02:03 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2012-01-27 06:02:03 +0400 |
commit | 0a5426328e8efe6f2ad61452d4424f656f6e95ef (patch) | |
tree | f66755b79cbe3a6e4d66e03b5643bec2a5595076 /mcs/docs | |
parent | 8ce71f96194f32b9da3af7492518caf16928d850 (diff) |
Update the compiler docs
Diffstat (limited to 'mcs/docs')
-rwxr-xr-x | mcs/docs/compiler.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mcs/docs/compiler.txt b/mcs/docs/compiler.txt index 14e4c5529b0..351662ffe23 100755 --- a/mcs/docs/compiler.txt +++ b/mcs/docs/compiler.txt @@ -263,6 +263,26 @@ 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 |