casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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: 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 //# $Id$
27 
28 #ifndef MS_MSSPWGRAM_H
29 #define MS_MSSPWGRAM_H
30 
31 
32 //# Includes
33 #include <casacore/casa/aips.h>
35 
36 namespace casacore { //# NAMESPACE CASACORE - BEGIN
37 
38  //# Forward Declarations
39  class MeasurementSet;
40  class TableExprNode;
41 
42  // <summary>
43  // Global functions for flex/bison scanner/parser for MSSpwGram
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> MSSpwGram.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=MSSpwGramFunctions>
72 
73  // Declare the bison parser (is implemented by bison command).
74  int msSpwGramParseCommand (const MeasurementSet *ms, const String& command);
75  int msSpwGramParseCommand (const MeasurementSet *ms, const String& command,
76  Vector<Int>& selectedIDs, Matrix<Int>& selectedChanIDs);
77  int msSpwGramParseCommand (const MSSpectralWindow& spwSubTable, const MSDataDescription& ddSubTable,
78  const TableExprNode& colAsTEN,
79  const String& command,
80  Vector<Int>& selectedIDs,
81  Matrix<Int>& selectedChans,
82  Vector<Int>& selectedDDIDs) ;
83 
84  // The yyerror function for the parser.
85  // It throws an exception with the current token.
86  void MSSpwGramerror (const char*);
87 
88  // Give the table expression node.
89  const TableExprNode *msSpwGramParseNode();
90  void msSpwGramParseDeleteNode();
91 
92  // Give the current position in the string.
93  // This can be used when parse errors occur.
94  Int& msSpwGramPosition();
95 
96  // Declare the input routine for flex/bison.
97  int msSpwGramInput (char* buf, int max_size);
98 
99  // A function to remove escaped characters.
100  //String msSpwGramRemoveEscapes (const String& in);
101 
102  // A function to remove quotes from a quoted string.
103  //String msSpwGramRemoveQuotes (const String& in);
104 
105  // </group>
106 
107 } //# NAMESPACE CASACORE - END
108 
109 #endif
int Int
Definition: aipstype.h:50
A Table intended to hold a MeasurementSet DATADESCRIPTION table.
Handle class for a table column expression tree.
Definition: ExprNode.h:155
A Table intended to hold astronomical data (a set of Measurements).
String: the storage and methods of handling collections of characters.
Definition: String.h:223
A Table intended to hold a MeasurementSet SPECTRAL_WINDOW table.
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42