WJEC A-Level Computer Science 601-5345-3
Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types
Data Structures
Organisation of Data: Files and Records
Database Systems
The Operating System
Algorithms and Programs
Principles of Programming
Systems Analysis
Software Engineering and Program Construction
Types of Software System
Practical Programming
Data Security and Integrity
Computing, Society and the Law
Advanced Data Structures and Logic
Recursion, Sorting and Searching
Programming Paradigms and Translators
System Design and Human-Computer Interaction
Software Engineering Tools and Professional Practice
Advanced Architecture and Assembly Language
Communication Networks and File Organisation
Number Representation and Floating Point
Databases and Distributed Systems
Operating System Management
Software Systems and Applications
Data Security, Cryptography and Attack
Software Engineering and Program Construction
Syntax and semantic analysis
- 3 things to know
- AS Unit 1
Overview
Faults that syntax analysis would report and type error found by semantic analysis.
What you need to know
Answer each one before you reveal it.
Give two examples of faults that syntax analysis would report.
What is parsing?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What does syntax analysis check?
Model answer
It checks that the stream of tokens forms statements that obey the grammatical rules of the language.
- 2
Give two examples of faults that syntax analysis would report.
Model answer
A selection statement left without its closing keyword, and an arithmetic expression with an operator but no second operand.
- 3
What is parsing?
Model answer
Parsing is the process of working out how a sequence of tokens fits the rules of the language, and building a structure that records how the statement is put together.
- 4
What does syntax analysis pass on to the next stage?
Model answer
It passes on a structured representation of the program showing how its statements and expressions are nested, rather than the flat sequence of tokens it received.
- 5
Why does a translator normally continue after finding the first syntax error?
Model answer
So the programmer can be given a list of all the faults it can detect in one run, instead of having to retranslate after correcting each one.
- 6
Why can one genuine mistake produce several error messages?
Model answer
The analyser loses track of the structure at the point of the fault, so the statements that follow no longer fit the rules until it manages to resynchronise.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Software Engineering and Program Construction, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.