Skip to content

Latest commit

 

History

History
106 lines (97 loc) · 2.61 KB

TODO.md

File metadata and controls

106 lines (97 loc) · 2.61 KB

DFA Building

BNF

Design

  • Program
    • Functiions
      • Function
      • Main
    • Statements
      • Conditionals
      • Loops
      • Declaration Statements
      • Arithmetic Statements
      • Assignment Statements
    • Number
    • Boolean
    • Identifier
  • Remove resursion in grammar

Testing

BNF Testing Site

  • Initialization
  • Expressions
  • Conditonals
  • Loops
  • Functions
  • Test functions

Coding

  • Define keywords array
  • Token enum
  • main.c
    • Accept File
    • Maybe Check extension
    • Load the parser.c and call the parser function
  • Parser
    • Load lexer
    • Run lexer when non EOF
    • Phase 2 of assignment
  • Lexer
    • Load lexer state
    • Variable Indentifier
    • Function Identifier
    • Integer Literal Identifier
    • Float Literal Identifier
    • Operator Identifier
    • Skip Empty lines
    • Skip Comments
    • Change while loop to loop on SEARCHING state.
    • Add string data type
    • Fix String RE : Gives error when "Hello worl\d"
    • O(n^2) -> O(n)
    • Lexer errors:
      • Incomplete Float. Eg: (0|[1-9][0-9]*)".",
      • Incorrect integers. Eg: 0[1-9]+,
      • Seeing the characters: [`$^:"'?]
      • Not matching double quotes for strings or invalid excape sequences
  • Token
    • Define tokens
    • functions for operators
    • functions for variable identifier
    • functions for function identifier
  • Error Correction of Code

Test Programs and Outputs

Writing Examples

Check ./tests/examples/ directory for the examples.

  • Simple Example
  • Initialization Example
  • Conditonals Example
  • Loops Example
  • Function Example
  • Recursion Example
  • Complex example 1

References

Phase 2

  • Add Assignment_Numeric_Expr for FOR LOOP

  • Remove left and right shift operator

  • Remove recursions

  • Add Prod rule reader

  • Add first set computing function

  • Add follow set computing function

  • Parse table generation

  • Print Parse Table

  • Parser

  • Skip Errors

  • SYNCH Errors

  • Test with multiple programs and create test suite

    • Init
    • Expression
    • Conditionals
    • Loops
    • Funtion
    • Recursion
    • Complex
    • Errors