IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1753


Ignore:
Timestamp:
Sep 8, 2004, 5:18:19 PM (22 years ago)
Author:
Paul Price
Message:

psLogMsg now goes multiple lines. Added grammar for configuration files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibSDRS.tex

    r1711 r1753  
    1 %%% $Id: psLibSDRS.tex,v 1.113 2004-09-07 23:36:23 eugene Exp $
     1%%% $Id: psLibSDRS.tex,v 1.114 2004-09-09 03:18:19 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    925925the form:
    926926\begin{verbatim}
    927 YYYY:MM:DD hh:mm:ssZ | hostname | L | name            | msg
     927YYYY:MM:DD hh:mm:ssZ | hostname | L | name
     928    The message goes here
     929    and is indented by 4 spaces.
    928930\end{verbatim}
    929931where \code{YYYY}, \code{MM}, \code{DD}, \code{hh}, \code{mm}, and
     
    937939respectively. Other levels are represented numerically (\code{5}
    938940etc.). The other two fields, \code{name} and \code{msg}, are the
    939 arguments to \code{psLogMsg}; note that \code{name} has a fixed width
    940 of 15 characters. If \code{msg} doesn't end in a newline, a single
    941 newline is emitted to terminate the message.  An example message is:
    942 %
    943 \begin{verbatim}
    944 2004:02:24 20:14:18Z | alibaba.IfA.Hawaii.Edu |I | utils          | Hello World
     941arguments to \code{psLogMsg}.  The \code{msg} is placed on a new line
     942(allowing the \code{name} to fill the rest of the previous line),
     943with each line indented by 4 spaces.  An example message is:
     944%
     945\begin{verbatim}
     9462004:02:24 20:14:18Z | alibaba.IfA.Hawaii.Edu | I | example.utils.helloWorld
     947    Hello world,
     948    it's me calling.
    945949\end{verbatim}
    946950%
     
    35433547
    35443548\subsubsection{Configuration files}
     3549\label{sec:configspec}
    35453550
    35463551It will be necessary for the \PS{} system, in order to load
     
    36543659files.
    36553660
     3661A BNF-like grammar of the configuration file is contained in
     3662\S\ref{sec:configgrammar}.
    36563663
    36573664\subsection{Detector and sky positions}
     
    40494056\appendix
    40504057
    4051 %\pagebreak
    4052 %\section{API Summary: all functions}
    4053 
    4054 %\subsection{System Utilities}
    4055 %\input{psSystemGroup.tex}
    4056 
    4057 %\subsection{Data Containers}
    4058 %\input{psDataGroup.tex}
    4059 
    4060 %\subsection{Math Utilities}
    4061 %\input{psMathGroup.tex}
    4062  
    4063 %\subsection{Astronomy Functions}
    4064 %\input{psAstroGroup.tex}
    4065 
    4066 %\pagebreak
    4067 %\section{API Summary: all structures}
    4068 %\input{psStructures.tex}
     4058\section{Configuration File Grammar}
     4059\label{sec:configgrammar}
     4060
     4061Here follows a BNF-like grammar for the configuration files specified
     4062in \S\ref{sec:configspec}, suitable for use with
     4063\code{Parse::RecDescent}\footnote{\code{http://search.cpan.org/}$\sim$\code{dconway/Parse-RecDescent-1.94/lib/Parse/RecDescent.pod}}.
     4064
     4065\begin{verbatim}
     4066startrule: line(s) /\z/
     4067
     4068line: scalar | vector | multi_declare | comment
     4069
     4070comment: '#' end_of_line
     4071
     4072scalar: name type value comment | name type value
     4073
     4074vector: vname vtype vvalue comment | vname vtype vvalue
     4075
     4076multi_declare: name '*' end_of_line
     4077
     4078name: /[a-z]\w*/i
     4079
     4080vname: /\@[a-z]\w*/i
     4081
     4082type:
     4083    vtype | 'STR' | 'STRING'
     4084
     4085vtype:
     4086    'S8'  |
     4087    'S16' |
     4088    'S32' |
     4089    'S64' |
     4090    'U8'  |
     4091    'U16' |
     4092    'U32' |
     4093    'U64' |
     4094    'F32' |
     4095    'F64' |
     4096    'C32' |
     4097    'C64' |
     4098    'BOOL'
     4099
     4100value: float | int | bool | string
     4101
     4102vvalue: vector_type vector_sep vvalue | vector_type vector_sep(?)
     4103
     4104vector_sep: ','
     4105
     4106vector_type: float | int | bool
     4107
     4108int: integer_constant
     4109
     4110float: floating_constant
     4111
     4112bool: /[tf]\s+?/i
     4113
     4114string:
     4115    /\w[^#\n]*/
     4116
     4117end_of_line: /[^\n]*/
     4118
     4119### based on syntax found in "C A Reference Manual"
     4120
     4121# integer constants
     4122
     4123integer_constant:
     4124    decimal_constant integer_suffix(?) |
     4125    octal_constant integer_suffix(?) |
     4126    hexadecimal_constant integer_suffix(?)
     4127
     4128decimal_constant:
     4129    digit(s) |
     4130    nonzero_digit
     4131
     4132octal_constant:
     4133    '0' octal_digit |
     4134    '0'
     4135   
     4136hexadecimal_constant:
     4137    /0x/i hex_digit(s)
     4138
     4139digit:
     4140    /[0-9]/
     4141
     4142nonzero_digit:
     4143    /[1-9]/
     4144
     4145octal_digit:
     4146    /[0-7]/
     4147
     4148hex_digit:
     4149    /0_9a-f/i
     4150
     4151integer_suffix:
     4152    long_suffix unsigned_suffix(?) |
     4153    long_long_suffix unsigned_suffix(?) |
     4154    unsigned_suffix long_suffix(?) |
     4155    unsigned_suffix long_long_suffix(?)
     4156
     4157long_suffix:
     4158    /l/i
     4159
     4160long_long_suffix:
     4161    /ll/i
     4162
     4163unsigned_suffix:
     4164    /u/i
     4165
     4166# floating-point constants
     4167
     4168floating_constant:
     4169    decimal_floating_constant |
     4170    hexadecimal_floating_constant
     4171
     4172decimal_floating_constant:
     4173    digit_sequence exponent floating_suffix(?) |
     4174    dotted_digits exponent(?) floating_suffix(?)
     4175
     4176digit_sequence:
     4177    digit(s) |
     4178    digit
     4179
     4180dotted_digits:
     4181    digit_sequence '.' digit_sequence  |
     4182    '.' digit_sequence |
     4183    digit_sequence '.'
     4184
     4185exponent:
     4186    /e/i sign_part digit_sequence
     4187
     4188sign_part:
     4189    /[+-]/
     4190
     4191floating_suffix:
     4192    /[fl]/i
     4193
     4194hexadecimal_floating_constant:
     4195    hex_prefix dotted_hex_digits binary_exponent floating_suffix(?) |
     4196    hex_prefix hex_digit_sequence binary_exponent floating_suffix(?)
     4197
     4198hex_prefix:
     4199    /0x/i
     4200
     4201dotted_hex_digits:
     4202    hex_digit_sequence '.' hex_digit_sequence |
     4203    '.' hex_digit_sequence |
     4204    hex_digit_sequence '.'
     4205
     4206hex_digit_sequence:
     4207    hex_digit(s)
     4208
     4209binary_exponent:
     4210    /p/i sign_part(?) digit_sequence
     4211\end{verbatim}
    40694212
    40704213\section{Revision Change Log}
    40714214\input{ChangeLogSDRS.tex}
    40724215
    4073 %\bibliographystyle{plain} \bibliography{panstarrs}
    4074 
    40754216\end{document}
Note: See TracChangeset for help on using the changeset viewer.