-# Language (unnamed)
+# C+ (WIP name)
-Programming Language.
+A Programming Language like the [C Programming Language](https://en.wikipedia.org/wiki/C_(programming_language)) that adds some useful features, different syntax, etc that ultimately transpiles to C itself.
+
+## Goals
+
+- [x] Lexical Analysis (Generate Tokens from source file)
+- [ ] Parsing (Generate a Syntax Tree from the Tokens)
+- [ ] Convert C+ syntax to C syntax
+- [ ] Call C compiler and linker to create the executable
+- [ ] Success!!!
+
+## Why?
+
+I mainly program using C because of its simpilicty. But some features are kinda bad and some even missing such as defer, shitty macros(preprocessor), shitty variadic functions, etc.
+
+- Why not use [C++](https://en.wikipedia.org/wiki/C%2B%2B), doesn't it basically solve all those problems?
+
+Because i don't like feel like its a good language... I'm not an big [OOP](https://en.wikipedia.org/wiki/Object-oriented_programming) person and don't get me started on the mess that is called the [templates](https://en.wikipedia.org/wiki/Template_(C%2B%2B)). Anyways i won't use C++ as my main language and i'm not quite satisfied with C, so i wondered "why don't i make my own language that adds these features to C?". And that's what i'm trying to do with this project. I'm not talking about creating a completely new programming language from scratch, just change some syntax of C, add these new features and make some of it better. This is also a great exercise to further increase my wisdom of computers.
+
+TL;DR:
+- I like C but quite not, (don't likey C++) so create C+ that is in the middle.
+- Good opportunity to learn how a programming language works.
+- Because it's fun.
+
+## References
+
+- [Book im reading(The dragon book)](https://drive.google.com/file/d/0B1MogsyNAsj9elVzQWR5NWVTSVE/view?pli=1&resourcekey=0-zoBDMpzTafr6toxDuQLNUg)
return None
- def parse(self) -> [Token]:
+ def lex(self) -> [Token]:
tokens: [Token] = []
token = self.next_token()
while token != None:
filename: str = sys.argv.pop(0)
parser = Parser(filename)
-
- tokens = parser.parse()
+ # Lexical Analysis
+ tokens = parser.lex()
for t in tokens:
pprint.pp(str(t))