• A-
  • A
  • A+
03-5715131#35401 mengfen@mx.nthu.edu.tw Ms. Wu
【7/31】114學年度第2學期研究生論文口試結束Thesis Defense Ends   ♠   【8/1】115學年度第1學期開始 2026 Fall Semester Begins   ♠   【8/3】暑期班申請課程停修開始(至7日止) Summer Session Withdrawal (8/3-   ♠   【8/18】115學年度入學各級新生、轉學生選課(至20日止) Course Selection for   ♠   【8/21】暑期班結束 Summer Session Ends   ♠   【9/1】教師送繳115學年度暑碩專班成績截止   ♠   【9/1-2】新生領航營(至2日止)   ♠   【9/3-18】受理校際選課(至18日止) Inter-School Selection (9/3-9/18)   ♠   【9/4-7】受理就學貸款申請(4日、7日兩天)   ♠   【9/3-18】受理校際選課(至18日止) Inter-School Selection (9/3-9/18)   ♠   【9/4-7】受理就學貸款申請(4日、7日兩天)   ♠   【9/7】全校各級學生上課開始、註冊日 1. Class Begin 2. Registration   ♠   【9/7-30】弱勢助學金申請(至30日止)   ♠   【9/7】生輔組校內外獎學金申請(依 生輔組公告辦理)   ♠   【9/25】中秋節 Mid-Autumn Festival (no class)   ♠   【9/28】教師節 Teacher's Day (no class)   ♠   【9/29-11/20】期中教學意見反映(至11月20日止) Mid-term Feedback on Teaching   ♠   【10/9-10】國慶日補假 Holiday-Double Tenth Day (no class)國慶日 Double Tenth Day (no class)   ♠   【10/19-12/4】期中成績預警開始(至12 月4日止) Academic Warning System Starts   ♠   【11/11】全校運動大會(停課一天) Sports Day   ♠   【11/27-12/20】教學意見調查開始(至12月20日止) Online Course Evaluation (11/27-   ♠   【12/21-24】期末考試開始(至24日止) Final Exams   ♠   【12/25】行憲紀念日 Constitution Day   ♠   【12/28】寒假開始 Winter Break Begins   ♠  

Title

Lecture 5 Boolean expression and Syntax tree

第1節

L5A

第2節

L5B

第3節

L5C

Syllabus

章節大綱

L5_A
Boolean expression
 - 定義 TokenSet
 (- Define TokenSet)
 - 讀取輸入資料: 複習fgets()
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fgets.html

 (- Read input data: review fgets()
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fgets.html)

 - for迴圈二進位表示法
複習
http://lms.nthu.edu.tw/course.php?courseID=22888&f=doc&cid=853894

 (- Print numbers in binary format by for loop: review
http://lms.nthu.edu.tw/course.php?courseID=22888&f=doc&cid=853894)

 - 函數 getNext() 和 evaluate()
 (- getNext() and evaluate())

處理十進位"+-*/"運算,從prefix轉infix
(Processing decimal operations"+-*/" ,from prefix to infix)


L5_B
建立Syntax tree
(Build syntax tree)
 - Left association 的語法規則與演算法
 (- Syntax and algorithm of left association)
 - 程式架構解說
 (- Project framework overview)


L5_C
建立Syntax tree
(Build syntax tree)
 - 程式建構 : EXPR() & FACTOP()
 (- Coding : EXPR() & FACTOP())

 

陳煥宗教授-程式設計二講義
               Teaching Materials