Mercurial > octave-nkf
view test/bug-35448/bug-35448.tst @ 20624:7c0e10f035bd
Extend parser to accept binary constants that begin with '0b' or '0B'.
* NEWS: Announce change:
* lex.ll: Define NUMBIN to be 0[bB] followed by 0,1, or '_'.
Define NUMBER to be NUMREAL|NUMHEX|NUMBIN.
*lex.ll (looks_like_bin): New function to detect 0[bB] prefix.
*lex.ll (handle_numbe): Call looks_like_bin() and if found then convert
binary string to double.
* parser.tst: Add tests for new behavior.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 09 Oct 2015 18:52:58 -0700 |
parents | 1af8d21608b7 |
children |
line wrap: on
line source
%!test %! global gfun %! gfun = @fB; %! y = fA (e); %! assert (y, e); %!test %! global gfun %! gfun = @fC; %! y = fA (e); %! assert (y, e);