The Function of a Scanner Reading characters from the source code and form them into logical units called tokens Tokens are logical entities defined as an enumerated type – Typedef enum {IF, THEN, ELSE, PLUS, MINUS, NUM, ID,…} TokenType;
Function of a Parser Takes the sequence of tokens produced by the scanner as its input and produces the syntax tree as its output. Parser Sequence of tokens Syntax-Tree
Basic antenna operation Receiving and transmitting antennas are identical: Time just flows in opposite directions. Antenna problems are solved knowing the current distribution J(x') in the antenna and using a vector potential
Main idea LL(1) Parsing uses an explicit stack rather than recursive calls to perform a parse An example: – a simple grammar for the strings of balanced parentheses: S→(S) S∣ε The following table shows the actions of a topdown parser given this grammar and the string ( )