This module contains functions for tokenizing characters into Erlang tokens.
category() = atom()
column() = integer() > 0
line() = integer()
location() = line() | {line(), column()}
reserved_word_fun() -> fun(atom()) -> bool()
set_attribute_fun() -> fun(term()) -> term()
symbol() = atom() | float() | integer() | string()
token() = {category(), attributes()} | {category(), attributes(), symbol()}
attributes() = line() | list() | tuple()
Takes the list of characters
A token is a tuple containing information about
syntactic category, the token attributes, and the actual
terminal symbol. For punctuation characters (e.g.
The valid options are:
A callback function that is called when the scanner
has found an unquoted atom. If the function returns
Return comment tokens.
Return white space tokens. By convention, if there is a newline character, it is always the first character of the text (there cannot be more than one newline in a white space token).
Short for
Include the token's text in the token attributes. The text is the part of the input corresponding to the token.
This is the re-entrant scanner which scans characters until
a dot ('.' followed by a white space) or
This return indicates that there is sufficient input
data to get a result.
The scanning was successful.
End of file was encountered before any more tokens.
An error occurred.
More data is required for building a term.
The
See
Returns
Returns a list containing information about the token
Note that if
Returns a list containing information about the token
The following
The category of the token.
The column where the token begins.
The length of the token's text.
The line where the token begins.
The line and column where the token begins, or just the line if the column unknown.
The token's symbol.
The token's text..
Returns a list containing information about the token
attributes
Note that if
Returns a list containing information about the token
attributes
The following
The column where the token begins.
The length of the token's text.
The line where the token begins.
The line and column where the token begins, or just the line if the column unknown.
The token's text..
Sets the value of the
The
Takes an
The
{ErrorLocation, Module, ErrorDescriptor}
A string which describes the error is obtained with the following call:
Module:format_error(ErrorDescriptor)
The continuation of the first call to the re-entrant input
functions must be