Fix bugs

-add tickgetus() function
-fix bugs in lex decoder
-fix bugs in linux environment