casacore
Loading...
Searching...
No Matches
MSSpwGram.h
Go to the documentation of this file.
1// # MSSpwGram.h: Grammar for ms field sub-expressions
2// # Copyright (C) 1998
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: casa-feedback@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#ifndef MS_MSSPWGRAM_H
27#define MS_MSSPWGRAM_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/casa/BasicSL/String.h>
32
33namespace casacore { // # NAMESPACE CASACORE - BEGIN
34
35// # Forward Declarations
36class MeasurementSet;
37class TableExprNode;
38
39// <summary>
40// Global functions for flex/bison scanner/parser for MSSpwGram
41// </summary>
42
43// <use visibility=local>
44
45// <reviewed reviewer="" date="" tests="">
46// </reviewed>
47
48// <prerequisite>
49// # Classes you should understand before using this one.
50// <li> MSSpwGram.l and .y (flex and bison grammar)
51// </prerequisite>
52
53// <synopsis>
54// Global functions are needed to define the input of the flex scanner
55// and to start the bison parser.
56// The input is taken from a string.
57// </synopsis>
58
59// <motivation>
60// It is necessary to be able to give an image expression in ASCII.
61// This can be used in glish.
62// </motivation>
63// <todo asof="$DATE:$">
64// # A List of bugs, limitations, extensions or planned refinements.
65// </todo>
66
67// <group name=MSSpwGramFunctions>
69// Declare the bison parser (is implemented by bison command).
70int msSpwGramParseCommand(const MeasurementSet* ms, const String& command);
71int msSpwGramParseCommand(const MeasurementSet* ms, const String& command, Vector<Int>& selectedIDs,
72 Matrix<Int>& selectedChanIDs);
73int msSpwGramParseCommand(const MSSpectralWindow& spwSubTable, const MSDataDescription& ddSubTable,
74 const TableExprNode& colAsTEN, const String& command,
75 Vector<Int>& selectedIDs, Matrix<Int>& selectedChans,
76 Vector<Int>& selectedDDIDs);
77
78// The yyerror function for the parser.
79// It throws an exception with the current token.
80void MSSpwGramerror(const char*);
81
82// Give the table expression node.
85
86// Give the current position in the string.
87// This can be used when parse errors occur.
89
90// Declare the input routine for flex/bison.
91int msSpwGramInput(char* buf, int max_size);
92
93// A function to remove escaped characters.
94// String msSpwGramRemoveEscapes (const String& in);
95
96// A function to remove quotes from a quoted string.
97// String msSpwGramRemoveQuotes (const String& in);
98
99// </group>
100
101} // namespace casacore
102
103#endif
String: the storage and methods of handling collections of characters.
Definition String.h:355
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
int Int
Definition aipstype.h:48
int msSpwGramParseCommand(const MeasurementSet *ms, const String &command)
Declare the bison parser (is implemented by bison command).
void MSSpwGramerror(const char *)
The yyerror function for the parser.
int msSpwGramParseCommand(const MSSpectralWindow &spwSubTable, const MSDataDescription &ddSubTable, const TableExprNode &colAsTEN, const String &command, Vector< Int > &selectedIDs, Matrix< Int > &selectedChans, Vector< Int > &selectedDDIDs)
int msSpwGramParseCommand(const MeasurementSet *ms, const String &command, Vector< Int > &selectedIDs, Matrix< Int > &selectedChanIDs)
int msSpwGramInput(char *buf, int max_size)
Declare the input routine for flex/bison.
Int & msSpwGramPosition()
Give the current position in the string.
const TableExprNode * msSpwGramParseNode()
Give the table expression node.