Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

ex(1) OSS Shell and Utilities Reference Manual
yy_create_buffer(file, size)
Returns a YY_BUFFER_STATE handle to a new input buffer large
enough to accommodate size characters and associated with the given
le. When in doubt, use YY_BUF_SIZE for the size.
yy_switch_to_buffer(
new_buffer)
Switches the scanners processing to scan for tokens from the given
buffer, which must be a YY_BUFFER_STATE.
yy_delete_buffer(buffer)
Deletes the given buffer.
YY_NEW_FILE
Enables scanning to continue after the yyin variable has been
assigned a new le to process.
YY_DECL Controls how the scanning function, yylex(), is declared. By default,
it is int yylex() or, if prototypes are being used, int yylex(void). This
denition can be changed by redening the YY_DECL macro. This
macro is expanded immediately before the {...} (braces) that delimit
the scanner function body.
YY_INPUT(buf,result,max_size)
Controls scanner input. By default, YY_INPUT reads from the le-
pointer yyin variable. Its action is to place up to max_size characters
in the character array buf and return in the integer variable result
either the number of characters read or the constant YY_NULL to
indicate EOF. Following is a sample redenition of YY_INPUT,in
the denitions section of the input le:
%{
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size)\
{\
int c = getchar();\
result = (c == EOF) ? YY_NULL : (buf[0] = c, 1);\
}
%}
When the scanner receives an End-of-File indication from
YY_INPUT, it checks the yywrap() function. If yywrap() returns
zero, it is assumed that the yyin has been set up to point to another
input le, and scanning continues. If it returns a nonzero value, then
the scanner terminates, returning zero to its caller.
YY_USER_ACTION
Can be redened to provide an action that is always executed prior to
the matched patterns action.
YY _USER_INIT
Can be redened to provide an action that is always executed before
the rst scan.
3150 Hewlett-Packard Company 527188-003