ANTLR3C
3.3.1
|
#include <antlr3defs.h>
#include <antlr3collections.h>
#include <antlr3commontreeadaptor.h>
#include <antlr3baserecognizer.h>
Data Structures | |
struct | ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct |
A generic list of elements tracked in an alternative to be used in a -> rewrite rule. More... | |
Typedefs | |
typedef struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct | ANTLR3_REWRITE_RULE_ELEMENT_STREAM |
A generic list of elements tracked in an alternative to be used in a -> rewrite rule. | |
typedef struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct | ANTLR3_REWRITE_RULE_NODE_STREAM |
This is an implementation of a node stream, which is basically an element stream that deals with tree nodes only. | |
typedef struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct | ANTLR3_REWRITE_RULE_SUBTREE_STREAM |
This is an implementation of a subtree stream which is a set of trees modelled as an element stream. | |
typedef struct ANTLR3_REWRITE_RULE_ELEMENT_STREAM_struct | ANTLR3_REWRITE_RULE_TOKEN_STREAM |
This is an implementation of a token stream, which is basically an element stream that deals with tokens only. |
A generic list of elements tracked in an alternative to be used in a -> rewrite rule.
In the C implementation, all tree oriented streams return a pointer to the same type: pANTLR3_BASE_TREE. Anything that has subclassed from this still passes this type, within which there is a super pointer, which points to it's own data and methods. Hence we do not need to implement this as the equivalent of an abstract class, but just fill in the appropriate interface as usual with this model.
Once you start next()ing, do not try to add more elements. It will break the cursor tracking I believe.
TODO: add mechanism to detect/puke on modification after reading from stream
This is an implementation of a node stream, which is basically an element stream that deals with tree nodes only.
This is an implementation of a subtree stream which is a set of trees modelled as an element stream.
This is an implementation of a token stream, which is basically an element stream that deals with tokens only.