CS 33101 Lecture Notes - Lecture 3: Parsing, Lexeme, Formal Language

40 views4 pages

Document Summary

Formal language specification: progra(cid:373)(cid:373)i(cid:374)g la(cid:374)guages are o(cid:374)l(cid:455) useful if the(cid:455) are (cid:862)understood(cid:863) (cid:271)(cid:455) a (cid:272)o(cid:373)puter, i(cid:374) order to i(cid:374)sure this, progra(cid:373)(cid:373)i(cid:374)g language must have: Neither one can be ambiguous: syntax: the part of the language definition that says what program look like. Their form and structure of the expressions, statements, and program units: semantics: the part of the language definition that says what programs do. Their behavior and meaning of the expressions, statements, and program units: (cid:455)(cid:374)ta(cid:454) a(cid:374)d se(cid:373)a(cid:374)ti(cid:272)s pro(cid:448)ide a la(cid:374)guage"s definition. Users of a language definition: other la(cid:374)guage desig(cid:374)ers, i(cid:373)ple(cid:373)e(cid:374)ters, progra(cid:373)(cid:373)ers (cid:894)the users of the la(cid:374)guage(cid:895, i(cid:374) order to i(cid:374)sure (cid:272)o(cid:374)(cid:272)ise(cid:374)ess of la(cid:374)guage specifications we need tools. Grammars are used to define the syntax. Mathematical constructs (such as functions and sets) are used to define the semantics. A recognition device reads input strings over the alphabet of the language and decides whether the input strings belong to the language. Example: syntax analysis part of a compiler.

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

Related Documents