Mercurial > lcfOS
view test/expression.x @ 332:87feb8a23b4d
Added task list command
author | Windel Bouwman |
---|---|
date | Fri, 07 Feb 2014 12:51:55 +0100 |
parents | e84047f29c78 |
children |
line wrap: on
line source
%tokens '+' number '(' ')' '*' %% input: expression {return $1}; expression: term { return $1 } | expression '+' term {}; term: factor { return $1 } | term '*' factor { return $1 * $3 }; factor: '(' expression ')' | number {return $1.val};