+ else {
+ safe_unget(c);
+ return ERR;
+ }
+ }
+
+ if (c == '-'){
+ if ((c = getchar ()) == '>')
+ return ARROW;
+ else {
+ safe_unget(c);
+ return '-';
+ }
+ }
+
+ if (c == '$'){
+ int i=0;
+
+ if (!(yylval.str=malloc(BUFSIZE))){
+ puts("Low memory");
+ exit (0);
+ }
+
+ while (isalnum(c = getchar()) || c == '_' || c == '-'){
+ yylval.str[i]=c;
+ i++;
+ if (i >= BUFSIZE)
+ break;
+ }
+
+ return VAR;
+ }
+
+ if (c == '\n' || c == '+' || c == '*' || c == '/' ||
+ c == '(' || c == ')' || c == '{' || c == '}')
+ return c;
+
+#define KLEN 10
+
+ if (isalpha(c)){
+ char buf[KLEN];
+ int i=0;
+
+ ungetc(c,stdin);
+ while (isalpha(c = getchar()) && i<KLEN-1)
+ buf[i++]=c;
+ buf[i]=0;
+
+ if (!strcmp(buf,"if"))
+ return KW_IF;
+ else if (!strcmp(buf,"else"))
+ return KW_ELSE;
+ else if (!strcmp(buf,"pipe"))
+ return KW_COPY;
+ else if (!strcmp(buf,"mail"))
+ return KW_MAIL;
+ else if (!strcmp(buf,"copy"))
+ return KW_COPY;