casacore
TableGram.h
Go to the documentation of this file.
1//# TableGram.h: Grammar for table command lines
2//# Copyright (C) 1993,1994,1995,1997,1999
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 TABLES_TABLEGRAM_H
29#define TABLES_TABLEGRAM_H
30
31//# Includes
32#include <casacore/casa/aips.h>
33#include <casacore/casa/BasicSL/String.h>
34#include <casacore/casa/Quanta/MVTime.h>
35
36namespace casacore { //# NAMESPACE CASACORE - BEGIN
37
38//# Forward Declarations
39
40
41// <summary>
42// Global functions for flex/bison scanner/parser for TableGram
43// </summary>
44
45// <use visibility=local>
46
47// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tTableGram">
48// </reviewed>
49
50// <prerequisite>
51//# Classes you should understand before using this one.
52// <li> TableGram.l and .y (flex and bison grammar)
53// </prerequisite>
54
55// <synopsis>
56// Global functions are needed to define the input of the flex scanner
57// and to start the bison parser.
58// The input is taken from a string.
59// </synopsis>
60
61// <motivation>
62// It is necessary to be able to give a table select command in ASCII.
63// This can be used in a CLI or in the table browser to get a subset
64// of a table or to sort a table.
65// </motivation>
66
67// <todo asof="$DATE:$">
68//# A List of bugs, limitations, extensions or planned refinements.
69// </todo>
70
71// <group name=TableGramFunctions>
73// Declare the bison parser (is implemented by bison command).
74int tableGramParseCommand (const String& command);
75
76// The yyerror function for the parser.
77// It throws an exception with the current token.
78void TableGramerror (const char*);
79
80// Give the current position in the string.
81// This can be used when parse errors occur.
83
84// Declare the input routine for flex/bison.
85int tableGramInput (char* buf, int max_size);
86
87// A function to remove escape characters.
89
90// A function to remove escape characters and quotes.
92
93// A function to remove quotes from a quoted string.
95
96// A function to parse a date/time string.
98
99// A function to parse a time/position string.
100// The value is returned in radians.
102
103// </group>
104
105
106
107} //# NAMESPACE CASACORE - END
108
109#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
double Double
Definition: aipstype.h:55
void TableGramerror(const char *)
The yyerror function for the parser.
int tableGramInput(char *buf, int max_size)
Declare the input routine for flex/bison.
String tableGramRemoveEscapes(const String &in)
A function to remove escape characters.
MVTime tableGramParseDateTime(const String &in)
A function to parse a date/time string.
int tableGramParseCommand(const String &command)
Declare the bison parser (is implemented by bison command).
Double tableGramParseTime(const String &in)
A function to parse a time/position string.
String tableGramRemoveQuotes(const String &in)
A function to remove quotes from a quoted string.
String tableGramRemoveEscapesQuotes(const String &in)
A function to remove escape characters and quotes.
Int & tableGramPosition()
Give the current position in the string.