From e3fe9fa1d10264370c63e20756e5cbd2c1050f43 Mon Sep 17 00:00:00 2001 From: "Jeffrey H. Kingston" Date: Tue, 14 Sep 2010 20:36:08 +0000 Subject: Lout 3.20 tag. git-svn-id: http://svn.savannah.nongnu.org/svn/lout/tags/3.20@10 9365b830-b601-4143-9ba8-b4a8e2c3339c --- doc/user/prg_erro | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 doc/user/prg_erro (limited to 'doc/user/prg_erro') diff --git a/doc/user/prg_erro b/doc/user/prg_erro new file mode 100644 index 0000000..7ebbe3e --- /dev/null +++ b/doc/user/prg_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 "prg_tabs" (from "prg" line 96, from "all" line 46): + 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 -- cgit