Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking β€œSign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entrega final #73

Open
wants to merge 91 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
2ed2bb1
adding llast project, lexer almost done
Feb 17, 2022
de5c80e
update
Feb 18, 2022
94cc224
lexer done
Feb 18, 2022
b7a6d56
working on parser
Feb 18, 2022
1261f2c
working on parser
Feb 22, 2022
8f6cd5f
-
Feb 23, 2022
d7be5b1
working on semantic errors
Feb 24, 2022
a794daf
cleaning
JessyGigato Feb 23, 2022
6357abe
starting cil :-O
JessyGigato Feb 24, 2022
811f369
working on semantic
Feb 24, 2022
6c71296
Merge branch 'master' of https://github.com/ycimadevila/cool-compiler…
Feb 24, 2022
ece974d
still workin on cil
JessyGigato Feb 25, 2022
e84d7dd
Merge branch 'master' of https://github.com/ycimadevila/cool-compiler…
JessyGigato Feb 25, 2022
f7aa846
working on type checker
Feb 25, 2022
5580762
still working on cil v2 :-(
JessyGigato Feb 26, 2022
d8c222f
working on semantic, typer checker, report
Feb 26, 2022
69bf6e7
Merge branch 'master' of https://github.com/ycimadevila/cool-compiler…
Feb 26, 2022
e06cc83
half semantic tests done :')
Mar 2, 2022
360a095
cool-to-cil-yet
JessyGigato Mar 11, 2022
32c3566
merging
JessyGigato Mar 11, 2022
f0c4aec
testing semantic
Mar 11, 2022
b7146b3
Merge branch 'master' of https://github.com/ycimadevila/cool-compiler…
JessyGigato Mar 11, 2022
6317abd
visit-cil
JessyGigato Mar 11, 2022
1ab6967
fixing
JessyGigato Mar 11, 2022
2d45c28
cyclic dependency fixed
Mar 11, 2022
5adce7c
Merge branch 'master' of https://github.com/ycimadevila/cool-compiler…
JessyGigato Mar 11, 2022
61fd2fb
--
JessyGigato Mar 11, 2022
43d5304
fixing errors
JessyGigato Mar 11, 2022
27064a6
semantic donde, hope it works X')
Mar 11, 2022
3426470
fixing entry
Mar 11, 2022
787aa4a
-
Mar 11, 2022
80ef284
Merge branch 'master' of https://github.com/ycimadevila/cool-compiler…
JessyGigato Mar 11, 2022
c1632b3
-
Mar 12, 2022
84066cf
cil almost complete
JessyGigato Mar 13, 2022
8bc5d33
fixing errors
JessyGigato Mar 13, 2022
44dd6fe
declaration collector
ycimadevila Mar 13, 2022
056c979
--
JessyGigato Mar 13, 2022
25333cd
fixing errors
Mar 13, 2022
e057784
-
Mar 13, 2022
1db2187
-
Mar 13, 2022
565cba3
updating ast and fixing pos
Mar 31, 2022
137e91f
fixing inference errors
JessyGigato Apr 3, 2022
7f131f8
semantic_test case done!
ycimadevila Sep 21, 2022
8d74bf3
-
ycimadevila Sep 21, 2022
e49ef63
fixing errors
ycimadevila Sep 22, 2022
e75ad07
-
ycimadevila Sep 29, 2022
4500113
coge generation ast-null
ycimadevila Oct 9, 2022
4f3bd56
new ast with types, skeleton
ycimadevila Oct 10, 2022
9ce53ed
binary and unary almost done
ycimadevila Oct 10, 2022
9aa128a
while and block almost done
ycimadevila Oct 12, 2022
948a638
var, new almost done, fixing errors, working on methCallNode
ycimadevila Oct 13, 2022
f040d94
fixing errors, casenode done
ycimadevila Oct 13, 2022
e14a3c4
updating cil nodes
ycimadevila Oct 21, 2022
1c30be0
working on ast cil, adding new features, working on cool-cil
JessyGigato Oct 25, 2022
1b42e14
starting arithmetic expression,starting main
JessyGigato Oct 25, 2022
82ad55c
fixing errors, functions almost done
ycimadevila Nov 2, 2022
c73c2a6
adding functins, error at cil.PN, cleaning function bugs
ycimadevila Nov 2, 2022
6a80b1d
cool.arithm almost done
ycimadevila Nov 2, 2022
6bcf9be
--
ycimadevila Nov 4, 2022
2d1b9eb
-, cil to mips
ycimadevila Nov 5, 2022
96406a6
fixing bugs, working on CaseNode
ycimadevila Nov 5, 2022
651307a
fixing locals, casenode
JessyGigato Nov 7, 2022
2bc88df
case almost done
JessyGigato Nov 8, 2022
0ffb0d3
mips-ast, cil-to-mips skeleton
ycimadevila Nov 8, 2022
4dc1c3a
--
ycimadevila Nov 9, 2022
1de2b15
mips arithmetics almost done
JessyGigato Nov 9, 2022
5215048
working on allocate
ycimadevila Nov 10, 2022
6f771b9
--
ycimadevila Nov 10, 2022
a4cd4c5
goto-if, dycall, stcall, comm fixed, error at alloc
ycimadevila Nov 10, 2022
c3dee1c
equal almost done(int, string) and copy
JessyGigato Nov 10, 2022
08267bc
read and print (str, int)
JessyGigato Nov 11, 2022
ac2445d
-, errors fixed, concatnode
JessyGigato Nov 11, 2022
c9838ac
typename, set/get (index, indexvalue)
ycimadevila Nov 12, 2022
ed10260
fixing formater, -
ycimadevila Nov 13, 2022
3ac2bcc
mips with error at functions, allocate fixed
ycimadevila Nov 13, 2022
9b87084
cg - hello word ok
ycimadevila Nov 13, 2022
42f6126
atoi, fib, print-cool ok
ycimadevila Nov 14, 2022
26c53da
fixing errors
ycimadevila Nov 14, 2022
75de922
formatter testing
ycimadevila Nov 15, 2022
8be7af7
--
ycimadevila Nov 16, 2022
05fc459
fixing typing
ycimadevila Nov 18, 2022
26156b6
--
ycimadevila Nov 19, 2022
e99f1b2
register fixing
ycimadevila Nov 20, 2022
d75fbe2
cg almost done
ycimadevila Nov 20, 2022
5670cbd
cleaning code
ycimadevila Nov 20, 2022
f9ecb05
--
ycimadevila Nov 20, 2022
3e7fc52
report
ycimadevila Nov 21, 2022
8fb1326
report update
ycimadevila Nov 21, 2022
d52d56d
adding pdf report
ycimadevila Nov 21, 2022
999b2b2
--
ycimadevila Nov 21, 2022
6ad2137
--
ycimadevila Nov 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
half semantic tests done :')
ycimadevila committed Mar 2, 2022
commit e06cc83d1585c0012ee6451ed4d1ffd76231a750
2 changes: 1 addition & 1 deletion src/coolc.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
print('Copyright (c) 2021: Yasmin Cisneros Cimadevila & Jessy Gigato Izquierdo')

def run():
sp = subprocess.run(['python3', 'utils/pipeline.py', 'final-execution', input_file, output_file], capture_output=True, timeout=100)
sp = subprocess.run(['python', 'utils/pipeline.py', 'final-execution', input_file, output_file], capture_output=True, timeout=100)
dcode = sp.stdout.decode()
print(dcode)
exit(sp.returncode)
5 changes: 3 additions & 2 deletions src/utils/pipeline.py
Original file line number Diff line number Diff line change
@@ -269,11 +269,12 @@ def final_execution(program_file, program_file_out, debug: bool = False, verbose
# e.text
# errors
if errors:
print_errors('\n'.join(errors))
# print_errors('\n'.join(errors))
print_errors(errors[-1])
# InferenceTypeChecker(context, errors).visit(ast, Scope())
# CodeBuilder().visit(ast, 0) # se puede ver el codigo transformado
# Execution(context).visit(ast, Scope())

exit(1)
### code generation ###

# return "\n".join(errors)
1 change: 1 addition & 0 deletions src/utils/utils/type_analysis.py
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@ def visit(self, node: ast.ProgramNode):
# defining methods
object_type.define_method('abort', [], [], object_type)
object_type.define_method('get_type', [], [], str_type)
object_type.define_method('type_name', ['str'], [str_type], str_type)
object_type.define_method('copy', [], [], object_type)
str_type.define_method('length', [], [], int_type)
str_type.define_method('concat', ['str'], [str_type], str_type)
11 changes: 0 additions & 11 deletions tests/semantic/arithmetic-1.cl

This file was deleted.

1 change: 0 additions & 1 deletion tests/semantic/arithmetic-1_error.txt

This file was deleted.