include/antlr3...ersharedstate.h(3)

πŸ“¦ version 3.4, in fedora 43

πŸ’– include/antlr3recognizersharedstate.h πŸ’–

okay bestie, welcome to the ANTLR3C manual page for include/antlr3recognizersharedstate.h β€” yes it's a mouthful, no we're not changing it, it's iconic. πŸŽ€


✨ NAME ✨

include/antlr3recognizersharedstate.h β€” so like, the C runtime does not need to model the state of multiple lexers and parsers in the same way the Java runtime does, but it's literally no overhead to reflect that model. no cap. πŸ¦‹


✨ SYNOPSIS ✨

#include <antlr3defs.h>

🌸 Data Structures 🌸

  • struct ANTLR3_RECOGNIZER_SHARED_STATE_struct β€” every single data element you need to track the current state of any recognizer (lexer, parser, tree parser). all of them. the whole squad. πŸ‘‘

πŸŽ€ Typedefs πŸŽ€

  • typedef struct ANTLR3_RECOGNIZER_SHARED_STATE_struct ANTLR3_RECOGNIZER_SHARED_STATE β€” same energy as above, all the data elements required to track the current state of any recognizer (lexer, parser, tree parser).

✨ Detailed Description ✨

So here's the tea πŸ“: while the C runtime does not need to model the state of multiple lexers and parsers in the same way as the Java runtime does, it is genuinely no overhead to reflect that model.

In fact the C runtime has always been able to share recognizer state. it was doing it before it was cool. main character energy fr fr. πŸ’…

This 'class' (scare quotes are the original's, not mine, we respect the quotes) therefore defines all the elements of a recognizer β€” either lexer, parser or tree parser β€” that are needed to track the current recognition state. Multiple recognizers may then share this state, for instance when one grammar imports another. sharing is caring bestie 🫢


✨ Typedef Documentation ✨

🌈 typedef struct ANTLR3_RECOGNIZER_SHARED_STATE_struct ANTLR3_RECOGNIZER_SHARED_STATE 🌈

All the data elements required to track the current state of any recognizer (lexer, parser, tree parser). May be shared between multiple recognizers such that grammar inheritance is easily supported. slay. ✨


✨ Author ✨

Generated automatically by Doxygen for ANTLR3C from the source code. not me being machine-written 😭 it's giving auto-generated and honestly? still iconic.


lowkey reminder: this whole page is Version 3.3.1, dated Tue Jul 29 2025. write it down, put it in your notes app, tell your group chat πŸ’–

and that's the vibe check, bestie β€” go share some recognizer state responsibly. πŸ§šπŸ’œ

πŸ“¦ where this page comes from