• Git
  • LinkedIn
  • moisepan@gmail.com
    idk

    About Me

    My name is Moises Pantoja and I am a computer science major at Sac State. I have a heavy interest in finances and pass my time with my family. I am pursuing a career in data mining.

      Know:
    • Java
    • SQL-MySQL
    • HTML & CSS
    • Want to Improve:
    • Javascript
    • Python

    PL Assignment 4

    Recursive Descent Parser Implementation

    Grammar for Arithmatic Expression
    EXP ::= EXP + TERM | EXP - TERM | TERM
    TERM ::= TERM * FACTOR | TERM / FACTOR | FACTOR
    FACTOR ::= (EXP) | DIGIT
    DIGIT ::= 0|1|2|3|4|5|6|7|8|9

    Example of some valid strings:
    1-2*2$
    (1-2)*3$
    2/3$

    Example of some invalid strings:
    22-3$
    2/$
    (1+)$

    Enter string using the numbers 0 to 9, and the
    symbols +, -, *, /, (, and ).
    Your end of string variable will be dollar sign ($).
    When you click on 'submit', it will check whether entered string is valid or not for a given grammar.

    Input String:

    output

    Report:

    I wrote this in Javascript because it is to my knowledge that Javascript is a necessity in modern web development. Also, everyone else appeared to be writing their interpreter in Javascript. I love it, the first language I learned was Java so any other language feels more intuitive and no where near as verbose. The assignment itself was straight forward with the pseudo code created in the beginning of the semester. Each function almost mirrored each definition. One of the best references for web development: moz://a. I also wanted to add that people should be using Visual Studio code as their editor because of the plug-ins and the vast library to help you develop. Microsoft Edge's developer tool is better than Chrome's.

    PL Assignment 1