Intel XENIX 286 Programmers Guide (86) - Tenox.tc
Intel XENIX 286 Programmers Guide (86) - Tenox.tc Intel XENIX 286 Programmers Guide (86) - Tenox.tc
XENIX Programming Programm ing Commands ratfor (continued) Translation of relationals: >, > =,etc., become .GT., .GE., etc. Return (expression): Define: Include: returns expression to caller from function define name replacement include filename The option -h causes quoted strings to be turned into 27H constructs. -C copies comments to the output, and attempts to format it neatly. Normally, continuation lines are marked with an &. in colu mn 1; the option -6x makes the continuation character x and places it in colu mn 6. Notes This program translates its input into FORTRAN source code, which in segmented programming environments is suitable for compiling as a small model program only. 8-103
Programming Commands XENIX Programming regcmp - Syntax regcmp [-1 file Description Compiles regular expressions. regcmp, in most cases, precludes the need for calling regcmp from C programs. This saves on both execution time and program size. The command regcmp compiles the regular expressions in file and places the output in fiZe.i. If the - option is used, the output will be placed in fiZe.c. The format of entries in file is a name (C variable) followed by one or more blanks followed by a regular expression enclosed in double quotation marks. The output of regcmp is C source code. Compiled regular expressions are represented as extern char vectors. fiZe.i files may thus be included into C programs, or fiZe.c files may be compiled and later loaded. In the C program that uses the regcmp output, regex(abc,line), applies the regular expression named abc to line. Diagnostics are selfexplanatory. Examples name 1 1 ([A-Za-z][A-Za-z0-9 ]*)$011 tel no 11\( {0, 1 }([2-9][0 1 ][ 1 -9])$0\){0, 1 } * II II ([2-9][0-91{2} )$1 [-]{0, 1} II I I ([0-9]{ 4})$211 In the C program that uses the regcmp output regex(telno, line, area, exch, rest) will apply the regular expression named telno to line. See Also regex in "System Functions" in the XENIX 286 C Library Guide B-104
- Page 318 and 319: XENIX Programming Programming Comma
- Page 320 and 321: XENIX Programming Programming Comma
- Page 322 and 323: XENIX Programming Programming Comma
- Page 324 and 325: XENIX Programming Programming Comma
- Page 326 and 327: XENIX Programming Programming Comma
- Page 328 and 329: XENIX Programming Programming Comma
- Page 330 and 331: XENIX Programming Programming Comma
- Page 332 and 333: XENIX Programming Programming Comma
- Page 334 and 335: XENIX Programming Programming Comma
- Page 336 and 337: XENIX Programming Programming Comma
- Page 338 and 339: XENIX Programming Programming Comma
- Page 340 and 341: XENIX Programming Programming Comma
- Page 342 and 343: XENIX Programming Programming Comma
- Page 344 and 345: XENIX Programming lex (continued) E
- Page 346 and 347: XENIX Programming Programming Comma
- Page 348 and 349: XENIX Programming Programming Comma
- Page 350 and 351: XENIX Programming Programming Comma
- Page 352 and 353: XENIX Programming Programming Comma
- Page 354 and 355: XENIX Programming Programming Comma
- Page 356 and 357: XENIX Programming Programming Comma
- Page 358 and 359: XENIX Programming Programming Comma
- Page 360 and 361: XENIX Programm ing Programming Comm
- Page 362 and 363: XENIX Programming Programming Comma
- Page 364 and 365: XENIX Programming prs (continued) :
- Page 366 and 367: XENIX Programming Programming Comma
- Page 370 and 371: XENIX Programming Programming Comma
- Page 372 and 373: XENIX Programming Programm ing Comm
- Page 374 and 375: XENIX Programming Programming Comma
- Page 376 and 377: XENIX Programming Programming Comma
- Page 378 and 379: XENIX Programming Programming Comma
- Page 380 and 381: XENIX Programming Programming Comma
- Page 382 and 383: XENIX Programming Programming Comma
- Page 384 and 385: XENIX Programming Programming Comma
- Page 386 and 387: XENIX Programming Programming Comma
- Page 388 and 389: XENIX Programming Programming Comma
- Page 390 and 391: Intel Publications Copies of the fo
- Page 392 and 393: INDEX Note: For a master index to t
- Page 394 and 395: XENIX Programming lint, B-80 thru B
- Page 396 and 397: XENIX Programming fscanf, A-12 get,
- Page 398 and 399: XENIX Programming maketemp, 11-8, B
- Page 400 and 401: XENIX Programming Segments, 2-19, 2
- Page 402 and 403: XENIX Programming yacc.acts, B-123
- Page 404 and 405: REQUE.ST FOR READER'S COMMENTS XENI
- Page 406: I I
Programming Commands <strong>XENIX</strong> Programming<br />
regcmp -<br />
Syntax<br />
regcmp [-1 file<br />
Description<br />
Compiles regular expressions.<br />
regcmp, in most cases, precludes the need for calling regcmp from C programs. This<br />
saves on both execution time and program size. The command regcmp compiles the<br />
regular expressions in file and places the output in fiZe.i. If the - option is used, the<br />
output will be placed in fiZe.c. The format of entries in file is a name (C variable)<br />
followed by one or more blanks followed by a regular expression enclosed in double<br />
quotation marks.<br />
The output of regcmp is C source code. Compiled regular expressions are represented<br />
as extern char vectors. fiZe.i files may thus be included into C programs, or fiZe.c files<br />
may be compiled and later loaded. In the C program that uses the regcmp output,<br />
regex(abc,line), applies the regular expression named abc to line. Diagnostics are selfexplanatory.<br />
Examples<br />
name 1 1 ([A-Za-z][A-Za-z0-9 ]*)$011<br />
tel no<br />
11\( {0, 1 }([2-9][0 1 ][ 1 -9])$0\){0, 1 } * II<br />
II ([2-9][0-91{2} )$1 [-]{0, 1} II<br />
I<br />
I ([0-9]{ 4})$211<br />
In the C program that uses the regcmp output<br />
regex(telno, line, area, exch, rest)<br />
will apply the regular expression named telno to line.<br />
See Also<br />
regex in "System Functions" in the <strong>XENIX</strong> <strong>2<strong>86</strong></strong> C Library <strong>Guide</strong><br />
B-104