Snel
A shell implementation for A.U.TH (Operating Systems Lab)
sequencer.h File Reference

A basic sequence interpreter for snel. More...

#include <exception>
#include <string>
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include <utility>
#include <algorithm>
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>

Go to the source code of this file.

Classes

struct  snel::ArgList
 
struct  snel::Pipe
 
class  snel::Child
 
class  snel::Sequencer
 

Typedefs

using snel::fd_t = int
 file descriptor type
 

Functions

std::string snel::filter (const std::string in)
 

Variables

constexpr fd_t snel::STDIN_ = STDIN_FILENO
 Constant for stdin file descriptor.
 
constexpr fd_t snel::STDOUT_ = STDOUT_FILENO
 Constant for stdout file descriptor.
 
constexpr fd_t snel::STDERR_ = STDERR_FILENO
 Constant for stderr file descriptor.
 

Detailed Description

A basic sequence interpreter for snel.

Sequencer.h Created on: Feb, 2019 Author: Christos Choutouridis AEM: 8997 email : cchou.nosp@m.tou@.nosp@m.ece.a.nosp@m.uth..nosp@m.gr

Definition in file sequencer.h.

Function Documentation

◆ filter()

std::string snel::filter ( const std::string  in)

A very very simple filtering for leading ' ', comments and adjustments for the '|' character.

Note
The current snel implementation requires '|' to separated from left and right from the rest of the text, so we adjust the input to fit this expectation.
Parameters
inInput string
Returns
Output string

Definition at line 49 of file sequencer.cpp.