MPE/iX Shell and Utilities Reference Manual, Vol 2
lex(3) MPE/iX Shell and Utilities lex(3)
NAME
lex — functions used with lex
SYNOPSIS
#define YYLMAX 100
char yytext [YYLMAX];
int yyleng;
int yylineno;
FILE *yyin = stdin;
FILE *yyout = stdout;
#define yygetc() getc(yyin)
int input(void);
int unput(int c);
int yywrap(void);
void yyerror(const char *format, ...);
void yycomment(const char *delim);
int yymapch(int delim, int esc);
ECHO;
REJECT;
void yymore();
void yyless(int n);
DESCRIPTION
YYLMAX defines the maximum length of tokens the
LEX
scanner can recognize. Its
default value is 100 characters, and can be changed with the C preprocessor
#undef and #define directives in the input declarations section.
yytext is the current input token recognized by the LEX scanner, and is accessible
both within a LEX action and on return of the yylex() function. It is ter-
minated with a null (zero) byte. If %pointer is specified in the definitions
section, yytext is defined as a pointer to a pre-allocated array of char.
yyleng is the length of the input token in yytext.
yylineno is the current input line number, maintained by input and yycomment.
yyin determines the input stream for the yylex() and input() functions.
yyout determines the output stream for the output() macro, which processes in-
put that does not match any rules. The values of yyin and yyout can be
changed by assignment.
3-6 Miscellaneous Information