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