Programming language concepts

Write a lexical analyzer that recognizes all of the tokens necessary for mathematical operations:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Addition Operation

  • Subtraction Operation
  • Multiplication Operation

  • Division Operation
  • Modulo Operation
  • Grouping symbols ( usually parenthesis )
  • Assignment operation
  • Equals Operation
  • Less than operation
  • Less than or equal to operation
  • Greater than operation
  • Greater than or equal to operation
  • Logical and operation
  • Logical or operation
  • Variable identifiers
  • integer literals
  • floating point literalsYou may use front.c you help provide an algorithm but this may not be the best case to use. Your code should be able to read a file and parse that file for the above listed tokens.The output of your code should be an ordered list of these tokens.You should write this code in an object oriented fashion.

  • Write a CFG for PEMDAS/BODMAS, make sure this CFG is not ambiguous. Make sure all binary operators are Left associative.
  • Rewrite the above (problem 2) with only right associative operators.
  • Draw parse trees for problems 2 and 3 using the following string:a * 12 / ( x – 7.0 )REMEBER EVERY VARIABLE NAME IS JUST AN IDENTIFIER

    Save Time On Research and Writing
    Hire a Pro to Write You a 100% Plagiarism-Free Paper.
    Get My Paper

    Use the eBNFs rules for

    GO LANGS FOR LOOP

    to write the 10 smallest possible for loops. Treat `PrimaryExpr` as a terminal symbol.

    Still stressed from student homework?
    Get quality assistance from academic writers!

    Order your essay today and save 25% with the discount code LAVENDER