Frac

Frac

class Frac

From the docs.


frac       ::= empty                               => 0
d:digit q:frac                      => (d + q) / 10
d:digit '' p:digit q:frac          => (d + (p + q) / 10) / 10
hexfrac    ::= empty                               => 0
h:hexdigit q:hexfrac                => (h + q) / 16
h:hexdigit '' p:hexdigit q:hexfrac => (h + (p + q) / 16) / 16

Fields

Name Description
var forceHex: Boolean
val foundHexChars: Boolean
val value: Double

Constructors

<init>

constructor(sequence: CharSequence, context: ParseContext?)

From the docs.


frac       ::= empty                               => 0
d:digit q:frac                      => (d + q) / 10
d:digit '' p:digit q:frac          => (d + (p + q) / 10) / 10
hexfrac    ::= empty                               => 0
h:hexdigit q:hexfrac                => (h + q) / 16
h:hexdigit '' p:hexdigit q:hexfrac => (h + (p + q) / 16) / 16

Parameters

Name Description
sequence: CharSequence
context: ParseContext?

CompanionObject

Frac

class Frac

From the docs.


frac       ::= empty                               => 0
d:digit q:frac                      => (d + q) / 10
d:digit '' p:digit q:frac          => (d + (p + q) / 10) / 10
hexfrac    ::= empty                               => 0
h:hexdigit q:hexfrac                => (h + q) / 16
h:hexdigit '' p:hexdigit q:hexfrac => (h + (p + q) / 16) / 16

Fields

Name Description
const DECIMAL_PATTERN: String
const HEX_PATTERN: String