casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Static Private Attributes
casa::RecordGram Class Reference

Select-class for flex/bison scanner/parser for RecordGram. More...

#include <RecordGram.h>

List of all members.

Static Public Member Functions

static TableExprNode parse (const RecordInterface &record, const String &expression)
 Convert an expression string to an expression tree.
static TableExprNode parse (const Table &table, const String &expression)
 Convert an expression string to an expression tree.
static TableExprNode handleLiteral (RecordGramVal *)
 Create a TableExprNode from a literal.
static TableExprNode handleField (const String &name)
 Find the field name and create a TableExprNode from it.
static TableExprNode handleFunc (const String &name, const TableExprNodeSet &arguments)
 Handle a function.
static TableExprNode handleRegex (const TableExprNode &left, const String &regex)
 Handle a regex.
static void setNodePtr (TableExprNode *nodePtr)
 Set the final node pointer.

Static Public Attributes

static TaQLStyle theirTaQLStyle
 Define the global TaQLStyle to use.

Static Private Member Functions

static TableExprNode doParse (const String &expression)
 Do the conversion of an expression string to an expression tree.

Static Private Attributes

static const RecordInterfacetheirRecPtr
static const TabletheirTabPtr
static TableExprNodetheirNodePtr
static Mutex theirMutex

Detailed Description

Select-class for flex/bison scanner/parser for RecordGram.

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Prerequisite

Synopsis

This class is needed for the the actions in the flex scanner and bison parser. This stores the information by constructing RecordGram objects as needed and storing them in a List.

An expression can be given as a string and parsed by the parse function. The grammar used is as much as possible the same as that for the WHERE clause in TaQL (see AIPS++ note 199). It is possible to set the TaQL style to use by setting theirTaQLStyle before calling the parse functions. A better way is to define the style with the 'USING STYLE' part of the command (similar to TaQL).

Motivation

It is necessary to be able to give a record select command in ASCII. It is used by the ACSIS people.

Definition at line 172 of file RecordGram.h.


Member Function Documentation

static TableExprNode casa::RecordGram::doParse ( const String expression) [static, private]

Do the conversion of an expression string to an expression tree.

static TableExprNode casa::RecordGram::handleField ( const String name) [static]

Find the field name and create a TableExprNode from it.

static TableExprNode casa::RecordGram::handleFunc ( const String name,
const TableExprNodeSet arguments 
) [static]

Handle a function.

Create a TableExprNode from a literal.

static TableExprNode casa::RecordGram::handleRegex ( const TableExprNode left,
const String regex 
) [static]

Handle a regex.

static TableExprNode casa::RecordGram::parse ( const RecordInterface record,
const String expression 
) [static]

Convert an expression string to an expression tree.

The expression will operate on a series of Record objects. The given record is needed to know the type of the fields used in the expression.

static TableExprNode casa::RecordGram::parse ( const Table table,
const String expression 
) [static]

Convert an expression string to an expression tree.

The expression will operate on the given table.

static void casa::RecordGram::setNodePtr ( TableExprNode nodePtr) [inline, static]

Set the final node pointer.

Definition at line 206 of file RecordGram.h.

References theirNodePtr.


Member Data Documentation

Definition at line 220 of file RecordGram.h.

Definition at line 219 of file RecordGram.h.

Referenced by setNodePtr().

Definition at line 217 of file RecordGram.h.

const Table* casa::RecordGram::theirTabPtr [static, private]

Definition at line 218 of file RecordGram.h.

Define the global TaQLStyle to use.

By default it is glish style.

Definition at line 211 of file RecordGram.h.


The documentation for this class was generated from the following file: