RecordGram.h
Classes
- Global Functions -- Global functions for flex/bison scanner/parser for RecordGram (full description)
- RecordGram -- Select-class for flex/bison scanner/parser for RecordGram (full description)
Interface
- int recordGramParseCommand (const String& command)
- void RecordGramerror (char*)
- Int& recordGramPosition()
- int recordGramInput (char* buf, int max_size)
- inline String recordGramRemoveEscapes (const String& in)
- inline String recordGramRemoveQuotes (const String& in)
Prerequisite
- RecordGram.l and .y (flex and bison grammar)
Synopsis
Global functions are needed to define the input of the flex scanner
and to start the bison parser.
The input is taken from a string.
Motivation
It is necessary to be able to give a record select command in ASCII.
This can be used in a CLI or in the record browser to get a subset
of a record or to sort a record.
To Do
Member Description
Declare the bison parser (is implemented by bison command).
The yyerror function for the parser.
It throws an exception with the current token.
Give the current position in the string.
This can be used when parse errors occur.
Declare the input routine for flex/bison.
A function to remove escaped characters.
A function to remove quotes from a quoted string.
Interface
- Public Members
- static TableExprNode parse (const RecordInterface& record, const String& expression)
- static TableExprNode handleField (const String& name)
- static TableExprNode handleFunc (const String& name, const TableExprNodeSet& arguments)
- static void setNodePtr (TableExprNode* nodePtr)
Prerequisite
- RecordGram.l and .y (flex and bison grammar)
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.
Motivation
It is necessary to be able to give a record select command in ASCII.
It is used by the ACSIS people.
Member Description
static TableExprNode parse (const RecordInterface& record, const String& expression)
Convert an expression string to an expression tree.
The record is needed to know the type of the fields used in
the expression.
Find the field name and create a TableExprNode from it.
Handle a function.
Set the final node pointer.