Documentation ¶
Index ¶
- func IsAlpha(c byte) bool
- func IsDigit(c byte) bool
- func IsFirst(c byte) bool
- func IsLetter(c byte) bool
- func IsLower(c byte) bool
- func IsSpace(c byte) bool
- func IsUpper(c byte) bool
- func ParseChar(r []byte) (c rune, l int)
- func ParseDec(r []byte, L int) (i int64, l int)
- func ParseExponent(r []byte) (i int64, l int)
- func ParseFloat(r []byte) (f float64, l int)
- func ParseFraction(r []byte) (f float64, l int)
- func ParseHex(r []byte, L int) (i int64, l int)
- func ParseInt(r []byte) (i int64, l int)
- func ParseOct(r []byte, L int) (i int64, l int)
- type Pattern
- type Scanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFirst ¶
IsFirst is a tool function that returns whether the byte is an alphabet or an underline
func IsLetter ¶
IsLetter is a tool function that returns whether the byte is an alphabet or an underline or a digit
func IsLower ¶
IsLower is a tool function that returns whether the byte is an alphabet in lower case
func IsUpper ¶
IsUpper is a tool function that returns whether the byte is an alphabet in upper case
func ParseExponent ¶
ParseExponent parses the exponent part of a float
func ParseFloat ¶
ParseFloat parses the input to a float
func ParseFraction ¶
ParseFraction parses the fraction part of a float
Types ¶
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
Pattern defines all the lexical rules rule describes the rule by an actual function str defines the key word directly
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner defines a lexical analyzer ptn is the lexical rule tkn is the raw code to be analyze skp decides whether to skip space