Index: trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- trunk/doc/pslib/psLibSDRS.tex	(revision 1711)
+++ trunk/doc/pslib/psLibSDRS.tex	(revision 1753)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.113 2004-09-07 23:36:23 eugene Exp $
+%%% $Id: psLibSDRS.tex,v 1.114 2004-09-09 03:18:19 price Exp $
 \documentclass[panstarrs,spec]{panstarrs}
 
@@ -925,5 +925,7 @@
 the form:
 \begin{verbatim}
-YYYY:MM:DD hh:mm:ssZ | hostname | L | name            | msg
+YYYY:MM:DD hh:mm:ssZ | hostname | L | name
+    The message goes here
+    and is indented by 4 spaces.
 \end{verbatim}
 where \code{YYYY}, \code{MM}, \code{DD}, \code{hh}, \code{mm}, and
@@ -937,10 +939,12 @@
 respectively. Other levels are represented numerically (\code{5}
 etc.). The other two fields, \code{name} and \code{msg}, are the
-arguments to \code{psLogMsg}; note that \code{name} has a fixed width
-of 15 characters. If \code{msg} doesn't end in a newline, a single
-newline is emitted to terminate the message.  An example message is:
-%
-\begin{verbatim}
-2004:02:24 20:14:18Z | alibaba.IfA.Hawaii.Edu |I | utils          | Hello World
+arguments to \code{psLogMsg}.  The \code{msg} is placed on a new line
+(allowing the \code{name} to fill the rest of the previous line),
+with each line indented by 4 spaces.  An example message is:
+%
+\begin{verbatim}
+2004:02:24 20:14:18Z | alibaba.IfA.Hawaii.Edu | I | example.utils.helloWorld
+    Hello world,
+    it's me calling.
 \end{verbatim}
 %
@@ -3543,4 +3547,5 @@
 
 \subsubsection{Configuration files}
+\label{sec:configspec}
 
 It will be necessary for the \PS{} system, in order to load
@@ -3654,4 +3659,6 @@
 files.
 
+A BNF-like grammar of the configuration file is contained in
+\S\ref{sec:configgrammar}.
 
 \subsection{Detector and sky positions}
@@ -4049,27 +4056,161 @@
 \appendix
 
-%\pagebreak
-%\section{API Summary: all functions}
-
-%\subsection{System Utilities}
-%\input{psSystemGroup.tex}
-
-%\subsection{Data Containers}
-%\input{psDataGroup.tex}
-
-%\subsection{Math Utilities}
-%\input{psMathGroup.tex}
- 
-%\subsection{Astronomy Functions}
-%\input{psAstroGroup.tex}
-
-%\pagebreak
-%\section{API Summary: all structures}
-%\input{psStructures.tex}
+\section{Configuration File Grammar}
+\label{sec:configgrammar}
+
+Here follows a BNF-like grammar for the configuration files specified
+in \S\ref{sec:configspec}, suitable for use with
+\code{Parse::RecDescent}\footnote{\code{http://search.cpan.org/}$\sim$\code{dconway/Parse-RecDescent-1.94/lib/Parse/RecDescent.pod}}.
+
+\begin{verbatim}
+startrule: line(s) /\z/
+
+line: scalar | vector | multi_declare | comment
+
+comment: '#' end_of_line
+
+scalar: name type value comment | name type value 
+
+vector: vname vtype vvalue comment | vname vtype vvalue 
+
+multi_declare: name '*' end_of_line
+
+name: /[a-z]\w*/i
+
+vname: /\@[a-z]\w*/i
+
+type: 
+    vtype | 'STR' | 'STRING'
+
+vtype: 
+    'S8'  |
+    'S16' |
+    'S32' |
+    'S64' |
+    'U8'  |
+    'U16' |
+    'U32' |
+    'U64' |
+    'F32' |
+    'F64' |
+    'C32' |
+    'C64' |
+    'BOOL'
+
+value: float | int | bool | string
+
+vvalue: vector_type vector_sep vvalue | vector_type vector_sep(?)
+
+vector_sep: ','
+
+vector_type: float | int | bool
+
+int: integer_constant
+
+float: floating_constant
+
+bool: /[tf]\s+?/i
+
+string:
+    /\w[^#\n]*/
+
+end_of_line: /[^\n]*/
+
+### based on syntax found in "C A Reference Manual"
+
+# integer constants
+
+integer_constant:
+    decimal_constant integer_suffix(?) |
+    octal_constant integer_suffix(?) |
+    hexadecimal_constant integer_suffix(?)
+
+decimal_constant:
+    digit(s) |
+    nonzero_digit
+
+octal_constant:
+    '0' octal_digit |
+    '0'
+   
+hexadecimal_constant:
+    /0x/i hex_digit(s)
+
+digit:
+    /[0-9]/
+
+nonzero_digit:
+    /[1-9]/
+
+octal_digit:
+    /[0-7]/
+
+hex_digit:
+    /0_9a-f/i
+
+integer_suffix:
+    long_suffix unsigned_suffix(?) |
+    long_long_suffix unsigned_suffix(?) |
+    unsigned_suffix long_suffix(?) |
+    unsigned_suffix long_long_suffix(?)
+
+long_suffix:
+    /l/i
+
+long_long_suffix:
+    /ll/i
+
+unsigned_suffix:
+    /u/i
+
+# floating-point constants
+
+floating_constant:
+    decimal_floating_constant |
+    hexadecimal_floating_constant
+
+decimal_floating_constant:
+    digit_sequence exponent floating_suffix(?) |
+    dotted_digits exponent(?) floating_suffix(?)
+
+digit_sequence:
+    digit(s) |
+    digit 
+
+dotted_digits:
+    digit_sequence '.' digit_sequence  |
+    '.' digit_sequence |
+    digit_sequence '.'
+
+exponent:
+    /e/i sign_part digit_sequence
+
+sign_part:
+    /[+-]/
+
+floating_suffix:
+    /[fl]/i
+
+hexadecimal_floating_constant:
+    hex_prefix dotted_hex_digits binary_exponent floating_suffix(?) |
+    hex_prefix hex_digit_sequence binary_exponent floating_suffix(?)
+
+hex_prefix:
+    /0x/i
+
+dotted_hex_digits:
+    hex_digit_sequence '.' hex_digit_sequence |
+    '.' hex_digit_sequence |
+    hex_digit_sequence '.'
+
+hex_digit_sequence:
+    hex_digit(s) 
+
+binary_exponent:
+    /p/i sign_part(?) digit_sequence
+\end{verbatim}
 
 \section{Revision Change Log}
 \input{ChangeLogSDRS.tex}
 
-%\bibliographystyle{plain} \bibliography{panstarrs}
-
 \end{document}
