sapphirec
The Sapphire documentation
Normalizer.h
Go to the documentation of this file.
1
#pragma once
2
#include "
Lexer.h
"
// for TokenStream
3
#include "
Token.h
"
4
5
/* Namespace to normalize a TokenStream. */
6
namespace
Normalizer
7
{
8
/* Some tokens are difficult for the Lexer to parse right, or maybe I'm just lazy.
9
Anyways, this function transforms > and = tokens next to each other into a single >=, which has a different meaning,
10
etc... For example: = + = : ==, < + = : <=...
11
12
It also takes blank tokens and removes them. */
13
TokenStream
normalize
(
const
TokenStream
& input);
14
}
// namespace Normalizer
Lexer.h
TokenStream
std::vector< Token > TokenStream
Definition:
Lexer.h:7
Token.h
Normalizer
Definition:
Normalizer.h:7
Normalizer::normalize
TokenStream normalize(const TokenStream &input)
Definition:
Normalizer.cpp:4
src
Normalizer.h
Generated by
1.9.1