COM SCI 131 Lecture Notes - Lecture 4: Parse Tree, Compiler, Bell Labs

66 views2 pages
3 Feb 2019
School
Professor

Document Summary

And (concatenation) pq mam p q = mam (p|q) let rec make_or_matcher p q = let pm = mam p and qm = mam q in fun acc frag match pm acc frag with. | x x let rec make_concatenation_matcher p q = let pm = mam p and qm = mam q in func acc frag . Expressions pm( fun gram qm acc frag ) frag. Mixed mode operation (i. e int + float + double ) In some languages, it solves it by overloading the binary operators. But have scaling issues with the increase in types. As such, most languages have rules to govern how they are added. Side-effects in expression i. e (x = 3) + (y = 4) Ada: the compiler chooses, must choose some order. C/c++: behaviour is undefined if order matters. Process of running a program from start to finish, and compiler construction. Few lectures ago, we tokenized program, and parsed it, made a parse tree.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers