Select-class for flex/bison scanner/parser for RecordGram. More...
#include <RecordGram.h>
Public Types | |
enum | Token { Node, Val, Elem, Set } |
Define the types of tokens in the grammar. More... | |
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 ®ex) |
Handle a regex. | |
static void | setNodePtr (TableExprNode *nodePtr) |
Set the final node pointer. | |
static void | addToken (TableExprNode *ptr) |
Add a token to the list of tokens to be deleted for the possible tokens in the RecordGram.yy union. | |
static void | addToken (RecordGramVal *ptr) |
static void | addToken (TableExprNodeSet *ptr) |
static void | addToken (TableExprNodeSetElem *ptr) |
static void | deleteToken (TableExprNode *ptr) |
Delete a token and remove from the list. | |
static void | deleteToken (RecordGramVal *ptr) |
static void | deleteToken (TableExprNodeSet *ptr) |
static void | deleteToken (TableExprNodeSetElem *ptr) |
static void | deleteTokenStorage () |
Delete all tokens not deleted yet. | |
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 void | addToken (void *ptr, Token type) |
Add a token to the list of tokens to be deleted. | |
static void | removeToken (void *ptr) |
Remove a token from the list of tokens to be deleted. | |
Static Private Attributes | |
static std::map< void *, Token > | theirTokens |
static const RecordInterface * | theirRecPtr |
static const Table * | theirTabPtr |
static TableExprNode * | theirNodePtr |
static Mutex | theirMutex |
Select-class for flex/bison scanner/parser for RecordGram.
Internal
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 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).
It is necessary to be able to give a record select command in ASCII. It is used by the ACSIS people.
Definition at line 175 of file RecordGram.h.
Define the types of tokens in the grammar.
Definition at line 179 of file RecordGram.h.
static void casacore::RecordGram::addToken | ( | void * | ptr, | |
Token | type | |||
) | [inline, static, private] |
Add a token to the list of tokens to be deleted.
Definition at line 238 of file RecordGram.h.
References theirTokens.
static void casacore::RecordGram::addToken | ( | TableExprNodeSetElem * | ptr | ) | [static] |
static void casacore::RecordGram::addToken | ( | TableExprNodeSet * | ptr | ) | [static] |
static void casacore::RecordGram::addToken | ( | RecordGramVal * | ptr | ) | [static] |
static void casacore::RecordGram::addToken | ( | TableExprNode * | ptr | ) | [static] |
Add a token to the list of tokens to be deleted for the possible tokens in the RecordGram.yy union.
static void casacore::RecordGram::deleteToken | ( | TableExprNodeSetElem * | ptr | ) | [static] |
static void casacore::RecordGram::deleteToken | ( | TableExprNodeSet * | ptr | ) | [static] |
static void casacore::RecordGram::deleteToken | ( | RecordGramVal * | ptr | ) | [static] |
static void casacore::RecordGram::deleteToken | ( | TableExprNode * | ptr | ) | [static] |
Delete a token and remove from the list.
static void casacore::RecordGram::deleteTokenStorage | ( | ) | [static] |
Delete all tokens not deleted yet.
static TableExprNode casacore::RecordGram::doParse | ( | const String & | expression | ) | [static, private] |
Do the conversion of an expression string to an expression tree.
static TableExprNode casacore::RecordGram::handleField | ( | const String & | name | ) | [static] |
Find the field name and create a TableExprNode from it.
static TableExprNode casacore::RecordGram::handleFunc | ( | const String & | name, | |
const TableExprNodeSet & | arguments | |||
) | [static] |
Handle a function.
static TableExprNode casacore::RecordGram::handleLiteral | ( | RecordGramVal * | ) | [static] |
Create a TableExprNode from a literal.
static TableExprNode casacore::RecordGram::handleRegex | ( | const TableExprNode & | left, | |
const String & | regex | |||
) | [static] |
Handle a regex.
static TableExprNode casacore::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 TableExprNode casacore::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 void casacore::RecordGram::removeToken | ( | void * | ptr | ) | [inline, static, private] |
Remove a token from the list of tokens to be deleted.
Definition at line 241 of file RecordGram.h.
References theirTokens.
static void casacore::RecordGram::setNodePtr | ( | TableExprNode * | nodePtr | ) | [inline, static] |
Mutex casacore::RecordGram::theirMutex [static, private] |
Definition at line 248 of file RecordGram.h.
TableExprNode* casacore::RecordGram::theirNodePtr [static, private] |
Definition at line 247 of file RecordGram.h.
Referenced by setNodePtr().
const RecordInterface* casacore::RecordGram::theirRecPtr [static, private] |
Definition at line 245 of file RecordGram.h.
const Table* casacore::RecordGram::theirTabPtr [static, private] |
Definition at line 246 of file RecordGram.h.
Define the global TaQLStyle to use.
By default it is glish style.
Definition at line 217 of file RecordGram.h.
std::map<void*, Token> casacore::RecordGram::theirTokens [static, private] |
Definition at line 244 of file RecordGram.h.
Referenced by addToken(), and removeToken().