25typedef std::shared_ptr<const I_LexAttr>
C_LexPtr;
74 std::string_view
setSource(std::string_view src)
override;
80 typedef std::shared_ptr<C_StateLR1> C_StateLR1Ptr;
90 C_StateLR1() =
default;
91 C_StateLR1(C_StateLR1 &another);
92 void operator=(C_StateLR1 &another);
94 typedef std::vector<C_StateLR1Ptr> C_StateLR1Ptrs;
95 typedef std::pair<C_StateLR1Ptr,F_OncePostShift> T_Reduced;
99 C_StateLR1Ptrs m_curTops, m_accepted;
100 std::string_view m_srcPath;
105 std::optional<T_Reduced> reduceOn(
size_t id, C_StateLR1Ptr iTop,
const C_SourcePos &pos);
106 static T_StateID state(C_StateLR1Ptr &p);
std::string_view setSource(std::string_view src) override
C_Parser(const I_ParserPolicy &policy)
const I_ParserPolicy & m_policy
void onError(const C_SourcePos &pos, std::string_view message)
void eachAccepted(std::function< void(C_LexPtr &)> apply)
void add(T_LexID token, unsigned line, unsigned col, I_LexAttr *unownedAttr) override
std::function< void(C_Parser &, const F_GetProduced &, C_LexPtr &, F_OncePostShift &)> FH_Reduce
C_LexInfoT< const I_LexAttr, std::shared_ptr > C_LexInfo
std::function< void(C_Parser &parser)> F_OncePostShift
std::shared_ptr< const I_LexAttr > C_LexPtr
F_GetProducedT< const I_LexAttr, std::shared_ptr > F_GetProduced
THE common namespace of bux library.
std::function< C_LexInfoT< T, C_Ptr > &(size_t)> F_GetProducedT
std::string printToken(T_LexID token) const
virtual bool getTokenName(T_LexID token, std::string &name) const
virtual std::vector< T_ActionId > action(T_StateID state, T_LexID token) const =0
virtual size_t getAcceptId() const =0
virtual void onError(C_Parser &parser, const C_SourcePos &pos, std::string_view message) const =0
virtual T_StateID nextState(T_StateID state, T_LexID lex) const =0
virtual void getReduceInfo(size_t prodId, C_ReduceInfo &info) const =0
virtual bool changeToken(T_LexID &token, C_LexPtr &attr) const