aboutsummaryrefslogtreecommitdiffstats
path: root/doc/user/cpp_erro
diff options
context:
space:
mode:
authorJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 19:36:16 +0000
committerJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 19:36:16 +0000
commita0423a5c6e7ae16023d22892ce2124989745c7a1 (patch)
tree26e8947ef0a82e8150e46ebd0b257ec5cd13c0ed /doc/user/cpp_erro
parent71bdb35d52747e6d7d9f55df4524d57c2966be94 (diff)
downloadlout-3.18.tar.gz
Lout 3.18 tag.3.18
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/tags/3.18@6 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'doc/user/cpp_erro')
-rw-r--r--doc/user/cpp_erro39
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/user/cpp_erro b/doc/user/cpp_erro
new file mode 100644
index 0000000..ff89591
--- /dev/null
+++ b/doc/user/cpp_erro
@@ -0,0 +1,39 @@
+@Section
+ @Title { Error messages }
+ @Tag { cpp_erro }
+@Begin
+@PP
+In order to understand the error messages produced by program
+printing, it is necessary to understand that Lout's first step when
+given a program text is to pass it to the separate {@Code prg2lout}
+program for analysis. This separate program is the source of most
+of the error messages associated with program printing.
+@PP
+The {@Code prg2lout} program is quite happy to format a fragment of a
+computer program: there is no need to supply a complete routine, or
+a complete statement, or any such thing. However, it will complain if
+you supply only a fragment of one lexical unit, such as a comment or
+string without its terminating delimiter. It will also complain if
+there is a character that cannot be classified as part of an identifier,
+number, etc. according to the rules of the language as they have been
+given to @Code prg2lout by the implementer. Irrespective of the
+language rules, @Code prg2lout always interprets spaces, tabs, newlines,
+and formfeed characters in the usual way.
+@PP
+If an error message is generated by {@Code prg2lout}, it will contain
+a line and column number counting from the start of the program text
+involved. Lout will precede this error message with a file name,
+line number, and column number pointing to the Lout symbol
+({@Code "@CP"}, {@Code "@Eiffel"} etc.) whose program text caused the
+error message, like this:
+@ID @Code @Verbatim {
+lout file "cpp_tabs" (from "cpp" line 80, from "all" line 45):
+ 56,23: prg2lout 2,1: program text ended within comment
+}
+This is an actual message produced when formatting this chapter. The
+program text in question has only one line, containing an incomplete comment,
+so when @Code "prg2lout" tried to start the second line and found nothing,
+it complained as shown. In general, then, you have to add
+{@Code "prg2lout"}'s line number to Lout's line number, and use some
+initiative, to find the precise point of the problem.
+@End @Section