aboutsummaryrefslogtreecommitdiff
path: root/doc/grecs_format_node.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/grecs_format_node.3')
-rw-r--r--doc/grecs_format_node.3102
1 files changed, 102 insertions, 0 deletions
diff --git a/doc/grecs_format_node.3 b/doc/grecs_format_node.3
new file mode 100644
index 0000000..d1d8b02
--- /dev/null
+++ b/doc/grecs_format_node.3
@@ -0,0 +1,102 @@
+.\" This file is part of grecs -*- nroff -*-
+.\" Copyright (C) 2007, 2009-2011 Sergey Poznyakoff
+.\"
+.\" Grecs is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 3, or (at your option)
+.\" any later version.
+.\"
+.\" Grecs is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with Grecs. If not, see <http://www.gnu.org/licenses/>.
+.\" This file is part of SLB.
+.\" Copyright (C) 2011 Sergey Poznyakoff
+.\"
+.TH GRECS_FORMAT_NODE 3 "May 4, 2011" "GRECS" "Grecs User Reference"
+.SH NAME
+grecs_format_node \- format and print a single node from a syntax tree
+.SH SYNOPSIS
+.nf
+.B #include <grecs.h>
+.sp
+.BI "void grecs_format_node(struct grecs_node *" "node" ", int " \
+ "flags" ", FILE " "*fp" );
+.SH DESCRIPTION
+\fBgrecs_format_node\fR prints to the output file \fBfp\fR the
+contents of a parse tree node \fBnode\fR, according to formatting
+options, given by \fBflags\fR.
+.PP
+The \fBflags\fR argument is a bitwise \fBOR\fR of one or more of the
+following options:
+.TP
+.I (a punctuation character)
+This character will be used as pathname component separator, instead
+of the default dot.
+.TP
+.B GRECS_NODE_FLAG_LOCUS
+Print the source location. The location is printed as the file name,
+followed by a semicolon, followed by the line number and another
+semicolon. Locations are separated from the rest of output by a single
+space character.
+.TP
+.B GRECS_NODE_FLAG_PATH
+Print the \fInode path\fR. See
+.BR grecs_stmt_path (5),
+for a description. If printed, the path is separated from the
+remaining output on its right by a semicolon and a space.
+.TP
+.B GRECS_NODE_FLAG_VALUE
+Print the node value.
+.TP
+.B GRECS_NODE_FLAG_QUOTE
+Always quote the value. By default, the value will be quoted only
+when necessary, i.e. if it contains white space, quotes or special
+characters. This option is useful only together with
+\fBGRECS_NODE_FLAG_VALUE\fR.
+.TP
+.B GRECS_NODE_FLAG_QUOTE_HEX
+Print non-printable characters as C hex escapets. This option is
+useful only together with \fBGRECS_NODE_FLAG_QUOTE\fR and
+\fBGRECS_NODE_FLAG_VALUE\fR.
+.TP
+.B GRECS_NODE_FLAG_DEFAULT
+Same as
+.sp
+.nf
+GRECS_NODE_FLAG_PATH|GRECS_NODE_FLAG_VALUE|GRECS_NODE_FLAG_QUOTE
+.PP
+If \fBflag\fR is 0, \fBGRECS_NODE_FLAG_DEFAULT\fR is assumed.
+.SH "RETURN VALUE"
+None.
+.SH "SEE ALSO"
+.BR grecs_config (5),
+.BR grecs_stmt_path (5).
+.SH AUTHORS
+Sergey Poznyakoff
+.SH "BUG REPORTS"
+Report bugs to <gray+grecs@gnu.org.ua>.
+.SH COLOPHON
+The \fBGrecs\fR library is constantly changing, so this manual page
+may be incorrect or out-of-date. For the latest copy of \fBGrecs\fR
+documentation, visit <http://www.gnu.org.ua/software/grecs>.
+.SH COPYRIGHT
+Copyright \(co 2011 Sergey Poznyakoff
+.br
+.na
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+.br
+.ad
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+.\" Local variables:
+.\" eval: (add-hook 'write-file-hooks 'time-stamp)
+.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_]* [0-9] \""
+.\" time-stamp-format: "%:B %:d, %:y"
+.\" time-stamp-end: "\""
+.\" time-stamp-line-limit: 20
+.\" end:
+

Return to:

Send suggestions and report system problems to the System administrator.