Commit Graph

383 Commits

Author SHA1 Message Date
Romain Goyet
9c60f0bfb9 Merge branch 'master' of ssh://git.numworks.com:2222/CalcOS
Change-Id: I5dca6556382400727625ff2e97cba8f382be3ca7
2016-04-12 18:48:02 +02:00
Romain Goyet
a21f201cc0 Escher: Adding a GUI toolkit
Change-Id: I9c78cc1afdd35968110484c3e3782c866b88c671
2016-04-12 18:47:36 +02:00
Felix Raimundo
2f7b1f4860 Add the cloneWithNewOperands method.
This allows to replace the operands of an expression with new ones.

Change-Id: I3c2d183bbdbcc43b776f7ce2a302216c52e494bd
2016-04-11 12:21:14 +02:00
Felix Raimundo
33226cc3a9 Dirty fix device build.
It seems that gcc generates instructions it cannot use which is weird.
The offending line was:
char input[255] = {0};

It was trying tp use __eabi_memclr for that which it did not have.

We need to find out why it generates instruction it cannot use (probably some
wrong flags somewhere).

Change-Id: I6a05280ce8876aa50e2cd6d5a112d18d266581c4
2016-04-08 18:23:18 +02:00
Felix Raimundo
ecab47b1e4 Fix bad assert.
Change-Id: Id9c6b9d100a978df8e25758d84f828ab31babe3d
2016-04-08 13:43:57 +02:00
Felix Raimundo
efb35e184a Plot auto zooms.
Change-Id: I8c15f4265e098ff05fcddf3226409491913ae8e0
2016-04-08 13:43:57 +02:00
Felix Raimundo
8025b5d77b Change comments style.
Change-Id: If25ab708d6ebb3ad8793a0635e05d345b26bc5b0
2016-04-08 13:43:55 +02:00
Félix Raimundo
a53231b513 Merge changes I6f080a4c,I676e8b80,I9d2ff286
* changes:
  Nicer plot
  Prototype of the history for user inputs.
  First part for adding history to the user input.
2016-04-07 18:49:30 +02:00
Romain Goyet
639d24940a Poincare: Remove in-class implementation
Since those have to be inline though, keep them in the header

Change-Id: I561abd3cdfd5acfa33099e2ccd36cf05d53a5bca
2016-04-07 18:15:09 +02:00
Romain Goyet
9141be784b Poincare: Simplify products
Change-Id: Ic1c558c9b210c1e7f4fcc859118cf18f73adab68
2016-04-07 18:08:57 +02:00
Romain Goyet
e9f28c4f45 Poincare: Fix tests
Change-Id: Ie5f08a35dae854a16a3286a3015e9942c612948b
2016-04-07 17:53:48 +02:00
Romain Goyet
0ac978468a Poincare: Pointer arithmetics doesn't play well with inheritance
Change-Id: I78cc57ca60bb703f00922f5257d53d6112a97f91
2016-04-07 17:31:05 +02:00
Felix Raimundo
f334977c6a Nicer plot
Change-Id: I6f080a4c26ad8ce574661228a4d4b53632d2f870
2016-04-07 16:53:39 +02:00
Romain Goyet
b849baf0d9 Poincare: ExpressionSelector is not a POD object anymore
Change-Id: Ie07c4b308d06e1726d6a9ba9dc54bafe8ab57655
2016-04-07 15:57:32 +02:00
Romain Goyet
07f749ff2a Poincare: Proper macro to enable expression debug
Change-Id: Ie1e880f5f80a5ce49424319a9af9d97bf10f2ef4
2016-04-07 15:51:16 +02:00
Romain Goyet
d2a010be70 Poincare: RuleGen now uses a more explicit grammar
Change-Id: I22ca00a7115d8c60fd0aa95ec17deec829e0a69d
Examples: Integer.a and Integer["0"]
2016-04-07 15:51:16 +02:00
Romain Goyet
1f64dfda9d Ignore the rulegen generated files
Change-Id: Icbbe984dedbedf7c4b74e496fbd43279cc49b7e0
2016-04-07 15:51:16 +02:00
Romain Goyet
e41150f56d Poincare: Removing dead code
Change-Id: I6d38a7f7be99e8b219f541673b6cb5815b9408d9
2016-04-07 15:51:16 +02:00
Romain Goyet
d9354ac1cc ExpressionBuilder now has both BuildFromType and BuildFromTypeAndValue
Change-Id: If4a25b9b4df4097b0b3b7e92cbd49e2ac764d075
2016-04-07 15:51:16 +02:00
Romain Goyet
91505631c7 Poincare: Simplification is not a POD object either but uses constexpr
Change-Id: If7b6a33720eddb41b5cdf016e131bde873474043
2016-04-07 15:51:16 +02:00
Romain Goyet
c870c28e61 Poincare: ExpressionBuilder and ExpressionSelector are not PODs anymore
This means we cannot initialize them by using C99-style static init.
C++11 to the rescue: we're using constexpr constructor to build them
statically, without any runtime cost.

This allows us to have private member variables, and a base class.

Change-Id: I0617d196e87f946b48375f42b600eb73e366d87d
2016-04-07 15:51:16 +02:00
Romain Goyet
acef4c079e Poincare: Add a ContiguousTree class
Note that this class is not being used yet.

Change-Id: Iaf58ab2e90f54df11ab81ed4ac62ab26b524b99d
2016-04-07 15:51:16 +02:00
Felix Raimundo
4e8ee1bf02 Prototype of the history for user inputs.
Change-Id: I676e8b80ec092891117827eda5213c6f1cfac733
2016-04-07 12:44:05 +02:00
Felix Raimundo
11a5550bfd Fix issue in a selector.
Change-Id: I8079ffd7aeb4117f0edec9c292cacb56adf20a7f
2016-04-07 12:44:05 +02:00
Felix Raimundo
23aef52622 First part for adding history to the user input.
Change-Id: I9d2ff28641f0d3b7fe382a765ad8cc084840c2ef
2016-04-07 12:44:05 +02:00
Felix Raimundo
7a7df647f3 Fix the printing of integers.
Because yes, multiples of 10 would not print...

Change-Id: Id58305086d499eb091ea5612fedcc5ec6f25c415
2016-04-07 12:44:05 +02:00
Felix Raimundo
5c96e04a6a Add tests for the simplification rules.
Change-Id: I086e18b2fcea5deb725872cf1254b6c2636a032a
2016-04-07 12:44:05 +02:00
Felix Raimundo
906363d4f6 Make simplifictaion able to deal with commutativity.
Change-Id: Ide620b0453ac54f0edbf2efa4c986f969392a701
2016-04-07 12:44:05 +02:00
Félix Raimundo
68cc944cdc Merge "Fix the build" 2016-04-07 12:43:53 +02:00
Felix Raimundo
e584bdf4b9 Big fingers
Change-Id: I54b0515cb519fc395c0e24ea0809316ffec1a42f
2016-04-06 19:04:24 +02:00
Romain Goyet
344c2d1ead Fix the build
Change-Id: I17bb89c51b1d4231a3cec3b91b453583e872d1b2
2016-04-06 15:20:36 +02:00
Félix Raimundo
c50125e631 Merge changes I0b5de34d,I2b67ac89,I657df96c,I9a2ed44d,I682fed31, ...
* changes:
  Add the multip[lictaion by zero rule.
  Add coment to move operator in expression match.
  Add the isCommutative method to expression.
  Fix untreated case in rule generation.
  Fix the precedence of the operations.
  Fix unitialized variables in HorizontalLayout.
  Writes the simplified version of an expression.
2016-04-05 16:02:37 +02:00
Félix Raimundo
ade4dd30ed Merge "Draw rectangles with lines." 2016-04-05 16:01:57 +02:00
Felix Raimundo
43b90c104c Add the multip[lictaion by zero rule.
Also fix the writting of Wildcard.

Change-Id: I0b5de34d6528b8eb0cb73b77c65396b28e63c2dc
2016-04-05 15:53:29 +02:00
Felix Raimundo
8366cf71ec Add coment to move operator in expression match.
Change-Id: I2b67ac892a69d5b711adff5623259fce811ec31f
2016-04-05 15:53:29 +02:00
Felix Raimundo
ac29d1e9aa Add the isCommutative method to expression.
Change-Id: I657df96c5e24168ecd04470252549ed84eb2cfe3
2016-04-05 15:53:29 +02:00
Felix Raimundo
b7a1bb9cdb Fix untreated case in rule generation.
Add an assert showing that a case is not implemented.

Change-Id: I9a2ed44d52cb7b1df1fab1b2765f966a67c95586
2016-04-05 15:53:29 +02:00
Felix Raimundo
c94b209729 Fix the precedence of the operations.
Change-Id: I682fed318aaefdcc64489e922ba0e91c0cb4979d
2016-04-05 15:53:29 +02:00
Felix Raimundo
50c5a3b08e Fix unitialized variables in HorizontalLayout.
Change-Id: I37beaae4e0e1bd6931c420d72b145ba42d5fb452
2016-04-05 15:53:20 +02:00
Romain Goyet
195e8932af Merge "Poincare: Make the rulegen step silent" 2016-04-05 12:56:35 +02:00
Romain Goyet
792b89dc07 Poincare: Make the rulegen step silent
Change-Id: Ic2fd2b603ed6d0a84e5a738c17fb179403844c72
2016-04-04 14:40:04 +02:00
Felix Raimundo
ff83c8c4da Draw rectangles with lines.
Change-Id: I257ea485e67d2cc1c2ad5f9405fe507f3f4d00f1
2016-04-04 11:05:49 +02:00
Felix Raimundo
10c383d102 Writes the simplified version of an expression.
Change-Id: If0e89735a85a684ad4c044ae4b8d6f8a9ae81dac
2016-04-04 11:05:49 +02:00
Félix Raimundo
89647c995d Merge "Poincare: Silent build" 2016-04-04 11:05:32 +02:00
Félix Raimundo
586a850610 Merge "Add a delete button to the keyboard." 2016-04-04 10:50:03 +02:00
Felix Raimundo
f9b7836e1e Add a delete button to the keyboard.
Change-Id: I10e57f19a7edfb4a59fb3c2f48bc0f8a8a58643f
2016-04-01 15:13:47 +02:00
Romain Goyet
6cd646cc98 Poincare: Silent build
Change-Id: I49afd7f71c211dbaa8453608570d3972ecb08517
2016-04-01 15:12:12 +02:00
Romain Goyet
b9722aa0d8 Merge branch 'master' of ssh://git.numworks.com:29418/CalcOS
Change-Id: I3a0f53c58707de1100412dc6572abe6b852e9cb2
2016-04-01 15:09:34 +02:00
Felix Raimundo
a9a522f29c Remove bad debug.
Change-Id: Id8a0780aa9782ebbbf4118ed210de3acaa9ae9ff
2016-04-01 15:05:20 +02:00
Felix Raimundo
6238b5a110 Add the ability to match on values.
Change-Id: Id38aad5b64913c948966c980fb4415749b2c435d
2016-04-01 15:05:20 +02:00