Deleted Added
full compact
lex.c (90902) lex.c (107806)
1/****************************************************************
2Copyright (C) Lucent Technologies 1997
3All Rights Reserved
4
5Permission to use, copy, modify, and distribute this software and
6its documentation for any purpose and without fee is hereby
7granted, provided that the above copyright notice appear in all
8copies and that both that the copyright notice and this

--- 24 unchanged lines hidden (view full) ---

33extern int infunc;
34
35int lineno = 1;
36int bracecnt = 0;
37int brackcnt = 0;
38int parencnt = 0;
39
40typedef struct Keyword {
1/****************************************************************
2Copyright (C) Lucent Technologies 1997
3All Rights Reserved
4
5Permission to use, copy, modify, and distribute this software and
6its documentation for any purpose and without fee is hereby
7granted, provided that the above copyright notice appear in all
8copies and that both that the copyright notice and this

--- 24 unchanged lines hidden (view full) ---

33extern int infunc;
34
35int lineno = 1;
36int bracecnt = 0;
37int brackcnt = 0;
38int parencnt = 0;
39
40typedef struct Keyword {
41 char *word;
41 const char *word;
42 int sub;
43 int type;
44} Keyword;
45
46Keyword keywords[] ={ /* keep sorted: binary searched */
47 { "BEGIN", XBEGIN, XBEGIN },
48 { "END", XEND, XEND },
49 { "NF", VARNF, VARNF },

--- 444 unchanged lines hidden (view full) ---

494 if (c == '(') {
495 RET(CALL);
496 } else {
497 RET(VAR);
498 }
499 }
500}
501
42 int sub;
43 int type;
44} Keyword;
45
46Keyword keywords[] ={ /* keep sorted: binary searched */
47 { "BEGIN", XBEGIN, XBEGIN },
48 { "END", XEND, XEND },
49 { "NF", VARNF, VARNF },

--- 444 unchanged lines hidden (view full) ---

494 if (c == '(') {
495 RET(CALL);
496 } else {
497 RET(VAR);
498 }
499 }
500}
501
502void startreg(void) /* next call to yyles will return a regular expression */
502void startreg(void) /* next call to yylex will return a regular expression */
503{
504 reg = 1;
505}
506
507int regexpr(void)
508{
509 int c;
510 static char *buf = 0;

--- 58 unchanged lines hidden (view full) ---

569 lineno--;
570 if (yysptr >= yysbuf + sizeof(yysbuf))
571 FATAL("pushed back too much: %.20s...", yysbuf);
572 *yysptr++ = c;
573 if (--ep < ebuf)
574 ep = ebuf + sizeof(ebuf) - 1;
575}
576
503{
504 reg = 1;
505}
506
507int regexpr(void)
508{
509 int c;
510 static char *buf = 0;

--- 58 unchanged lines hidden (view full) ---

569 lineno--;
570 if (yysptr >= yysbuf + sizeof(yysbuf))
571 FATAL("pushed back too much: %.20s...", yysbuf);
572 *yysptr++ = c;
573 if (--ep < ebuf)
574 ep = ebuf + sizeof(ebuf) - 1;
575}
576
577void unputstr(char *s) /* put a string back on input */
577void unputstr(const char *s) /* put a string back on input */
578{
579 int i;
580
581 for (i = strlen(s)-1; i >= 0; i--)
582 unput(s[i]);
583}
578{
579 int i;
580
581 for (i = strlen(s)-1; i >= 0; i--)
582 unput(s[i]);
583}