https://github.com/blankeos/cs-parser
⌨ A parser demonstrating lexical analysis and syntax analysis implemented in C#.
https://github.com/blankeos/cs-parser
Last synced: 11 months ago
JSON representation
⌨ A parser demonstrating lexical analysis and syntax analysis implemented in C#.
- Host: GitHub
- URL: https://github.com/blankeos/cs-parser
- Owner: Blankeos
- Created: 2022-10-10T13:22:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-07T09:09:21.000Z (over 3 years ago)
- Last Synced: 2025-02-13T08:41:52.342Z (over 1 year ago)
- Language: C#
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Parser in C#
_(WIP)_
A parser implemented in C# as a final requirement for my CCS 238 Programming Languages class for **Dr. Felipe P. Vista IV**.
Demonstrates compiler design theory from:
```
Scanner (Lexical Analysis) -> Parser (Syntax Analysis)
```
Progress:
- [x] Scanner Tokenization
- [ ] Parse Tree
- [ ] Expression Output
```
Written by:
- 🤓 Carlo Antonio T. Taleon
- 👧 Glecy S. Elizalde
- 🤠 Christopher Joseph T. Rubinos
```
## Get started
> Make sure to install [.Net SDK](https://dotnet.microsoft.com/en-us/download) if you haven't yet
1. Clone this repo and change your directory
```sh
# >
git clone https://github.com/Blankeos/cs-parser
cd cs-parser
# cs-parser>
```
2. Run the project in your terminal
```sh
# cs-parser>
dotnet run
```
## Introducing: The 🤓 "Carlo" Programming Language
It's basically like you're talking to some dude named Carlo.
### Features
- [x] Variables with `create`
- [x] Print to console with `say`
- [x] Arithmetic `+` `-` `*` `/`
- [x] Comments with `%`
### Example usage
```m
% filename: input.carlo
create age = 21
say age
% 21
say age - 1
% 20
func sayHello(name, age)
say "Hello " + name + "! You are " + age
sayHello "Carlo" 21
% Hello Carlo! You are 21
```