casa
$Rev:20696$
|
00001 //# MSSpwGram.h: Grammar for ms field sub-expressions 00002 //# Copyright (C) 1998 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# $Id: MSSpwGram.h 20652 2009-07-06 05:04:32Z Malte.Marquarding $ 00027 00028 #ifndef MS_MSSPWGRAM_H 00029 #define MS_MSSPWGRAM_H 00030 00031 00032 //# Includes 00033 #include <casa/BasicSL/String.h> 00034 00035 namespace casa { //# NAMESPACE CASA - BEGIN 00036 00037 //# Forward Declarations 00038 class MeasurementSet; 00039 class TableExprNode; 00040 00041 // <summary> 00042 // Global functions for flex/bison scanner/parser for MSSpwGram 00043 // </summary> 00044 00045 // <use visibility=local> 00046 00047 // <reviewed reviewer="" date="" tests=""> 00048 // </reviewed> 00049 00050 // <prerequisite> 00051 //# Classes you should understand before using this one. 00052 // <li> MSSpwGram.l and .y (flex and bison grammar) 00053 // </prerequisite> 00054 00055 // <synopsis> 00056 // Global functions are needed to define the input of the flex scanner 00057 // and to start the bison parser. 00058 // The input is taken from a string. 00059 // </synopsis> 00060 00061 // <motivation> 00062 // It is necessary to be able to give an image expression in ASCII. 00063 // This can be used in glish. 00064 // </motivation> 00065 // <todo asof="$DATE:$"> 00066 //# A List of bugs, limitations, extensions or planned refinements. 00067 // </todo> 00068 00069 00070 // <group name=MSSpwGramFunctions> 00071 00072 // Declare the bison parser (is implemented by bison command). 00073 int msSpwGramParseCommand (const MeasurementSet *ms, const String& command); 00074 int msSpwGramParseCommand (const MeasurementSet *ms, const String& command, 00075 Vector<Int>& selectedIDs, Matrix<Int>& selectedChanIDs); 00076 int msSpwGramParseCommand (const MSSpectralWindow& spwSubTable, const MSDataDescription& ddSubTable, 00077 const TableExprNode& colAsTEN, 00078 const String& command,Vector<Int>& selectedIDs, 00079 Matrix<Int>& selectedChans) ; 00080 00081 // The yyerror function for the parser. 00082 // It throws an exception with the current token. 00083 void MSSpwGramerror (const char*); 00084 00085 // Give the table expression node. 00086 const TableExprNode *msSpwGramParseNode(); 00087 void msSpwGramParseDeleteNode(); 00088 00089 // Give the current position in the string. 00090 // This can be used when parse errors occur. 00091 Int& msSpwGramPosition(); 00092 00093 // Declare the input routine for flex/bison. 00094 int msSpwGramInput (char* buf, int max_size); 00095 00096 // A function to remove escaped characters. 00097 //String msSpwGramRemoveEscapes (const String& in); 00098 00099 // A function to remove quotes from a quoted string. 00100 //String msSpwGramRemoveQuotes (const String& in); 00101 00102 // </group> 00103 00104 } //# NAMESPACE CASA - END 00105 00106 #endif