Skip to content

ethanbarry/pascal-expression-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pascal Expression Parser

This program parses math expressions from stdin. Specifically, it parses all expressions with the operators '*', '+', and '(' or ')', and all single-digit numbers. This is defined with the formal grammar:

FILE ::= { LINE } <eof>
LINE ::= EXPRESSION <eoln>
EXPRESSION ::= TERM { ‘+TERM }
TERM ::= FACTOR { ‘*FACTOR }
FACTOR ::= digit | ( ‘(’ EXPRESSION ‘)’ )

Completed for Dr. Rainwater's course COSC 5340—Comparative Study of Programming Languages, in the Fall 2024 Semester at UT Tyler.

About

A basic recursive-descent parser in Pascal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages