module Lexer: sig
.. end
Implements the lexing function used by the assembler to read tokens
from a source file.
Tokens
type
token =
The possible tokens to be found in a source file.
Exception
type
error =
| |
Invalid_label of Utils.UTF8.t |
| |
Invalid_directive of Utils.UTF8.t |
| |
Invalid_attribute of Utils.UTF8.t |
| |
Invalid_string of Utils.UTF8.t |
| |
Invalid_character of Utils.UChar.t |
| |
Invalid_float of string |
| |
Invalid_integer of string |
| |
Invalid_method_handle of Utils.UTF8.t |
| |
Invalid_token |
| |
Name_error of Name.error |
| |
Descriptor_error of Descriptor.error |
| |
UChar_error of Utils.UChar.error |
| |
UTF8_error of Utils.UTF8.error |
exception Exception of error
val string_of_error : error -> string
Lexing funtion
val tokens_of_line : Utils.UTF8.t -> token list
Converts the passed string into a list of tokens.
Comments (starting with #, and ending with the end of the string)
are ignored.
Raises Exception
if the passed string is such that a list of
correct tokens cannot be extracted.
Miscellaneous
val equal : token -> token -> bool
Equality over token values. Does not use co-/contra- variance
(meaning that classes are compared on a name basis, and neither
interfaces or generics are taken into account).