Commit be0fbf76 authored by Pierre Brandone's avatar Pierre Brandone
Browse files

TC-2 bugs: add explainations about common bugs

* source/compiler_stages/tc_2/recurring_bugs.rst,
* source/compiler_stages/tc_2/tc_2.rst: Here.
parent 5d05f38c
Pipeline #32333 passed with stage
in 39 seconds
......@@ -5,7 +5,7 @@ TC-1 Recurring bugs
Lexer patterns not reached
When scanning an input, ``flex`` matches this input to the pattern with the
longest character correspondance. With this ``flex`` patterns:
longest character correspondance. With these ``flex`` patterns:
.. code-block::
.. _TC-2 Recurring bugs:
TC-2 Recurring bugs
Assertion \`map_.empty()' failed.
A ``TWEAST`` added an AST node to the ``MetavarMap``'s ``map_``, but it was
never retrieved.
Check that you handle the scanning of metavariables correctly, and that you
create the corresponding metavariable when you match the metavar grammar
Precondition \`the_program' failed.
``the_program`` corresponds to the root of your ast, and **you** are supposed
to set it to the result of the parsing. Have you looked at every FIXME?
Pretty Printer prints nothing yet does not crash
Your code is wrapped into a ``ChunkList`` containing the ``primitive``
declarations as well as the ``main`` function. You need to complete the
methods for ``ChunkList`` and ``FunctionDec`` in all of your visitors to be
able to visit any other node.
......@@ -24,6 +24,8 @@ Relevant lecture notes include :lectures:`08-dev-tools.pdf` and
.. **TC-2 FAQ**: Questions not to ask
.. **TC-2 Recurring Bugs**: Frequently encountered bugs
.. **TC-2 Improvements**: Other Designs
.. toctree::
......@@ -32,4 +34,5 @@ Relevant lecture notes include :lectures:`08-dev-tools.pdf` and
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment