Lines Matching +full:input +full:- +full:only

1 .\" Copyright (C) Caldera International Inc. 2001-2002.  All rights reserved.
41 .EH 'PSD:16-%''Lex \- A Lexical Analyzer Generator'
42 .OH 'Lex \- A Lexical Analyzer Generator''PSD:16-%'
61 .\".TM 75-1274-15 39199 39199-11
63 Lex \- A Lexical Analyzer ~Generator~
64 .AU ``MH 2C-569'' 6377
82 expressions in the input stream.
83 It is well suited for editor-script type transformations and
84 for segmenting input in preparation for
89 which reads an input stream, copying it to an output stream
90 and partitioning the input
98 corresponding regular expressions occur in the input stream.
103 match possible at each input point.
105 is performed on the input, but the
106 input stream will be backed up to the
112 It is available on the PDP-11 UNIX, Honeywell GCOS,
114 This manual, however, will only discuss generating analyzers
115 in C on the UNIX system, which is the only supported
119 with access to this compiler-compiler system.
128 lexical processing of character input streams.
129 It accepts a high-level, problem oriented specification
137 in an input stream and partitions the input stream into
144 As each expression appears in the input to the program written by Lex,
159 language for input analysis to write processing programs in the same
170 Compatible run-time libraries for the different host languages
178 At present, the only supported host language is C,
189 in this memo) into the host general-purpose language;
201 input
217 Source \(-> Lex \(-> yylex
221 Input \(-> yylex \(-> Output
230 from the input
278 Lex programs recognize only regular expressions;
280 but require a lower level analyzer to recognize input tokens.
283 Lex is used to partition the input stream,
318 Input \(-> yylex \(-> yyparse \(-> Parsed input
341 to recognize and partition an input stream is
342 proportional to the length of the input.
375 and the input stream is
380 the input pointer just before
411 which copies the input to the output unchanged.
438 in the input stream and
510 " \e [ ] ^ \- ? . \(** + | ( ) $ / { } % < >
534 Thus by quoting every non-alphanumeric character
577 Only three characters are special:
592 (E.g., [0\-z] in ASCII is many more characters
619 [^a\-zA\-Z]
635 Escaping into octal is possible although non-portable:
639 [\e40\-\e176]
688 [a\-z]+
756 the expression will only be matched at the beginning
758 the input stream).
762 of character classes, since that only applies within
766 the expression will only be matched at the end of a line (when
780 but only if followed by
799 as explained in section 10. If a rule is only to be executed
840 input, before the rules.
862 consists of copying the input to the output. This
864 the Lex user who wishes to absorb the entire input, without
869 copying the input to the output; thus, in general,
873 and which appears as input
878 the input. Specifying a C null statement, \fI;\fR as an action
917 [a\-z]+ printf("%s", yytext);
947 [a\-z]+ ECHO;
980 of words and the number of characters in words in the input, the user might write
984 [a\-zA\-Z]+ {words++; chars += yyleng;}
996 yytext[yyleng\-1]
1007 can be called to indicate that the next input expression recognized is to be
1008 tacked on to the end of this input. Normally,
1009 the next input string would overwrite the current
1032 returned to the input. This provides the same sort of
1048 if (yytext[yyleng\-1] == \(fm\e\e\(fm)
1085 =\(mi[a\-zA\-Z] {
1087 yyless(yyleng\-1);
1094 operator to the input stream, and treats the operator as ``=\(mi''.
1097 sign as well as the letter to the input:
1103 =\(mi[a\-zA\-Z] {
1105 yyless(yyleng\-2);
1117 =\(mi/[A\-Za\-z]
1123 =/\-[A\-Za\-z]
1144 input()
1146 which returns the next input character;
1164 back onto the input stream to be read later by
1166 input().
1176 cause input or output to be transmitted to or from strange
1181 input
1190 input
1219 which is called whenever Lex reaches an end-of-file.
1224 returns a 1, Lex continues with the normal wrapup on end of input.
1226 input to arrive
1234 arranges for new input and
1246 end-of-file; the only access to this condition is
1253 input()
1260 input
1262 is taken to be end-of-file.
1270 current input, Lex chooses as follows:
1282 [a\-z]+ identifier action ...;
1284 to be given in that order. If the input is
1287 .I [a\-z]+
1290 matches only 7.
1291 If the input is
1316 Presented with the input
1335 which, on the above input, will stop
1352 the entire input file, causing
1356 the input stream, not searching for all possible matches
1359 once and only once.
1361 count occurrences of both \fIshe\fR and \fIhe\fR in an input text.
1386 The position of the input pointer is adjusted accordingly.
1404 which input characters
1414 If the input is
1416 only the first rule matches,
1419 only the second matches.
1420 The input string
1424 In contrast, the input
1431 the purpose of Lex is not to partition the input
1433 in the input, and the instances of these items
1435 Suppose a digram table of the input is desired;
1443 Assuming a two-dimensional array named
1452 [a\-z][a\-z] {
1477 So far only the rules have been described. The user needs
1492 Such source input prior to the first %% delimiter will be external
1508 only
1543 D#[0\-9]
1544 E#[DEde][\-+]?{D}+
1560 which does not contain a real number, a context-sensitive
1565 [0\-9]+/"."EQ printf("integer");
1603 .I \-ll .
1609 cc lex.yy.c \-ll
1622 input,
1661 in the last section of Yacc input.
1670 cc y.tab.c \-ly \-ll
1672 The Yacc library (\-ly) should be loaded before the Lex library,
1680 As a trivial problem, consider copying an input file while
1688 [0\-9]+ {
1697 The rule [0\-9]+ recognizes strings of digits;
1711 input items as
1724 \-?[0\-9]+ {
1729 \-?[0\-9.]+ ECHO;
1730 [A-Za-z][A-Za-z0-9]+ ECHO;
1736 .I if\-else
1757 [a\-z]+ lengs[yyleng]++;
1775 of the input it prints the table.
1785 it implies that further input is available
1849 [0\-9]+{W}{d}{W}[+\-]?{W}[0\-9]+ |
1850 [0\-9]+{W}"."{W}{d}{W}[+\-]?{W}[0\-9]+ |
1851 "."{W}[0\-9]+{W}{d}{W}[+\-]?{W}[0\-9]+ {
1856 \(**p=+ \(fme\(fm\- \(fmd\(fm;
1870 .I \(fme\(fm\-\(fmd\(fm ,
1873 The modified constant, now single-precision,
1882 the same action suffices for all the names (only a sample of
1902 yytext[0] =+ \(fma\(fm \- \(fmd\(fm;
1911 {d}1{m}{a}{c}{h}#{yytext[0] =+ \(fmr\(fm \- \(fmd\(fm;
1921 [A\-Za\-z][A\-Za\-z0\-9]\(** |
1922 [0\-9]+ |
1936 to be applied at different times in the input.
1954 when only a few rules change from one environment to another,
1964 following input text is analyzed, and set some parameter
1971 Any rule may be associated with a start condition. It will only
1980 Consider the following problem: copy the input to the output,
2028 is a rule which is only recognized when Lex is in the
2078 character I/O only through the routines
2080 input,
2108 and must be bracketed by lines containing only
2129 29 \-
2141 newline into 27, + and \- into 28 and 29, and the
2145 in the rules or in any valid input must be included
2194 number space character-string
2235 [x\-z] the characters x, y or z.
2246 x/y an x but only if followed by y.
2259 REJECT does not rescan the input; instead it remembers the results of the previous
2266 from the input stream.
2267 This is the only restriction on the user's ability to manipulate
2268 the not-yet-processed input.
2297 Prentice-Hall, N. J. (1978).
2303 Software \- Practice and Experience,
2304 \fB5\fR, pp. 395-496 (1975).
2323 333-340 (1975).