octal -package:text-printer
Parses a non-negative whole number in the octal system. The number
should be prefixed with "o" or "O". Returns the value of the number.
Parse an integer in the octal representation. The format of the octal
number is expected to be according to the Haskell report except for
the fact that this parser doesn't parse “0o” or “0O” prefix. It is a
responsibility of the programmer to parse correct prefix before
parsing the number itself.
For example you can make it conform to the Haskell report like this:
octal = char 48 >> char' 111 >> L.octal
Warning: this function does not perform range checks.
Parse an integer in the octal representation. The format of the octal
number is expected to be according to the Haskell report except for
the fact that this parser doesn't parse “0o” or “0O” prefix. It is a
responsibility of the programmer to parse correct prefix before
parsing the number itself.
For example you can make it conform to the Haskell report like this:
octal = char '0' >> char' 'o' >> L.octal
Note: before version
6.0.0 the function returned
Integer, i.e. it wasn't polymorphic in its return type.
Warning: this function does not perform range checks.
Parses a non-negative whole number in the octal system. The number
should be prefixed with "o" or "O". Returns the value of the number.
This parser does NOT swallow trailing whitespace
Octal representation of an integer.
>>> octal @Int32 123456
"00000361100"
>>> octal @Int32 (-123456)
"77777416700"
Parse an integer in the octal representation. The format of the octal
number is expected to be according to the Haskell report except for
the fact that this parser doesn't parse “0o” or “0O” prefix. It is a
responsibility of the programmer to parse correct prefix before
parsing the number itself.
For example you can make it conform to the Haskell report like this:
octal = char '0' >> char' 'o' >> L.octal
Note: before version
6.0.0 the function returned
Integer, i.e. it wasn't polymorphic in its return type.
Warning: this function does not perform range checks.
Recognize an octal number. Must have a prefix of the form
0o/
0O.
>>> octal
(re.++ (re.union (str.to.re "0o") (str.to.re "0O")) (re.+ (re.range "0" "7")))
>>> prove $ \s -> s `match` octal .=> sAny (.== take 2 s) ["0o", "0O"]
Q.E.D.
parse an octal number preceded by an o or O character
parse an octal number preceded by an o or O character
The octal numeral system.
Octal digits of a non-negative integral number.
Octal value is greater than "\377". Since 2.16
Get the value of the “
scan_octal” field. When
overloading is enabled, this is equivalent to
get scannerConfig #scanOctal
Set the value of the “
scan_octal” field. When
overloading is enabled, this is equivalent to
set scannerConfig [ #scanOctal := value ]
Get the value of the “
v_octal” field. When
overloading
is enabled, this is equivalent to
get tokenValue #vOctal