stages of cmpilation Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

during lexical analysis … (2)

A
  • comments and white spaces are removed
  • remaining code is turned into a series of tokens
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

during syntax analysis ..(3)

A
  • errors are generated (if any tokens break the rules of the program)
  • abstract syntax tree is built from tokens produced
  • symbol table is created to keep track of variables and subroutines
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

during code generation … (1)

A
  • abstract code tree is converted into object code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

during the optimization stage…(2)

A
  • tweaks the code so it will use as little memory as possible
  • tweaks the code so it will run as quickly as possible
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what are the advantages of using high level languages(3)

A
  • easier to learn/ understand code
  • programs are prone to less errors/bugs
  • easier to find programmers who specialise in high level languages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what are the advantages of using low level languages(3)

A
  • code is optimised to specific architecture (embedded systems)
  • code can execute extremely fast
  • assembled code occupies less memory in space compared to machine code produced by high level compiler
How well did you know this?
1
Not at all
2
3
4
5
Perfectly