1#ifndef INC_TokenStreamSelector_hpp__
2#define INC_TokenStreamSelector_hpp__
11#include <antlr/config.hpp>
12#include <antlr/TokenStream.hpp>
16#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
31 typedef ANTLR_USE_NAMESPACE(std)less<ANTLR_USE_NAMESPACE(std)
string> lessp;
53 void addInputStream(
TokenStream* stream,
const ANTLR_USE_NAMESPACE(std)
string& key);
58 TokenStream* getStream(
const ANTLR_USE_NAMESPACE(std)
string& sname)
const;
66 void push(
const ANTLR_USE_NAMESPACE(std)
string& sname);
80 void select(
const ANTLR_USE_NAMESPACE(std)
string& sname);
83#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
This interface allows any object to pretend it is a stream of tokens.
A token stream MUX (multiplexor) knows about n token streams and can multiplex them onto the same cha...
TokenStream * input
The currently-selected token stream input.
std ::stack< TokenStream * > streamStack_coll
Used to track stack of input streams.
std ::map< std ::string, TokenStream * > inputStreamNames_coll
The set of inputs to the MUX.