casacore
Loading...
Searching...
No Matches
MSFieldGram.h
Go to the documentation of this file.
1// # MSFieldGram.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_MSFIELDGRAM_H
27#define MS_MSFIELDGRAM_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/casa/BasicSL/String.h>
32#include <casacore/ms/MSSel/MSFieldParse.h>
33
34namespace casacore { // # NAMESPACE CASACORE - BEGIN
35
36// # Forward Declarations
37class MeasurementSet;
38class TableExprNode;
39
40// <summary>
41// Global functions for flex/bison scanner/parser for MSFieldGram
42// </summary>
43
44// <use visibility=local>
45
46// <reviewed reviewer="" date="" tests="">
47// </reviewed>
48
49// <prerequisite>
50// # Classes you should understand before using this one.
51// <li> MSFieldGram.l and .y (flex and bison grammar)
52// </prerequisite>
53
54// <synopsis>
55// Global functions are needed to define the input of the flex scanner
56// and to start the bison parser.
57// The input is taken from a string.
58// </synopsis>
59
60// <motivation>
61// It is necessary to be able to give an image expression in ASCII.
62// This can be used in glish.
63// </motivation>
64// <todo asof="$DATE:$">
65// # A List of bugs, limitations, extensions or planned refinements.
66// </todo>
67
68// <group name=MSFieldGramFunctions>
70// Declare the bison parser (is implemented by bison command).
71// TableExprNode msFieldGramParseCommand (const MeasurementSet *ms, const String& command);
72// TableExprNode msFieldGramParseCommand (MSSelectableTable *ms, const String&
73// command,Vector<Int>&); TableExprNode msFieldGramParseCommand (const MeasurementSet *ms, const
74// String& command,Vector<Int>&);
75TableExprNode msFieldGramParseCommand(const MSField& fieldSubTable, const TableExprNode& colAsTEN,
76 const String& command, Vector<Int>&);
79
80// The yyerror function for the parser.
81// It throws an exception with the current token.
82void MSFieldGramerror(const char*);
83
84// Give the table expression node.
87
88// Give the current position in the string.
89// This can be used when parse errors occur.
91
92// Declare the input routine for flex/bison.
93int msFieldGramInput(char* buf, int max_size);
94
95// A function to remove escaped characters.
96// String msFieldGramRemoveEscapes (const String& in);
97
98// A function to remove quotes from a quoted string.
99// String msFieldGramRemoveQuotes (const String& in);
100
101// </group>
102
103} // namespace casacore
104
105#endif
Class to hold values from field grammar parser.
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 msFieldGramParseCommand(const MSField &fieldSubTable, const TableExprNode &colAsTEN, const String &command, Vector< Int > &)
Declare the bison parser (is implemented by bison command).
TableExprNode baseMSFieldGramParseCommand(MSFieldParse *parser, const String &command, Vector< Int > &)
Int & msFieldGramPosition()
Give the current position in the string.
const TableExprNode * msFieldGramParseNode()
Give the table expression node.
int msFieldGramInput(char *buf, int max_size)
Declare the input routine for flex/bison.
void MSFieldGramerror(const char *)
The yyerror function for the parser.