Empty lexer

This commit is contained in:
Rafał Grodziński
2025-05-27 13:23:04 +09:00
commit 45387b7638
6 changed files with 38 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
.DS_Store
*.o

6
Lexer.cpp Normal file
View File

@@ -0,0 +1,6 @@
#include "Lexer.h"
#include "Token.h"
std::vector<Token> tokens() {
}

13
Lexer.h Normal file
View File

@@ -0,0 +1,13 @@
#ifndef LEXER_H
#define LEXER_H
#include <vector>
class Token;
class Lexer {
public:
std::vector<Token> tokens();
};
#endif

1
Token.cpp Normal file
View File

@@ -0,0 +1 @@
#include "Token.h"

13
Token.h Normal file
View File

@@ -0,0 +1,13 @@
#ifndef TOKEN_H
#define TOKEN_H
class Token {
public:
enum Kind {
integer,
real,
eof
};
};
#endif

3
make.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
cc -c -std=c++17 *.cpp