Commit Graph

283 Commits

Author SHA1 Message Date
Romain Goyet
59092a66df Remove an useless cast
Change-Id: Ice3227284b5f31c08e9b18fe4696e7910e2bd0bc
2016-03-24 13:53:21 +01:00
Romain Goyet
d50e245398 Poincare: Simplify Integer addition
Change-Id: Iedcdbe2ae20dd6fe648ca168fe80e3be5f2c31b8
2016-03-24 13:53:08 +01:00
Romain Goyet
0d7813dc7b Poincare: Expressions can now be cloned
Change-Id: I5a291c56dd031ec5e7aa6fbfe09823807f1b0e3c
2016-03-24 13:35:16 +01:00
Romain Goyet
ae3f087a95 Poincare: CommutativeOperation can take an expression of any length
Change-Id: Icf86134c9d3daf14636b073c8215a4e614d2b3f6
2016-03-24 13:10:41 +01:00
Romain Goyet
6edb36cef3 Poincare: Expression parsing shouldn't modify the string
Change-Id: I29bd1a81fa0b88b7151e3a79a47d287e9775b357
2016-03-24 13:09:54 +01:00
Romain Goyet
fe3667639f Merge "Poincare: Add a CommutativeOperation class" 2016-03-24 11:54:48 +01:00
Romain Goyet
657c4d8299 Merge "Poincare: Simplifier -> Simplify" 2016-03-24 11:54:45 +01:00
Romain Goyet
7b40c0a948 Merge "Poincare: Clean the Expression::Type" 2016-03-24 11:54:39 +01:00
Félix Raimundo
5e1edae4a9 Merge "Remove hardcoded font size." 2016-03-24 11:43:04 +01:00
Romain Goyet
3e5695de21 Poincare: Add a CommutativeOperation class
Change-Id: I420ff65050de513d7b7db94afed2e5bb9f044390
2016-03-24 11:42:08 +01:00
Romain Goyet
7f0a3f94bb Poincare: Simplifier -> Simplify
Change-Id: I1dfdf9e9d99ffd0ce604547b54c88263e621b97b
2016-03-24 10:39:00 +01:00
Romain Goyet
dfdaa54928 Poincare: Clean the Expression::Type
Change-Id: I3809a8b1b040314466554866555fb634c35156a5
2016-03-24 10:19:04 +01:00
Felix Raimundo
cb2bcb6ad9 Remove hardcoded font size.
Change-Id: I5fbd54467ec727bb3f93ecb75e03593d466e9b7b
2016-03-23 19:05:56 +01:00
Félix Raimundo
a18eac8059 Merge "Adds a text_input function to get text." 2016-03-23 18:55:13 +01:00
Romain Goyet
2f77d70369 Poincare: Product can now have more than two factors
Change-Id: Ia9d606e1a3a1649265fdcfe5e2ba8579e7fd7c7b
2016-03-23 17:52:26 +01:00
Felix Raimundo
fd95a7e558 Adds a text_input function to get text.
Also removes ion_getchar in favor of ion_get_event.

Change-Id: Id95ea509315185da24fd2a3fe90969da0bd19cfc
2016-03-23 17:31:59 +01:00
Romain Goyet
d3b0841af6 Poincare: Add a simplifier
Change-Id: Iac53c9b7dda5cb284fe750bb84c92ce5d1fba497
2016-03-23 17:24:11 +01:00
Romain Goyet
55a76ac530 No tabs for indentation
Change-Id: I824cf74288131283e798ca20fdf985a02a428921
2016-03-23 17:23:45 +01:00
Félix Raimundo
66ef3f1647 Merge "Final pass at removing the warnings." 2016-03-23 12:49:31 +01:00
Romain Goyet
35228e83af Define and use HOSTCC
Change-Id: If38c488233007e86c2e1e999861836a0ffbbf1e8
2016-03-23 12:35:25 +01:00
Felix Raimundo
411e983ccf Final pass at removing the warnings.
Change-Id: I4cd0276c97112e69fe2449c8db5eaaa1c186dfb6
2016-03-23 11:42:32 +01:00
Felix Raimundo
80ad6e606b Removed all warnings, now in Werror
Change-Id: I02dbd9fef2c1b5d6aba4ea713f1e1ea305b389bf
2016-03-22 18:56:00 +01:00
Felix Raimundo
d84e139954 Remove some warnings.
Change-Id: I5a856edc3ebc7ccb352865d62b2b12cdfc8426ca
2016-03-22 18:39:59 +01:00
Felix Raimundo
2ee147a48c Remove dead code in Makefiles
Change-Id: I57363da89a49443be7fad8f687299393bc0f3a82
2016-03-22 18:39:59 +01:00
Felix Raimundo
605dd9f372 Add memory_map for simulator.
Also use clang for the simulator building.

Change-Id: I87f5b938d9066375fbfabfdcdd3c5218c9790bb0
2016-03-22 18:39:59 +01:00
Felix Raimundo
9f9d05e822 Add the test output to the .gitignore
Change-Id: I8c7e6e277b05a0fd8ea305400818494637fb3cf1
2016-03-22 18:39:59 +01:00
Felix Raimundo
1f9b440182 Added some basic tests for the AST members.
Change-Id: I9a1f297fb72a57e9b58e3951c22066134c8da9ea
2016-03-22 18:39:59 +01:00
Felix Raimundo
3c514a78e0 Change Substraction to Subtraction.
Only changed the files name last time.

Change-Id: I85a809f9ea349e1bec771c61a18d4b5e9b491fdc
2016-03-22 18:39:59 +01:00
Felix Raimundo
5f86659bd3 Remove some dead code.
Change-Id: I62c0effa23db161f498b1a133ee6ab80e8e7d481
2016-03-22 18:39:59 +01:00
Felix Raimundo
fcca8e77f1 Add a test for products.
Change-Id: I479f4fa49bca62dd1d558c745a3b43f9ab55a72a
2016-03-22 18:39:59 +01:00
Felix Raimundo
a5f01b35af Fix integer test compilation.
Change-Id: Icf8f4a6f88f6ba8c31f51f3d37dca334faad94a6
2016-03-22 18:39:59 +01:00
Felix Raimundo
45b0ce8256 Add a cursor to the input.
Change-Id: I3e1467b5d21c87f095ecaaeb27becddaef0e1370
2016-03-22 18:39:59 +01:00
Felix Raimundo
2778ccea11 Use the same macro for the screen size.
The screen size used to be defined by the framebuffer size, this was weird,
the creen size can be defined in the makefile if needed (in order to have different one for
different targets)

Change-Id: Ie294fba5f6cf5e942b4b35847ae8ccd18d3ddf85
2016-03-22 18:39:59 +01:00
Felix Raimundo
16b650c5d5 Add left and righ arrows to move in the expression
Change-Id: Icf58335c9a78a97bdbed0da5d01f715dc11757d2
2016-03-22 18:39:59 +01:00
Felix Raimundo
4e9c33de2d Put the keys on the simulator.
NOTE: I messed up a merge so this si a bad commit.
Change-Id: I80c9bc3f9dd8b1d24069eb0cc87ce7fe15368071
2016-03-22 18:39:59 +01:00
Félix Raimundo
5c82826a34 Merge "Small hack to get keys on the simulator." 2016-03-22 18:02:27 +01:00
Felix Raimundo
3cf9f3ebcb Small hack to get keys on the simulator.
NOTE: this is really hacky and should be improved as soon as possible,
but working zithout it is just to big a pain.

Change-Id: I01e322fa5f653f04e9fdf6b16b4b9fe023a4fe93
2016-03-21 18:30:01 +01:00
Romain Goyet
737d878c1e Build on Bison 3.0.4.
This will be the reference version from now on. Note that the error was
about a missing declaration of yyscan_t, which we really don't need to
care about, and that we can simply replace by "void *".

Change-Id: I2294a8cc8bcb4a426019a5ebc6cf83b28d4bae1a
2016-03-20 19:16:06 +01:00
Romain Goyet
8e067f3f52 Fix a typo in the Bison grammar
Change-Id: I854b6adefca4518108a4678557c4d7f91bdaea40
2016-03-20 10:21:51 +01:00
Felix Raimundo
eed53079ca Add EOF to stdio.h
Change-Id: I94e2b93bbfe50fd8daaf0ad5f8c2447c0d6fbef4
2016-03-18 18:55:25 +01:00
Romain Goyet
23bd7048b4 Merge "Add associativity rules to the lexer" 2016-03-18 17:15:59 +01:00
Romain Goyet
3c795a8763 Fix the guardian
Change-Id: I14af6937fecfbe90ab053594e1269fcbc3681b1c
2016-03-18 17:03:18 +01:00
Romain Goyet
cddb2ab887 Don't depend on the PLATFORM variable being defined
Change-Id: Ia1d0e5f320dfc0c6ab1cf8a588c297cbbc3c0df3
2016-03-18 16:53:01 +01:00
Romain Goyet
2c702874fd Silent the linker build step
Change-Id: I6be94ec821e54ff474ec720ac0602cf25d60def1
2016-03-18 16:52:47 +01:00
Romain Goyet
2f80d17137 Don't define the PLATFORM value in the SFLAGS
Change-Id: Ic3a6729d93b8c61dda73c0aef102103bfa5f22d6
2016-03-18 16:52:29 +01:00
Romain Goyet
fd0c6eaba3 Add a (fake) implementation of powf in liba
Change-Id: I14af6937fecfbe90ab053594e1269fcbc3681b1c
2016-03-18 16:52:02 +01:00
Felix Raimundo
1ee6c58a97 Add associativity rules to the lexer
Change-Id: I684264a4bec04567a2edc9fcb1b418d517a552a2
2016-03-18 15:47:24 +01:00
Felix Raimundo
b5b11e0120 Pretify the makefile.
Change-Id: I14e8d3a5fcdd23b0cd28094d0d1f9d2dc702f86e
2016-03-18 14:33:53 +01:00
Felix Raimundo
a4e3f1e2d1 Compute power for real on the simulator.
Change-Id: I790f0b1216584835cd551893f16c052d21de7e31
2016-03-18 14:33:48 +01:00
Felix Raimundo
d1b14397ed Adds the priorities to the parser and lexer.
Change-Id: I28950e802ab223460b2d283f2d7f4908ff8d9760
2016-03-18 14:33:44 +01:00