Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (332.51 KB, 2 trang )
TON DUC THANG UNIVERSITY
Faculty of Information Technology
DISCRETE STRUCTURES
Assignment 2
1 Description
Welcome to the second assignment, also the last one, let's complete it before deadline!
After complete the first assignment, you can now parse a Boolean expression to a RPN
expression (also known as postfix notation). However, this is not our main purpose, with the input
is a Boolean expression, the expected output is a truth table. Therefore, in this second assignment,
you have to construct a truth table from the input.
Now, let's define the requirements of your submission program:
-
Your program must read the input from a text file containing Boolean expressions on each
line. (See the attached sample file)
-
After going through your parser, the output is text files containing truth tables, respectively
with the input. (See the attached sample file)
-
Use Scala for programing.
-
The filename of your submission program must be parser.scala.
2 Plagiarism