include/antlr3rewritestreams.h(3)

๐Ÿ“ฆ version 3.4, in fedora 43

๐Ÿ’– 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_STREAM
  • pANTLR3_REWRITE_RULE_ELEMENT_STREAM
  • pANTLR3_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