#HELP ME PLESE ITS OVER FOR LIL BRO

1 messages · Page 1 of 1 (latest)

vocal sonnet
thick lagoon
#

Please explain you issue. Read the #📄・posting-guidelines and make sure to follow them

vocal sonnet
#

its all on the file

thick lagoon
#

Yea that's some code but it doesn't explain what is you issue and what you need help with

We can't guess what is your problem

#

Again, read the #📄・posting-guidelines

vocal sonnet
#

it says at the end the what resaults should be and what are they

#

Develop a lexical analyzer for a computer for the Flex generator that recognizes basic operations and prints the result of the arithmetic expression. The input to the lexical analyzer you will create will be given either from the keyboard or from a file. The input will include arithmetic expressions. The program should recognize:

Integers and floating-point numbers.
Identifiers (alphanumeric strings).
Newline characters.
Operations:
a. Addition
b. Subtraction
c. Multiplication
d. Division
e. Modulus (%)
f. Parentheses
When the program recognizes a newline character, it should call the void compute() function and display the result of the arithmetic expression provided by the user. In the case of a non-numeric string (e.g., 5+6k), the result should print the expression "There are %d invalid numbers" (where %d will contain the count of non-numeric strings recognized in the arithmetic expression). In the case where parentheses are not closed properly (i.e., more left parentheses than right ones, or vice versa), the result should print "%d parentheses have not been closed" (where %d will contain the count of unclosed parentheses).

The computation of the arithmetic expression will proceed from left to right. Therefore, there is no need to implement operator precedence in the calculation of the arithmetic expression in this task. The arithmetic expression can start with a left parenthesis and can have multiple nested parentheses. Before a parenthesis, you can have addition, subtraction, multiplication, division, modulus, or none (in the case where the arithmetic expression starts with a parenthesis). Your program should always correctly evaluate arithmetic expressions within parentheses, regardless of the number of nested parentheses. You can create as many helper functions as needed, except for the result function.

#

and it gets wrong for some reason