File: pr05.fw

package info (click to toggle)
funnelweb 3.2-4.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,744 kB
  • sloc: ansic: 9,156; makefile: 17
file content (40 lines) | stat: -rw-r--r-- 997 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
PR05: Test the parsing of formal parameter lists.

First trip the parser so we don't get past the parser.
@>

1. Test macro definition with no formal parameters.
@$@<Sloth@>@{Slothtext@}

2. Test macro definition with one formal parameter.
@$@<Sloth with one@>@(@1@)@{Slothtext@}

3. Test macro definition with many formal parameters.
@$@<Sloth with 2@>@(@2@)@{Slothtext@}
@$@<Sloth with 3@>@(@3@)@{Slothtext@}
@$@<Sloth with 4@>@(@4@)@{Slothtext@}
@$@<Sloth with 5@>@(@5@)@{Slothtext@}
@$@<Sloth with 6@>@(@6@)@{Slothtext@}
@$@<Sloth with 7@>@(@7@)@{Slothtext@}
@$@<Sloth with 8@>@(@8@)@{Slothtext@}
@$@<Sloth with 9@>@(@9@)@{Slothtext@}

4. Test with syntax errors in the parameter list.

@$@<Sloth a@>@(@+@9@)@{Slothtext@}
@A@<Error recovery point@>

@$@<Sloth b@>@9@)@{Slothtext@}
@A@<Error recovery point@>

@$@<Sloth c@>@(9@)@{Slothtext@}
@A@<Error recovery point@>

@$@<Sloth d@>@9@)@{Slothtext@}
@A@<Error recovery point@>

@$@<Sloth e@>@(@9@)@)@{Slothtext@}
@A@<Error recovery point@>