Skip to content

nvoronin1337/Lexical-Analyzer-Parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lexical-Analyzer-Parser

Parser & Lexical Analyzer for a simple Programming Language grammar.

Grammar Definition:

statement = {expression ";" } "."
expression = term { ( "+" | "-" ) term }
term = factor {("\*" | "/") factor}
factor = number | "-"number | "(" expression ")"

For learning about programming language grammar check out Montana State University lecture.

Description

Accepts expressions from either console or file. Able to evaluate expressions given that the grammar is correct. Raises an exception and exits if grammar is invalid.

Includes Parser and Lexical Analyser which are able to process expressions which can contain:

  • numbers
  • negative numbers
  • expressions in parenthesiss
  • addition and subtraction
  • multiplication and division

About

Lexical Analyzer & Parser for "Programming Language" grammar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages