Loading...
Searching...
No Matches
by::interpreter Class Reference

High-level interpreter for byeol language. More...

#include <interpreter.hpp>

Inheritance diagram for by::interpreter:
by::tworker< tstr< pod >, pod >

Public Types

enum  logFlag2 { LOG_STRUCTURE = 1 << 7 , LOG_GRAPH_ON_EX = 1 << 8 }
 
- Public Types inherited from by::tworker< tstr< pod >, pod >
enum  logFlag
 

Public Member Functions

parsergetParser ()
 
const parsergetParser () const BY_CONST_FUNC(getParser()) verifier &getVerifier()
 
const verifiergetVerifier () const BY_CONST_FUNC(getVerifier()) nbool isParsed() const
 
nbool isVerified () const
 
nodegetSubPod ()
 
const nodegetSubPod () const BY_CONST_FUNC(getSubPod()) void rel() override
 
- Public Member Functions inherited from by::tworker< tstr< pod >, pod >
 tworker (const errReport &rpt)
 
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 pod &root)
 
me & setTask (const pod *it) BY_SIDE_FUNC(it
 
podgetTask ()
 
const podgetTask () const BY_CONST_FUNC(getTask()) virtual void rel()
 
tstr< podwork ()
 
const areagetArea () const BY_CONST_FUNC(_getArea()) nbool isOk() const
 

Protected Member Functions

tstr< pod_onWork () override
 
- Protected Member Functions inherited from by::tworker< tstr< pod >, pod >
virtual void _prepare ()
 Protected virtual method for preparation before starting the work.
 
void _report (baseErr *e)
 
virtual void _onEndWork ()
 Protected virtual method called after the work is completed.
 
area_getArea ()
 
void _onEndErrReport (const errReport &rpt) const
 

Additional Inherited Members

- Public Attributes inherited from by::tworker< tstr< pod >, pod >
me setTask it
 
me setTask * this
 

Detailed Description

High-level interpreter for byeol language.

Coordinates the complete interpretation pipeline combining parser, expander, and verifier. Manages the entire process from source code to executable pod instances. This is the main entry point for interpreting byeol source code.

Interpretation Pipeline

The interpreter executes the following stages in order:

  1. Parsing - Converts source code to AST using parser
  2. Expansion - Performs prior type inference using expander
  3. Verification - Validates semantics and type safety using verifier

Each stage must complete successfully before the next stage begins. If any stage fails, errors are collected in the errReport and the process stops.

Usage with starter

After interpretation completes successfully, use starter to actually execute the verified AST:

ip.work();
if(!ip.isVerified()) return -1;
str res = starter().setTask(ip.getSubPod()).work();
High-level interpreter for byeol language.
Definition interpreter.hpp:35
Program execution starter.
Definition starter.hpp:39
Definition tnarr.hpp:9

Member Function Documentation

◆ _onWork()

tstr< pod > by::interpreter::_onWork ( )
overrideprotectedvirtual

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