casacore
Loading...
Searching...
No Matches
MSFeedGram.h
Go to the documentation of this file.
1// # MSFeedGram.h: Grammar for ms feed sub-expressions
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: 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_MSFEEDGRAM_H
27#define MS_MSFEEDGRAM_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/casa/BasicSL/String.h>
32#include <casacore/casa/Arrays/Matrix.h>
33#include <casacore/ms/MSSel/MSFeedParse.h> // routines used by bison actions
34
35namespace casacore { // # NAMESPACE CASACORE - BEGIN
36
37// # Forward Declarations
38class MeasurementSet;
39class TableExprNode;
40
41// <summary>
42// Global functions for flex/bison scanner/parser for MSFeedGram
43// </summary>
44
45// <use visibility=local>
46
47// <reviewed reviewer="" date="" tests="">
48// </reviewed>
49
50// <prerequisite>
51// # Classes you should understand before using this one.
52// <li> MSFeedGram.l and .y (flex and bison grammar)
53// </prerequisite>
54
55// <synopsis>
56// Global functions are needed to define the input of the flex scanner
57// and to start the bison parser.
58// The input is taken from a string.
59// </synopsis>
60
61// <motivation>
62// It is necessary to be able to give an image expression in ASCII.
63// This can be used in glish.
64// </motivation>
65// <todo asof="$DATE:$">
66// # A List of bugs, limitations, extensions or planned refinements.
67// </todo>
68
69// <group name=MSFeedGramFunctions>
71// Declare the bison parser (is implemented by bison command).
72// It returns a TaQL expression tree.
74 const TableExprNode& col2TEN, const String& command,
75 Vector<Int>& selectedFeeds1, Vector<Int>& selectedFeeds2,
76 Matrix<Int>& selectedFeedPairs);
78 TableExprNode& col2TEN, const String& command,
79 Vector<Int>& selectedFeeds1, Vector<Int>& selectedFeeds2,
80 Matrix<Int>& selectedFeedPairs);
82 Vector<Int>& selectedFeeds1, Vector<Int>& selectedFeeds2,
83 Matrix<Int>& selectedFeedPairs);
84
86 Vector<Int>& selectedFeeds1, Vector<Int>& selectedFeeds2,
87 Matrix<Int>& selectedFeedPairs);
88// The yyerror function for the parser.
89// It throws an exception with the current token.
90void MSFeedGramerror(const char*);
91
92// Give the current position in the string.
93// This can be used when parse errors occur.
95
96// Declare the input routine for flex/bison.
97int msFeedGramInput(char* buf, int max_size);
98
99// A function to remove escaped characters.
100// String msFeedGramRemoveEscapes (const String& in);
101
102// A function to remove quotes from a quoted string.
103// String msFeedGramRemoveQuotes (const String& in);
104
105// </group>
106
107} // namespace casacore
108
109#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
TableExprNode msFeedGramParseCommand(Table &subTable, TableExprNode &col1TEN, TableExprNode &col2TEN, const String &command, Vector< Int > &selectedFeeds1, Vector< Int > &selectedFeeds2, Matrix< Int > &selectedFeedPairs)
TableExprNode msFeedGramParseCommand(MSFeedParse *thisParser, const TableExprNode &col1TEN, const TableExprNode &col2TEN, const String &command, Vector< Int > &selectedFeeds1, Vector< Int > &selectedFeeds2, Matrix< Int > &selectedFeedPairs)
Declare the bison parser (is implemented by bison command).
int msFeedGramInput(char *buf, int max_size)
Declare the input routine for flex/bison.
Int & msFeedGramPosition()
Give the current position in the string.
TableExprNode msFeedGramParseCommand(const MeasurementSet *ms, const String &command, Vector< Int > &selectedFeeds1, Vector< Int > &selectedFeeds2, Matrix< Int > &selectedFeedPairs)
void MSFeedGramerror(const char *)
The yyerror function for the parser.
TableExprNode baseMSFeedGramParseCommand(MSFeedParse *parser, const String &command, Vector< Int > &selectedFeeds1, Vector< Int > &selectedFeeds2, Matrix< Int > &selectedFeedPairs)