casacore
MSObservationGram.h
Go to the documentation of this file.
1 //# MSObservationGram.h: Grammar for ms scan 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_MSOBSERVATIONGRAM_H
29 #define MS_MSOBSERVATIONGRAM_H
30 
31 
32 //# Includes
33 #include <casacore/casa/aips.h>
34 #include <casacore/ms/MSSel/MSObservationParse.h>
35 #include <casacore/casa/BasicSL/String.h>
36 
37 namespace casacore { //# NAMESPACE CASACORE - BEGIN
38 
39 //# Forward Declarations
40 class MeasurementSet;
41 class TableExprNode;
42 
43 // <summary>
44 // Global functions for flex/bison scanner/parser for MSObservationGram
45 // </summary>
46 
47 // <use visibility=local>
48 
49 // <reviewed reviewer="" date="" tests="">
50 // </reviewed>
51 
52 // <prerequisite>
53 //# Classes you should understand before using this one.
54 // <li> MSObservationGram.l and .y (flex and bison grammar)
55 // </prerequisite>
56 
57 // <synopsis>
58 // Global functions are needed to define the input of the flex scanner
59 // and to start the bison parser.
60 // The input is taken from a string.
61 // </synopsis>
62 
63 // <motivation>
64 // It is necessary to be able to give an image expression in ASCII.
65 // This can be used in glish.
66 // </motivation>
67 // <todo asof="$DATE:$">
68 //# A List of bugs, limitations, extensions or planned refinements.
69 // </todo>
70 
71 
72 // <group name=MSObservationGramFunctions>
73 
74 // Declare the bison parser (is implemented by bison command).
76  const MSObservation& obsSubTable,
77  const TableExprNode& colAsTEN,
78  const String& command,
79  Vector<Int>& idList);
80 
82  const TableExprNode& colAsTEN,
83  const String& command,
84  Vector<Int>& selectedIDs);
85  // The yyerror function for the parser.
86  // It throws an exception with the current token.
87  void MSObservationGramerror (const char*);
88 
89  // Give the table expression node.
90  //const TableExprNode *msObservationGramParseNode();
92 
93  // Give the current position in the string.
94  // This can be used when parse errors occur.
96 
97  // Declare the input routine for flex/bison.
98  int msObservationGramInput (char* buf, int max_size);
99 
100  // A function to remove escaped characters.
101  //String msObservationGramRemoveEscapes (const String& in);
102 
103  // A function to remove quotes from a quoted string.
104  //String msObservationGramRemoveQuotes (const String& in);
105 
106  // </group>
107 
108 } //# NAMESPACE CASACORE - END
109 
110 #endif
String: the storage and methods of handling collections of characters.
Definition: String.h:225
this file contains all the compiler specific defines
Definition: mainpage.dox:28
int Int
Definition: aipstype.h:50
void msObservationGramParseDeleteNode()
Give the table expression node.
Int & msObservationGramPosition()
Give the current position in the string.
void MSObservationGramerror(const char *)
The yyerror function for the parser.
int msObservationGramInput(char *buf, int max_size)
Declare the input routine for flex/bison.
TableExprNode msObservationGramParseCommand(const MeasurementSet *ms, const MSObservation &obsSubTable, const TableExprNode &colAsTEN, const String &command, Vector< Int > &idList)
Declare the bison parser (is implemented by bison command).
TableExprNode baseMSObservationGramParseCommand(MSObservationParse *parser, const TableExprNode &colAsTEN, const String &command, Vector< Int > &selectedIDs)