Make Unit string output parsably and add Pascale and Newtons

This commit is contained in:
jriegel
2013-11-10 15:38:23 +01:00
parent fab8d7d70b
commit ac9395d113
5 changed files with 331 additions and 258 deletions

View File

@@ -58,6 +58,7 @@
| unit '*' unit { $$ = $1 * $3; }
| unit '/' unit { $$ = $1 / $3; }
| unit '^' num { $$ = $1.pow ($3); }
| '(' unit ')' { $$ = $2; }
;
quantity: num unit { $$ = $1*$2; }
;