diff options
author | Bruno Haible <bruno@clisp.org> | 2003-05-02 03:59:36 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2003-05-02 03:59:36 +0000 |
commit | 31f7c8a49ebd4e8ccd4b4d01c7aca9922ff407f0 (patch) | |
tree | 77357a74f570488c06f7eebc0ed48e71aa380888 /doc/gperf.texi | |
parent | c170151d6755c4229439882784e275f9584ab186 (diff) | |
download | gperf-31f7c8a49ebd4e8ccd4b4d01c7aca9922ff407f0.tar.gz |
Ignore comments at the beginning of the declarations section.
Diffstat (limited to 'doc/gperf.texi')
-rw-r--r-- | doc/gperf.texi | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/doc/gperf.texi b/doc/gperf.texi index 5901e23..902da6d 100644 --- a/doc/gperf.texi +++ b/doc/gperf.texi @@ -122,6 +122,7 @@ Input Format to @code{gperf} * Declarations:: Declarations. * Keywords:: Format for Keyword Entries. * Functions:: Including Additional C Functions. +* Controls for GNU indent:: Where to place directives for GNU @code{indent}. Declarations @@ -330,6 +331,7 @@ input format for each section. * Declarations:: Declarations. * Keywords:: Format for Keyword Entries. * Functions:: Including Additional C Functions. +* Controls for GNU indent:: Where to place directives for GNU @code{indent}. @end menu It is possible to omit the declaration section entirely, if the @samp{-t} @@ -685,7 +687,7 @@ declaration section. If the @samp{-t} option (or, equivalently, the these fields are simply ignored. All previous examples except the last one contain keyword attributes. -@node Functions, , Keywords, Input Format +@node Functions, Controls for GNU indent, Keywords, Input Format @subsection Including Additional C Functions The optional third section also corresponds closely with conventions @@ -695,6 +697,52 @@ file, is included verbatim into the generated output file. Naturally, it is your responsibility to ensure that the code contained in this section is valid C. +@node Controls for GNU indent, , Functions, Input Format +@subsection Where to place directives for GNU @code{indent}. + +If you want to invoke GNU @code{indent} on a @code{gperf} input file, +you will see that GNU @code{indent} doesn't understand the @samp{%%}, +@samp{%@{} and @samp{%@}} directives that control @code{gperf}'s +interpretation of the input file. Therefore you have to insert some +directives for GNU @code{indent}. More precisely, assuming the most +general input file structure + +@example +@group +declarations part 1 +%@{ +verbatim code +%@} +declarations part 2 +%% +keywords +%% +functions +@end group +@end example + +@noindent +you would insert @samp{*INDENT-OFF*} and @samp{*INDENT-ON*} comments +as follows: + +@example +@group +/* *INDENT-OFF* */ +declarations part 1 +%@{ +/* *INDENT-ON* */ +verbatim code +/* *INDENT-OFF* */ +%@} +declarations part 2 +%% +keywords +%% +/* *INDENT-ON* */ +functions +@end group +@end example + @node Output Format, Binary Strings, Input Format, Description @section Output Format for Generated C Code with @code{gperf} @cindex hash table |