ANTLR3C  3.3.1
antlr3rewritestreams.h File Reference
Include dependency graph for antlr3rewritestreams.h:
This graph shows which files directly or indirectly include this file:

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. More...
 
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. More...
 
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. More...
 
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. More...
 

Typedef Documentation

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.

See also
pANTLR3_REWRITE_RULE_NODE_STREAM
pANTLR3_REWRITE_RULE_ELEMENT_STREAM
pANTLR3_REWRITE_RULE_SUBTREE_STREAM

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.