Fleet  0.0.9
Inference in the LOT
Classes | Functions
SExpression Namespace Reference

Classes

class  SExpNode
 

Functions

void assert_check_parens (const std::string &s)
 
std::string trim (std::string x)
 
std::vector< std::string > tokenize (std::string s)
 
std::string pop_front (std::vector< std::string > &q)
 
SExpNode __parse (std::vector< std::string > &tok)
 Recursive parsing of S-expressions. Not high qualtiy. Basically, if we get ((A...) B...) then we call T's constructor with no arguments and make (A...) the first child. If we get (A ....) then we call with "A" as the first argument to the constructor because in some cases (like Binding) we want to handle this as a "label" on the node; in others like CL we want it to be an Node itself. More...
 
SExpNode parse (std::vector< std::string > &tok)
 Wrapper to parse to remove outer (...) More...
 
SExpNode parse (std::string s)
 

Function Documentation

◆ __parse()

SExpNode SExpression::__parse ( std::vector< std::string > &  tok)

Recursive parsing of S-expressions. Not high qualtiy. Basically, if we get ((A...) B...) then we call T's constructor with no arguments and make (A...) the first child. If we get (A ....) then we call with "A" as the first argument to the constructor because in some cases (like Binding) we want to handle this as a "label" on the node; in others like CL we want it to be an Node itself.

Parameters
tok
Returns

◆ assert_check_parens()

void SExpression::assert_check_parens ( const std::string &  s)

◆ parse() [1/2]

SExpNode SExpression::parse ( std::vector< std::string > &  tok)

Wrapper to parse to remove outer (...)

Parameters
tok
Returns

◆ parse() [2/2]

SExpNode SExpression::parse ( std::string  s)

◆ pop_front()

std::string SExpression::pop_front ( std::vector< std::string > &  q)

◆ tokenize()

std::vector<std::string> SExpression::tokenize ( std::string  s)

◆ trim()

std::string SExpression::trim ( std::string  x)