Skip to content

Commit

Permalink
error function
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuraag Rijal authored and Anuraag Rijal committed Mar 23, 2017
1 parent 952b431 commit a0a852d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>

/* Global declarations */
/* Variables */
Expand All @@ -18,6 +19,9 @@ void addChar();
void getChar();
void getNonBlank();
int lex();
void expr();
void term();
void factor();

/* Character classes */
#define LETTER 0
Expand Down Expand Up @@ -236,4 +240,9 @@ void factor() {
} /* End of else */

printf("Exit <factor>\n");;
} /* End of function factor */
} /* End of function factor */

void error(){
printf("Syntax error! ");
exit(0);
}

0 comments on commit a0a852d

Please sign in to comment.