Basic Error types
Again Freestudy9 comes with the new topic related to Basic Error types. point to point descriptions is there.
- So, Error can be classified into mainly two categories,
1. Compile time error
2. Runtime error
- Moreover, This type of errors can be detected during the lexical analysis phase. Typical lexical phase errors are.
1. Spelling errors. Hence get incorrect tokens.
2. Also, Exceeding length of an identifier or numeric constants.
3. The appearance of illegal characters.
fi ( )
- Also, In above code ‘fi’ cannot be recognized as a misspelling of the keyword if a rather lexical analyzer will understand that it an identifier and will return it as a valid identifier.
Thus misspelling causes errors in token formation.
Syntax error: Basic Error types
- These types of error appear during syntax analysis phase of a compiler.
Typical errors are:
1. Errors in structure.
2. Missing operators.
3. Unbalanced parenthesis.
- Moreover, The parser demands tokens from lexical analyzer and if the tokens do not satisfy the grammatical rules of programming language then the syntactical errors get raised.
Semantic error: Basic Error types
- This type of error detected during the semantic analysis phase.
Typical errors are:
- 1. Incompatible types of operands.
- 2. Also, Undeclared variable.
- 3. Not matching of actual argument with formal argument.
Heap allocation: Basic Error types
- Additionally, Stack allocation strategy cannot use if either of the following is possible:
1. The value of local names must retain when activation ends.
2. A called activation outlives the caller.
- So, Heap allocation parcels out pieces of contiguous storage, as needed for activation record or other objects.
- Pieces may be de-allocated in any order, so over the time, the heap will consist of alternates allocated areas that are free and in use.
- So, The record for an activation of procedure r retained when the activation procedure ends.
- Therefore, the record for new activation q(1, 9) cannot follow that for s physically.
- Moreover, If the retained activation record for r deallocated, there will be free space in the heap de-allocated, between the activation records fo s and q.for