include/antlr3rewritestreams.h(3)
๐ include/antlr3rewritestreams.h โ ANTLR3C manual page ๐
okay bestie, welcome to the ANTLR3C manual for include/antlr3rewritestreams.h, and yes it's giving header-file-core but I promise it's cute. ๐ฆ
โจ NAME โจ
include/antlr3rewritestreams.h โ the header that holds all the rewrite-rule stream lore, no cap ๐
๐ธ SYNOPSIS ๐ธ
#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. literally the main character of this whole file. ๐
๐ง 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. ๐๏ธ
๐ Typedef Documentation ๐
๐ฆ 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. iconic behaviour honestly.
So here's the tea: 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. slay, polymorphism without the drama. โจ
โ ๏ธ Once you start next()ing, do not try to add more elements. It will break the cursor tracking I believe. ๐ญ bestie do NOT do it, I'm begging.
See also
pANTLR3_REWRITE_RULE_NODE_STREAMpANTLR3_REWRITE_RULE_ELEMENT_STREAMpANTLR3_REWRITE_RULE_SUBTREE_STREAM
TODO: add mechanism to detect/puke on modification after reading from stream ๐คฎ (their words, not mine, and honestly? relatable)
๐ 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. nodes only, we stay focused. ๐ณ๐
๐ธ 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. a whole forest living inside a stream, obsessed. ๐ฒโจ
๐ 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. tokens only, periodt. ๐๏ธ๐
๐ Author ๐
Generated automatically by Doxygen for ANTLR3C from the source code. not a human hand in sight, it's giving robot-elegance fr fr. ๐ค๐
okay that's the whole page bestie, you ate that reading session up ๐
this was Version 3.3.1, dated Tue Jul 29 2025, and it lives in the ANTLR3C docs as include/antlr3rewritestreams.h(3) โ mwah, take care of her ๐ซถ ๐โญ๐
๐ฆ where this page comes from
- fedora 43: antlr3-C-devel 1:3.4-3.5.3.14.fc43 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms