Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

xml.xml_xpointer.xpointer_common

Class XM_XPOINTER_TOKENIZER


Direct ancestors

XM_XPOINTER_TOKENS, KL_IMPORTED_STRING_ROUTINES

Creation

Features

Invariants

indexing

description

Objects that split XPointer pointers into tokens

library

Gobo Eiffel XPointer Library

copyright

Copyright (c) 2005, Colin Adams and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2005/07/13 19:51:47 $

revision

$Revision: 1.2 $

class

XM_XPOINTER_TOKENIZER

inherit

XM_XPOINTER_TOKENS
KL_IMPORTED_STRING_ROUTINES

create

make (an_input: STRING)

-- Prepare a string for tokenization.

require
input_string_not_void: an_input /= Void

feature -- Access

eof_token: INTEGER

-- End of input reached

-- (From XM_XPOINTER_TOKENS)

escaped_carat_token: INTEGER

-- ^^

-- (From XM_XPOINTER_TOKENS)

left_parenthesis_token: INTEGER

-- (

-- (From XM_XPOINTER_TOKENS)

string_: KL_STRING_ROUTINES

-- Routines that ought to be in class STRING

-- (From KL_IMPORTED_STRING_ROUTINES)

ensure
string_routines_not_void: Result /= Void
string_token: INTEGER

-- Any string

-- (From XM_XPOINTER_TOKENS)

unknown_token: INTEGER

-- Only when a lexical error

-- (From XM_XPOINTER_TOKENS)

whitespace_token: INTEGER

-- Ignorable whitespace

-- (From XM_XPOINTER_TOKENS)

input: STRING

-- The string being parsed

input_length: INTEGER

-- Length of the input string

last_lexical_error: STRING

-- Error text

require
lexical_error: is_lexical_error
ensure
text_not_void: Result /= Void
last_token: INTEGER

-- The number identifying the most recently read token

require
no_lexical_error: is_lexical_error = False
last_token_value: STRING

-- The string value of the most recently read token

require
no_lexical_error: is_lexical_error = False
ensure
last_token_value_not_void: Result /= Void

feature -- Status report

is_input_stream_exhausted: BOOLEAN

-- Are there more characters to read?

is_lexical_error: BOOLEAN

-- Was an error reported?

is_whitespace_reporting: BOOLEAN

-- Are whitespace characters to be reported as a token?

feature -- Status setting

set_whitespace_reporting (a_boolean: BOOLEAN)
ensure
whitespace_reporting_set: is_whitespace_reporting = a_boolean

feature --Element change

require
no_previous_error: not is_lexical_error
ensure
token_value_set_if_no_error: not is_lexical_error implies last_token_value /= Void

invariant


-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end