Completed task1 objectives t#30
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,3 +2,5 @@
|
||||
*.o
|
||||
alpha
|
||||
flex.h
|
||||
grammar.tab.c
|
||||
grammar.tab.h
|
12
Makefile
12
Makefile
@ -2,8 +2,7 @@ CC := gcc
|
||||
FLEX := flex
|
||||
LEX := lexicalStructure.lex
|
||||
EXE := alpha
|
||||
CFLAGS := -std=c99 -Wall
|
||||
CPPFLAGS :=
|
||||
CFLAGS :=
|
||||
|
||||
compiler: lex.yy.c runner.o runner
|
||||
|
||||
@ -14,10 +13,13 @@ runner.o: runner.c runner.h flex.h
|
||||
$(CC) $(CFLAGS) -o runner.o -c runner.c
|
||||
|
||||
runner: lex.yy.c runner.o
|
||||
$(CC) -o $(EXE) runner.o lex.yy.c
|
||||
$(CC) $(CFLAGS) -o $(EXE) runner.o lex.yy.c
|
||||
|
||||
bison: grammar.y
|
||||
bison -d grammar.y
|
||||
|
||||
debug: CFLAGS += -DDEBUG=1
|
||||
debug: clean runner
|
||||
debug: clean compiler
|
||||
|
||||
test:
|
||||
./$(EXE) ./tests/test_comments.alpha
|
||||
@ -45,3 +47,5 @@ clean:
|
||||
rm -f $(EXE)
|
||||
rm -f flex.h
|
||||
rm -f *.tok
|
||||
rm -f grammar.tab.c
|
||||
rm -f grammar.tab.h
|
||||
|
17
README.MD
Normal file
17
README.MD
Normal file
@ -0,0 +1,17 @@
|
||||
# The Translators α Compiler
|
||||
#### Members: Annie Slenker, Meyer Simon, Partho Bhattacharya, & Scarlett Kadan
|
||||
|
||||
## Lexical Analyzer
|
||||
* **Undefined Behavior:**
|
||||
* Spaces are not required between tokens. For instance, an INTEGER and an ID are valid even if there is no space between them
|
||||
```
|
||||
Input: *5variable*
|
||||
Output: 2 14 301 "5"
|
||||
1 1 101 "variable"
|
||||
```
|
||||
|
||||
## Syntax Analyzer
|
||||
* *Incomplete*
|
||||
|
||||
## Symbol Table
|
||||
* *TODO: Create diagram.*
|
Reference in New Issue
Block a user