What is a toolchain?
• Toolchain: a set of software development tools that are linked (or “chained”)
together
• At its most basic consists of a compiler and a linker to transform source code
into an executable program
What are the main elements of the AVR Toolchain?
The compiler, assembler, linker and library

What is the AVR Toolchain?
Separate programs performing distinct tasks
The ‘core’ of the toolchain is the compiler, assembler, linker and library
• Although these are separate projects, they are interconnected and developed in
partnership

What is semantic analysis?
Semantic analysis is the task of ensuring that the declarations and statements of a program are semantically correct, i.e, that their meaning is clear and consistent with the way in which control structures and data types are supposed to be used.
It observes the;
Example Checks

What is syntactic analysis?
Syntactic analysis is defined as analysis that tells us the logical meaning of certain given sentences or parts of those sentences. We also need to consider rules of grammar in order to define the logical meaning as well as the correctness of the sentences.
In computing,
In summary
How is syntactic analysis parsed?
Many other methods.
Benefits of syntactic state transition tables
Allow for easy identification of errors and their corresponding location.
What is done once a syntactic error is detected?
Once an error is detected the program will do one of the following to recover from the error
Describe Panic Mode Error Recovery
• Can cause a lot of sources to be skipped (and therefore other errors undetected this time around).
Benefits
• Simple, fast
• Guaranteed to terminate
Describe Phrase Level error Recovery
Describe Error Productions Error Recovery
• Build the common errors into the grammar
• A C programmer would want to write
apple[*][a:7][23]
• So include this in the grammar definition
• The parser can get
massive - the designer
has to foresee every
possible error…

Describe Global Production Error Recovery
• The parser takes a fragment of the input token stream
error
tn-3 ⇒ tn-2 ⇒ tn-1 ⇒ tn ⇒ tn+1 ⇒ tn+2 ⇒tn+3
lo…………………..hi
… and tries to match it to the parse diagram, resynchronising wherever the overall mismatch is least
• Computationally expensive
• Not used where the compile/edit loop is tight and fast