ex_hl7 v0.3.0 HL7.Lexer
Lexer used by the HL7 parser to retrieve tokens from a buffer.
Summary
Functions
Checks that the characters in the string are only alphanumeric ASCII characters
Create a new Lexer instance
Checks that the characters in the string are printable ASCII and ISO-8859-1 (Latin 1) characters
Reads a token from a buffer containing an HL7 message
Put back a token into the lexer
so that it is the first one to be returned
in the next call to Lexer.read/2
Checks that the string is a valid segment ID
Types
option :: {:input_format, :text | :wire}
state ::
:read_segment_id |
:read_delimiters |
:read_separator |
:read_characters
t :: %HL7.Lexer{escape_char: byte, next_tokens: [token], separators: binary, state: state, terminator: byte}
token ::
{:separator, HL7.Type.item_type | :segment} |
{:literal, binary} |
{:value, binary}
Functions
Specs
alphanumeric?(binary) :: boolean
Checks that the characters in the string are only alphanumeric ASCII characters.
Specs
printable?(binary) :: boolean
Checks that the characters in the string are printable ASCII and ISO-8859-1 (Latin 1) characters.
Reads a token from a buffer containing an HL7 message
Put back a token into the lexer
so that it is the first one to be returned
in the next call to Lexer.read/2