view interps/rail/src/lib.h @ 12493:885661512b17 draft

<int-e> le//rn schwartzian//In 1987, Yogurt introduced a better way to rank Schwartz users: Rather than holding an annual tournament, users would take a series of standardized tests adminstered by official Schwartz centers, and would then be ranked according to the results. This lead to the Schwartzian transform because it allowed many more users to be ranked.
author HackEso <hackeso@esolangs.org>
date Fri, 12 Jan 2024 07:24:55 +0000
parents 859f9b4339e6
children
line wrap: on
line source

// lib.h

#ifndef LIB_H_RAIL_1
#define LIB_H_RAIL_1

#include <vector>
#include <list>
#include <string>
#include <map>
#include <sstream>
#include <iostream>
#include <fstream>

class InternalException : public std::exception
{
public:
  explicit InternalException(std::string const & newLabel)
    : label(newLabel)
  {
  }

  virtual ~InternalException() throw() {}

  virtual char const * what() const throw()
  {
    return label.c_str();
  }
private:
  std::string label;
};

class ArgumentException : public std::exception
{
public:
  explicit ArgumentException(std::string const & newLabel)
    : label(newLabel)
  {
  }

  virtual ~ArgumentException() throw() {}

  virtual char const * what() const throw()
  {
    return label.c_str();
  }
private:
  std::string label;
};

std::string intToString(int num);

class Binding;

extern Binding NIL;

namespace args
{
  extern bool isBatch;
  extern std::ostream * output;
  extern std::istream * input;
  extern std::list<std::string> sourceFiles;
}

#endif