int parser(int argc, char **argv);
/* The parser takes both argc(number of arguments) and argv(contents of arguments)  */
/* and performs a series conditional tests using them. */

/* Upon the detection of an error (invalid input, missing arguments etc..) */
/*the program returns a specific value to the system, */
/* depending on the type of error that occurred */

/* The returned values are as follows: */
/* 0 - success */
/* 1 - syntax error */
/* 2 - wrong number of arguments */


void no_of_args_check(int argc);
/* checks that there are exactly 4 arguments */


void op_validity_check(char *op);
/* checks that the operator is valid and exactly 1 character long */


void char_validity_check(char *val[], int argc);
/* checks each character in each number string, and filters for (in order): */
/* 1. misplaced minus signs */
/* 2. any invalid characters */
/* 3. invalid number of periods */


