Date: Tue Oct 30 05:21:56 2007
New Revision: 22613
o update README.
--- trunk/compilers/pirc/new/README.pod (original)
+++ trunk/compilers/pirc/new/README.pod Tue Oct 30 05:21:56 2007
@@ -83,7 +83,6 @@
This is a nice opportunity to clean up the grammar of the PIR language.
IMCC's grammar is possible, but not for the faint of heart.
@@ -97,7 +96,40 @@
+=head2 On the macro pre-processor
+As listed in the TODO, it might be worth while considering to remove the macro
+from pir.l, and create a separate macro pre-processor. However, when doing so,
+is almost a duplicate of pir.l. This is to correctly scan heredocs and
+expansions. When a dot-prefixed identifier is encountered, it should only be
+when the lexer is not scanning a heredoc. So, at least the whole heredoc
+should also go into the pre-processor.
+A first version of a separate macro pre-processor can be found in
+This pre-processor is mostly done, except for macro argument expansion, and
+=item * cleaner solution, as the macro layer is implemented in a separate
+=item * easier to maintain. The heredoc and macro scanning is complex, and to
isolate it in a
+different file is a Good Thing.
+=item * a great deal of the PIR lexer is duplicated. Duplication of code is
+=item * having the input processed by two instead of 1 scanner results in a
+This is especially true if the intermediate results are written to and read
from a file on disk.