MSParse.h
Classes
- MSParse -- Class to hold values from an ms grammar parser (full description)
Interface
- friend AipsIO& operator<< (AipsIO&, const MSParse&)
- friend AipsIO& operator>> (AipsIO&, MSParse&)
- Public Members
- MSParse ()
- MSParse (const MSParse&)
- MSParse& operator= (const MSParse&)
- MSParse (const MeasurementSet* ms, const String& shorthand)
- Bool test (const String& shortHand) const
- String& shorthand()
- const MeasurementSet* ms()
Prerequisite
Etymology
MSParse is the class used to parse an ms command.
Synopsis
MSParse is used by the parser of an ms sub-expression statements.
The parser is written in Bison and Flex in files MSXXXGram.y and .l.
The statements in there use the routines in this file to act
upon a reduced rule.
Since multiple tables can be given (with a shorthand), the table
names are stored in a list. The variable names can be qualified
by the table name and will be looked up in the appropriate table.
The class MSParse only contains information about an ms
used in the ms command. Global variables (like a list and a vector)
are used in MSParse.cc to hold further information.
Global functions are used to operate on the information.
The main function is the global function msXXXCommand.
It executes the given STaQL command and returns the resulting ms.
This is, in fact, the only function to be used by a user.
Motivation
It is necessary to be able to give a ms command in ASCII.
This can be used in a CLI or in the table browser to get a subset
of a table or to sort a table.
Member Description
friend AipsIO& operator<< (AipsIO&, const MSParse&)
friend AipsIO& operator>> (AipsIO&, MSParse&)
Dummy AipsIO routines; they are needed for the List container.
Default constructor for List container class.
MSParse (const MSParse&)
Copy constructor (copy semantics).
MSParse& operator= (const MSParse&)
Assignment (copy semantics).
Associate the ms and the shorthand.
Bool test (const String& shortHand) const
Test if shorthand matches.
Get the shorthand.
Get ms object.