Fleet  0.0.9
Inference in the LOT
Classes | Namespaces | Functions
SExpression.h File Reference

This is the return type of parsing S-expressions. It contains an optional label and typically we be converted into a different type. More...

#include <utility>
#include <string>
#include <optional>
#include "BaseNode.h"
Include dependency graph for SExpression.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SExpression::SExpNode
 

Namespaces

 SExpression
 

Functions

void SExpression::assert_check_parens (const std::string &s)
 
std::string SExpression::trim (std::string x)
 
std::vector< std::string > SExpression::tokenize (std::string s)
 
std::string SExpression::pop_front (std::vector< std::string > &q)
 
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. More...
 
SExpNode SExpression::parse (std::vector< std::string > &tok)
 Wrapper to parse to remove outer (...) More...
 
SExpNode SExpression::parse (std::string s)
 

Detailed Description

This is the return type of parsing S-expressions. It contains an optional label and typically we be converted into a different type.