casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalLibraryTools.h
Go to the documentation of this file.
1 //# CalLibraryTools.h: access to cal library file parser
2 //# Copyright (C) 2015
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //
27 #ifndef CALLIB_CALLIBRARYTOOLS_H
28 #define CALLIB_CALLIBRARYTOOLS_H
29 
30 #include <casacore/casa/aips.h>
34 
35 namespace casa {
36 
37 // <summary>
38 // Interface to flex/bison scanner/parser for a CalLibrary file.
39 // The calibration instructions are returned in a Record.
40 // </summary>
41 
42 // <use visibility=local>
43 
44 // <prerequisite>
45 //# Classes you should understand before using this one.
46 // <li> CalLibraryGram.l and .y (flex and bison grammar)
47 // </prerequisite>
48 
49 // <synopsis>
50 // Global functions are needed to define the input of the flex scanner
51 // and to start the bison parser.
52 // The input is taken from a cal library file or string (basically the
53 // contents of the file).
54 // </synopsis>
55 
56 // The casacore::Record for the specified file is filled in by the parser.
58 
59 // Declare the bison parser (is implemented by bison command).
60 casacore::Record calLibraryGramParseCommand(CalLibraryParse* parser, const casacore::String& calLibrary);
61 
62 // The yyerror function for the parser.
63 // It throws an exception with the current token.
64 void CalLibraryGramerror(const char* s);
65 
66 // Declare the input routine for flex/bison.
67 int calLibraryGramInput (char* buf, int max_size);
68 void clearBuf(char* buf, int size);
69 
70 // Current line number in file, for parse errors
72 
73 // Give the Record
75 }
76 
77 #endif
int Int
Definition: aipstype.h:50
casacore::Record callibSetParams(const casacore::String &calLibrary)
Interface to flex/bison scanner/parser for a CalLibrary file. The calibration instructions are return...
const casacore::Record * calLibraryRecord()
Give the Record.
size_t size() const
A hierarchical collection of named fields of various types.
Definition: Record.h:180
int calLibraryGramInput(char *buf, int max_size)
Declare the input routine for flex/bison.
casacore::Int & calLibLineNum()
Current line number in file, for parse errors.
void CalLibraryGramerror(const char *s)
The yyerror function for the parser.
void clearBuf(char *buf, int size)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::Record calLibraryGramParseCommand(CalLibraryParse *parser, const casacore::String &calLibrary)
Declare the bison parser (is implemented by bison command).