void init_conc()
- initializes this module
This module defines the concrete syntax for basic SGML.
The concrete syntax is defined in figure 3, page 31 of the Standard.
If any other delimiter strings are to be used, they must be defines here.
This module also defines the constraints for the different delimiters.
These constraints are defined in section 9.6.2, page 31 of the Standard.
String delimiter_to_string(delimiter)
- returns the string that corresponds to delimiter
Delimiter delimiter;
String token_to_string(token, value)
- returns string representation of token
with value value.
Delimiter string_to_delimiter(str, mode)
- returns the delimiter that corresponds to str in mode
String str;
RecognitionMode mode;
String delimiter_info(delim)
- returns information about delim, used for debugging
Delimiter delim;
Constraint constraint(delim)
- returns the constraint for delim
Delimiter delim;
int token_length(token, value)
- returns the length of token, value
int token;
int value;
These functions perform simple functions.
They define a mapping of a token or delimiter name onto the delimiters
or tokens internal numeric representation.
void concrete(abstract,concrete,info,constr)
- define delimiter
Delimiter abstract;
String concrete;
String info;
Constraint constr;
This function is called by init_conc(). It defines the delimiter
abstract with concrete syntax concrete.
info contains some information used with error-messages.
constr is the constraint for the delimiter.
See the Standard 4.1, page 5 and 4.48, page 7 for abstract
and concrete syntax.
See the Standard 9.6.2, page 31 for an explanation of constraints.
Bool is_delim_char(i)
- checks whether i is delimiter character
int i;
This function checks whether i is a delimiter character.
This is used by the lexical analyser,
which only has to look for delimiters if the current character is a delimiter
character.
conc_syn.h conc_syn.c