Commit graph

143 commits

Author SHA1 Message Date
Tiffany Bennett
beffeeeade Release 0.3.0 2016-08-26 18:09:30 -04:00
Tiffany Bennett
66ebc615f3 More informative sqrt errors 2016-08-26 16:44:29 -04:00
Tiffany Bennett
f59d5395be Error on potentially confusing number literals 2016-08-25 22:52:02 -04:00
Tiffany Bennett
0041d12b1e Prevent weird decompositions like Pa m -> A tesla 2016-08-25 22:41:16 -04:00
Tiffany Bennett
685e5149d1 Use more deterministic data structures 2016-08-25 22:32:38 -04:00
Tiffany Bennett
755c853cc7 Change lookup order for -s vs prefixes 2016-08-25 21:59:42 -04:00
Tiffany Bennett
eb185656dd Canonicalize to longer version of prefix 2016-08-25 21:57:53 -04:00
Tiffany Bennett
4049a8c922 Fix panic in query tokenizer 2016-08-25 15:54:15 -04:00
Tiffany Bennett
628d9e0ae6 Show symbols instead of internal token names 2016-08-25 15:50:15 -04:00
Tiffany Bennett
e366ec430e Remove vestigial tokens 2016-08-25 15:48:12 -04:00
Tiffany Bennett
d89fbc767f Fix typo "Carot" token 2016-08-25 15:30:03 -04:00
Tiffany Bennett
f019bc8bea Hopefully fix parser bugs for good this time
Temperature is now parsed as part of parse_mul, and an additional
regression test has been added to cover the bug that this fixed.
2016-08-25 15:27:16 -04:00
Tiffany Bennett
30b244c961 Add more ways to refer to bits and bytes 2016-08-25 15:18:42 -04:00
Tiffany Bennett
286fd0e44c Add a few new quantities 2016-08-24 22:34:54 -04:00
Tiffany Bennett
5d972ffce3 Add some more suffix operator tests 2016-08-24 22:05:22 -04:00
Tiffany Bennett
ebb2f5995d Make / lower precedence than *, add |
| has higher precedence than *
2016-08-24 21:56:55 -04:00
Tiffany Bennett
dedc2d7620 Regression test for temperature suffixes 2016-08-24 21:31:37 -04:00
Tiffany Bennett
5bdc7da65d Fix tests 2016-08-24 21:29:48 -04:00
Tiffany Bennett
f4ba7f4884 Show base units in definition listings 2016-08-24 21:17:57 -04:00
Tiffany Bennett
888313e7e2 Fix parser bug with terms after a suffix operator 2016-08-24 21:07:36 -04:00
Tiffany Bennett
353f82804d Add units for query 2016-08-24 17:24:58 -04:00
Tiffany Bennett
6180935d63 Canonicalize user input units 2016-08-24 15:25:35 -04:00
Tiffany Bennett
262ee80a7c Add unit list conversions
e.g. megasecond -> hour;min;sec
2016-08-24 15:04:13 -04:00
Tiffany Bennett
3f32bc30a7 Separate expressions from top-level queries 2016-08-24 13:46:30 -04:00
Tiffany Bennett
52c19f6920 Detect reciprocal conversions better
Detect squared units and inverted units in conformance errors as well.
2016-08-24 12:56:42 -04:00
Tiffany Bennett
0a5704b039 Improve showing definitions
Recursively resolves "alias" units, actually shows value in terms of
base units.
2016-08-24 12:36:17 -04:00
Tiffany Bennett
cd05875490 Add ℃ and ℉ keywords 2016-08-24 12:25:46 -04:00
Tiffany Bennett
cfeca70dc2 Rename some commonly confused units 2016-08-24 12:23:15 -04:00
Tiffany Bennett
b2a87e8dc6 Add some basic unit tests 2016-08-22 19:20:49 -04:00
Tiffany Bennett
b4f3d02539 Fix associativity of addition and subtraction 2016-08-22 17:11:02 -04:00
Tiffany Bennett
7158fe81e1 Remove vestigial frink definition parser 2016-08-22 15:03:26 -04:00
Tiffany Bennett
2d84daf064 Add dedicated date patterns file, improve dates
There is now a dedicated lexer for date literals, which handles ISO 8601
dates (with the T) properly now.

Parsing of date patterns is handled in date.rs now, instead of in unit_defs.rs.
2016-08-22 14:53:33 -04:00
Tiffany Bennett
b75e67f86c Compile in definitions.units by default
This makes the default compilation of rink invoke the secondary
licensing clause, which results in the binaries being under the GPL.

You can still use your own definitions.units - it will only use the
built in one if it can't find another.
2016-08-22 12:03:00 -04:00
Tiffany Bennett
3181e24e29 Switch to MPL 2016-08-22 10:46:22 -04:00
Tiffany Bennett
1e26f13bee Fix unevenly spaced = in definition output 2016-08-21 22:35:21 -04:00
Tiffany Bennett
0576611968 Merge branch 'gnu_units' 2016-08-21 22:32:40 -04:00
Tiffany Bennett
7169be2ef9 Fix regression with printing dimensionless values 2016-08-21 22:31:24 -04:00
Tiffany Bennett
ea3284f2b2 Update documentation to refer to definitions.units 2016-08-21 22:26:04 -04:00
Tiffany Bennett
4cbffea0ed Show definitions for single-unit queries 2016-08-21 22:16:28 -04:00
Tiffany Bennett
a5ddd614bc Add output of computed derived units
E.g. a calculation with a result of W^2 will show as 1 watt^2 = kg^2 m^4 / s^6
2016-08-21 21:25:49 -04:00
Tiffany Bennett
6432f0b864 Fix quantity conflicts 2016-08-21 15:28:42 -04:00
Tiffany Bennett
5413bd1a22 Add radiometric units 2016-08-21 11:20:58 -04:00
Tiffany Bennett
c9ad5d9ff0 Enable dimensionless primitive units 2016-08-21 10:55:44 -04:00
Tiffany Bennett
920fffe9ca Introduce quantity syntax to gnu units definitions 2016-08-21 10:50:26 -04:00
Tiffany Bennett
ef2362f6bc Fix precedence of / in GNU units 2016-08-21 09:53:14 -04:00
Tiffany Bennett
6aac7bab8c Run successfully off of definitions.units 2016-08-20 21:35:56 -04:00
Tiffany Bennett
5a679beba0 WIP out of order definition resolver 2016-08-20 20:03:02 -04:00
Tiffany Bennett
20e8e1adbd Impl Debug for Number 2016-08-20 20:02:38 -04:00
Tiffany Bennett
24f510f1f4 Implement gnu units parser 2016-08-20 17:00:26 -04:00
Tiffany Bennett
8db988c589 Implement tokenizer for GNU definitions.units 2016-08-20 15:11:27 -04:00