Changeset 3499 for trunk/doc/pslib/psLibSDRS.tex
- Timestamp:
- Mar 24, 2005, 1:20:55 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r3449 r3499 1 %%% $Id: psLibSDRS.tex,v 1.1 89 2005-03-18 20:44:45 jhoblitt Exp $1 %%% $Id: psLibSDRS.tex,v 1.190 2005-03-24 23:20:55 jhoblitt Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 4254 4254 @primes U8 2,3 5 7,11,13 17 # These are prime numbers 4255 4255 4256 comment * # This is a comment in the ITEM_SET item4256 comment MULTI # The rest of this line is ignored, but `comment' is set to be non-unique 4257 4257 comment STR This 4258 4258 comment STR is … … 4309 4309 \end{verbatim} 4310 4310 4311 A BNF-like grammar of the configuration fileis contained in4312 \S\ref{sec:config grammar}.4311 A series of test inputs is contained in 4312 \S\ref{sec:configtest}. 4313 4313 4314 4314 \subsection{XML Functions} … … 5327 5327 \appendix 5328 5328 5329 \section{Configuration File Grammar} 5330 \label{sec:configgrammar} 5331 5332 Here follows a BNF-like grammar for the configuration files specified 5333 in \S\ref{sec:configspec}, suitable for use with 5334 \code{Parse::RecDescent}\footnote{\code{http://search.cpan.org/}$\sim$\code{dconway/Parse-RecDescent-1.94/lib/Parse/RecDescent.pod}}. 5335 5336 \begin{verbatim} 5337 startrule: statement(s) /\z/ 5338 5339 statement: scalar | vector | multi_declare | comment 5340 5341 comment: '#' end_of_line 5342 5343 scalar: name type value comment | name type value 5344 5345 vector: vname vtype vvalue comment | vname vtype vvalue 5346 5347 multi_declare: name '*' end_of_line 5348 5349 name: /[a-z][.\w]*/i 5350 5351 vname: /\@[a-z][.\w]*/i 5352 5353 type: 5354 vtype | 'STR' | 'STRING' 5355 5356 vtype: 5357 'S8' | 5358 'S16' | 5359 'S32' | 5360 'S64' | 5361 'U8' | 5362 'U16' | 5363 'U32' | 5364 'U64' | 5365 'F32' | 5366 'F64' | 5367 'C32' | 5368 'C64' | 5369 'BOOL' 5370 5371 value: vector_value | string 5372 5373 vvalue: vector_value vector_sep vvalue | vector_value vector_sep(?) 5374 5375 vector_sep: ',' 5376 5377 vector_value: float | int | bool 5378 5379 int: integer_constant 5380 5381 float: floating_constant 5382 5383 bool: /[tf]\s+?/i 5384 5385 string: 5386 /\S[^#\n]*/ 5387 5388 end_of_line: /[^\n]*/ 5389 5390 ### based on syntax found in "C A Reference Manual" 5391 5392 # integer constants 5393 5394 integer_constant: 5395 decimal_constant integer_suffix(?) | 5396 octal_constant integer_suffix(?) | 5397 hexadecimal_constant integer_suffix(?) 5398 5399 decimal_constant: 5400 digit(2..) | 5401 nonzero_digit 5402 5403 octal_constant: 5404 '0' octal_digit(s) | 5405 '0' 5406 5407 hexadecimal_constant: 5408 hex_prefix hex_digit_sequence 5409 5410 digit: 5411 /[0-9]/ 5412 5413 nonzero_digit: 5414 /[1-9]/ 5415 5416 octal_digit: 5417 /[0-7]/ 5418 5419 hex_digit: 5420 /0_9a-f/i 5421 5422 integer_suffix: 5423 long_suffix unsigned_suffix(?) | 5424 long_long_suffix unsigned_suffix(?) | 5425 unsigned_suffix long_suffix(?) | 5426 unsigned_suffix long_long_suffix(?) 5427 5428 long_suffix: 5429 /l/i 5430 5431 long_long_suffix: 5432 /ll/i 5433 5434 unsigned_suffix: 5435 /u/i 5436 5437 # floating-point constants 5438 5439 floating_constant: 5440 decimal_floating_constant | 5441 hexadecimal_floating_constant 5442 5443 decimal_floating_constant: 5444 digit_sequence exponent floating_suffix(?) | 5445 dotted_digits exponent(?) floating_suffix(?) 5446 5447 digit_sequence: 5448 digit(s) 5449 5450 dotted_digits: 5451 digit_sequence '.' digit_sequence | 5452 '.' digit_sequence | 5453 digit_sequence '.' 5454 5455 exponent: 5456 /e/i sign_part digit_sequence 5457 5458 sign_part: 5459 /[+-]/ 5460 5461 floating_suffix: 5462 /[fl]/i 5463 5464 hexadecimal_floating_constant: 5465 hex_prefix dotted_hex_digits binary_exponent floating_suffix(?) | 5466 hex_prefix hex_digit_sequence binary_exponent floating_suffix(?) 5467 5468 hex_prefix: 5469 /0x/i 5470 5471 dotted_hex_digits: 5472 hex_digit_sequence '.' hex_digit_sequence | 5473 '.' hex_digit_sequence | 5474 hex_digit_sequence '.' 5475 5476 hex_digit_sequence: 5477 hex_digit(s) 5478 5479 binary_exponent: 5480 /p/i sign_part(?) digit_sequence 5481 \end{verbatim} 5329 \section{Configuration File Test Inputs} 5330 \label{sec:configtest} 5331 5332 Here are a series of test inputs for the Configuration File syntax defined in 5333 \S\ref{sec:configspec}. 5334 5335 \input{configFileTests.tex} 5482 5336 5483 5337 \section{Revision Change Log}
Note:
See TracChangeset
for help on using the changeset viewer.
