Test Programs for Parsers
- P1.bpl A few assignment statements; one arithmetic computation
- P2.bpl One if-else statement
- P3.bpl A pair of nested if-else statements. This declares void main( ) which you don't need to accept but shouldn't crash on.
- P3B.bpl This is the same as P3.bpl, only with void main(void)
- P4.bpl This has a function call
- P5.bpl This has several function declarations
- P6.bpl This has an array declaration and an array reference
- P7.bpl This is the same as P1.bpl with a missing semicolon on the second assignment.
- P8.bpl Missing right parenthesis
- P9.bpl Missing right brace to close a compound statement
- P10.bpl Pointer declarations, referrences and dereferences
- P11.bpl A correct program that computes factorials recursively.
- P12.bpl A correct program that does SelectionSort on an array