by::parser Class Reference

Parser for byeol language source code. More...

#include <parser.hpp>

Inheritance diagram for by::parser:
by::worker< str, slot > by::tokenScanable by::typeProvidable by::clonable

Public Member Functions

nodegetSubPack ()
 
const nodegetSubPack () const BY_CONST_FUNC(getSubPack()) srcSupplies &getSrcSupplies()
 
const srcSuppliesgetSrcSupplies () const BY_CONST_FUNC(getSrcSupplies()) me &addSupply(const srcSupply &new 1)
 
me & relSupplies ()
 
tokenDispatchergetDispatcher ()
 
std::vector< ncnt > & getIndents ()
 
nbool isInit () const
 
template<typename T >
void setScan ()
 
void rel () override
 
int pushState (int newState)
 
int popState ()
 
nint onScan (parser &ps, YYSTYPE *val, YYLTYPE *loc, yyscan_t scanner, nbool &isBypass) override
 
nint onTokenEndOfFile ()
 
nint onTokenColon (nint tok)
 
nint onTokenNewLine (nint tok)
 
nint onTokenLParan (nint tok)
 
nint onTokenRParan (nint tok)
 
nint onTokenComma (nint tok)
 
nbool onTokenEndOfBraces ()
 
void onTokenStartOfStrTemplateBrace ()
 
nint onIndent (ncnt col, nint tok)
 
nint onDedent (ncnt col, nint tok)
 
nint onIgnoreIndent (nint tok)
 
nchar onScanUnexpected (const nchar *token)
 
void onSrcArea (const area &area)
 
nodeonGet (const std::string &name)
 
nodeonGet (const std::string &name, const narr &args)
 
nodeonGet (node &from, const std::string &name)
 
nodeonGet (node &from, node &it)
 
nodeonGet (const std::string &name, const std::string &name2)
 
nodeonCallAccess (node &it, const narr &args)
 
FBOExpronUnaryMinus (const node &it)
 
FBOExpronUnaryNot (const node &it)
 
FUOExpronUnaryBitwiseNot (const node &it)
 
nodeonUnaryDoublePlus (node &it)
 
nodeonUnaryDoubleMinus (node &it)
 
FUOExpronUnaryPostfixDoublePlus (const node &it)
 
FUOExpronUnaryPostfixDoubleMinus (const node &it)
 
FBOExpronAdd (const node &lhs, const node &rhs)
 
FBOExpronSub (const node &lhs, const node &rhs)
 
FBOExpronMul (const node &lhs, const node &rhs)
 
FBOExpronDiv (const node &lhs, const node &rhs)
 
FBOExpronMod (const node &lhs, const node &rhs)
 
FBOExpronBitwiseAnd (const node &lhs, const node &rhs)
 
FBOExpronBitwiseXor (const node &lhs, const node &rhs)
 
FBOExpronBitwiseOr (const node &lhs, const node &rhs)
 
FBOExpronLShift (const node &lhs, const node &rhs)
 
FBOExpronRShift (const node &lhs, const node &rhs)
 
nodeonAssign (node &lhs, node &rhs)
 
nodeonAddAssign (node &lhs, node &rhs)
 
nodeonSubAssign (node &lhs, node &rhs)
 
nodeonMulAssign (node &lhs, node &rhs)
 
nodeonDivAssign (node &lhs, node &rhs)
 
nodeonModAssign (node &lhs, node &rhs)
 
FBOExpronGt (const node &lhs, const node &rhs)
 
FBOExpronGe (const node &lhs, const node &rhs)
 
FBOExpronLt (const node &lhs, const node &rhs)
 
FBOExpronLe (const node &lhs, const node &rhs)
 
FBOExpronEq (const node &lhs, const node &rhs)
 
FBOExpronNe (const node &lhs, const node &rhs)
 
FBOExpronAnd (const node &lhs, const node &rhs)
 
FBOExpronOr (const node &lhs, const node &rhs)
 
nodeonGetGeneric (const std::string &orgName, const args &typeParams)
 
nodeonGetElem (const node &arr, const node &idx)
 
nodeonGetArray (node &elemType)
 
objonPack (const node &path)
 
objonPack (const std::string &path)
 
objonPack ()
 
objonSubPack (obj &subpack)
 
endExpronEnd (const blockExpr &blk)
 
blockExpronBlock (const node *stmt)
 
blockExpronBlock (blockExpr *blk, const node *stmt)
 
blockExpronBlock ()
 
defBlockonDefBlock (node *stmt)
 
defBlockonDefBlock (defBlock *blk, node *stmt)
 
defBlockonDefBlock ()
 
nodeonFor (const std::string &iterName, const node &expr, const blockExpr &blk)
 
nodeonWhile (const node &condition, const blockExpr &blk)
 
nodeonParanthesisAsTuple (narr &tuple)
 
argsonTuple ()
 
argsonTuple (const node &elem)
 
argsonTuple (args &as, const node &elem)
 
argsonFuncCallTuple ()
 
argsonFuncCallTuple (const node &elem)
 
argsonFuncCallTuple (args &as, const node &elem)
 
argsonTypeNames (const node &param)
 
argsonTypeNames (args &params, const node &param)
 
template<typename T , typename Arg >
T * onPrimitive (const Arg &arg)
 
template<typename T >
T * onPrimitive ()
 
nodeonDefProp (const modifier &mod, const std::string &name, const node &rhs)
 
nodeonDefProp (const std::string &name, const node &rhs)
 
nodeonDefProp (const node &rhs)
 
nodeonDefProp (const modifier &mod, const node &rhs)
 
nodeonDefAssign (const modifier &mod, const std::string &name, const node *rhs)
 
nodeonDefAssign (const defPropExpr *prop, const node *rhs)
 
nodeonDefAssign (const std::string &name, const node *rhs)
 
objonDefOrigin (const std::string &name, defBlock &blk)
 
objonDefOrigin (const std::string &name, const narr &args, defBlock &blk)
 
genericOriginonDefObjGeneric (const std::string &name, const args &typeParams, defBlock &blk)
 
genericOriginonDefObjGeneric (const std::string &name, const args &typeParams, const narr &args, defBlock &blk)
 
nodeonDefArray (const narr &items)
 
nodeonDefSeq (const node &start, const node &end)
 
void onCompilationUnit (obj *subpack)
 
void onCompilationUnit (obj *subpack, defBlock *blk)
 
funconFuncSignature (const modifier &mod, const getExpr &access, const node *retType)
 
funconFuncSignature (const getExpr &access, const node *retType)
 
funconFuncSignature (const modifier &mod, node &it, const node *retType)
 
funconFuncSignature (node &it, const node *retType)
 
funconAbstractFunc (func &f)
 
nodeonFunc (func &func, const blockExpr &blk)
 
defNestedFuncExpronLambda (const narr &params, const node &retType, const blockExpr &blk)
 
ctoronCtor (const modifier &mod, const narr &args, const blockExpr &blk)
 
ctoronCtor (const narr &args, const blockExpr &blk)
 
ctoronCtor (const modifier &mod, const blockExpr &blk)
 
ctoronCtor (const blockExpr &blk)
 
narronParams ()
 
narronParams (const defPropExpr *elem)
 
narronParams (narr &it, const defPropExpr *elem)
 
modifieronModifier (nbool isPublic, nbool isOverriden)
 
nodeonDeclStmt (const narr &dotnames)
 
retExpronRet ()
 
retExpronRet (node &exp)
 
breakExpronBreak ()
 
nextExpronNext ()
 
runExpronFillFromOfFuncCall (const node &me, runExpr &to)
 
runExpronRunExpr (node &type, const narr &a)
 
runExpronRunExpr (node &type, const args &a)
 
isExpronIs (const node &me, const node &to)
 
asExpronAs (const node &me, const node &as)
 
ifExpronIf (const node &condition, const blockExpr &then)
 
ifExpronIf (const node &condition, const blockExpr &then, const blockExpr &elseBlk)
 
ifExpronIf (const node &condition, const blockExpr &then, const ifExpr &elseIf)
 
runExpronIn (const node &it, const node &container)
 
void onEndFunc ()
 
void onParseErr (const std::string &msg, const nchar *symbolName)
 
nint onScan (parser &ps, YYSTYPE *val, YYLTYPE *loc, yyscan_t scanner)
 
virtual nint onScan (parser &ps, YYSTYPE *yylval, YYLTYPE *loc, yyscan_t yyscanner, nbool &isBypass)=0
 
- Public Member Functions inherited from by::worker< str, slot >
errReportgetReport ()
 
const errReportgetReport () const BY_CONST_FUNC(getReport()) me &setReport(errReport &rpt)
 
me & setFlag (nint newFlag)
 
me & addFlag (nint flag)
 
me & delFlag (nint clear)
 
nbool isFlag (nint flag) const
 
nint getFlag () const
 
me & setTask (const slot &root)
 
me & setTask (const slot *it) BY_SIDE_FUNC(it
 
slotgetTask ()
 
const slotgetTask () const BY_CONST_FUNC(getTask()) virtual void rel()
 
str work ()
 
const areagetArea () const BY_CONST_FUNC(_getArea()) nbool isOk() const
 
- Public Member Functions inherited from by::typeProvidable
nbool operator== (const me &rhs) const
 
nbool operator!= (const me &rhs) const
 
virtual const typegetType () const =0
 
nbool isSub (const type &it) const
 
nbool isSub (const type *it) const BY_SIDE_FUNC(isSub)
 
nbool isSub (const me &it) const
 
nbool isSub (const me *it) const BY_SIDE_FUNC(isSub)
 
nbool isSuper (const type &it) const
 
nbool isSuper (const type *it) const BY_SIDE_FUNC(isSuper)
 
nbool isSuper (const me &it) const
 
nbool isSuper (const me *it) const BY_SIDE_FUNC(isSuper)
 
template<typename T >
nint isSub () const
 
template<typename T >
nint isSuper () const
 
template<typename T >
T * cast ()
 
template<typename T >
const T * cast () const BY_CONST_FUNC(cast< T >()) virtual void *cast(const type &to)
 
const void * cast (const type &to) const BY_CONST_FUNC(cast(to)) void *cast(const type *it) BY_SIDE_FUNC(cast)
 
- Public Member Functions inherited from by::clonable
virtual me * clone () const =0
 
virtual me * cloneDeep () const
 
virtual void onCloneDeep (const me &from)
 
- Public Member Functions inherited from by::tokenScanable
nint onScan (parser &ps, YYSTYPE *val, YYLTYPE *loc, yyscan_t scanner)
 

Protected Member Functions

void * _scanString (const std::string &src, void *scanner)
 
exprMaker_getMaker ()
 
void _prepare () override
 
void _onEndWork () override
 
str _onWork () override
 
- Protected Member Functions inherited from by::worker< str, slot >
void _report (baseErr *e)
 
area_getArea ()
 
void _onEndErrReport (const errReport &rpt) const
 

Friends

class srcSupply
 

Additional Inherited Members

- Public Types inherited from by::worker< str, slot >
enum  logFlag
 
- Public Attributes inherited from by::worker< str, slot >
me setTask it
 
me setTask * this
 

Detailed Description

Parser for byeol language source code.

Main parser class that converts source code into abstract syntax trees. Handles tokenization, syntax analysis, and AST construction for the byeol language.

Member Function Documentation

◆ _onEndWork()

void by::parser::_onEndWork ( )
overrideprotectedvirtual

Reimplemented from by::worker< str, slot >.

◆ _onWork()

str by::parser::_onWork ( )
overrideprotectedvirtual

parse with given srcSupply instances.

Parameters
scriptis null terminated cstring.
Returns
last parsed sub pack.

Implements by::worker< str, slot >.

◆ _prepare()

void by::parser::_prepare ( )
overrideprotectedvirtual

Reimplemented from by::worker< str, slot >.

◆ onScan() [1/2]

nint by::parser::onScan ( parser ps,
YYSTYPE *  val,
YYLTYPE *  loc,
yyscan_t  scanner,
nbool &  isBypass 
)
overridevirtual

Implements by::tokenScanable.

◆ onScan() [2/2]

virtual nint by::tokenScanable::onScan ( parser ps,
YYSTYPE *  yylval,
YYLTYPE *  loc,
yyscan_t  yyscanner,
nbool &  isBypass 
)
virtual

Implements by::tokenScanable.


The documentation for this class was generated from the following file: