File: A1_6.grm

package info (click to toggle)
hol88 2.02.19940316dfsg-5
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 65,816 kB
  • sloc: ml: 199,939; ansic: 9,666; sh: 6,913; makefile: 6,032; lisp: 2,747; yacc: 894; sed: 201; cpp: 87; awk: 5
file content (32 lines) | stat: -rw-r--r-- 1,203 bytes parent folder | download | duplicates (11)
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
% A1.6 CONSTANTS %

constdec --> name [=] {MK_two(`constdec`,POP,const)}.

const --> const1 more_consts {MK_one(`const`,POP)}.

more_consts --> [|] {add_to_list(POP,const1)} more_consts
              | [].

const1 --> [\[] int [\]] {MK_two(`const1`,POP,const1)}
         | [STRING] [\[] int [\]] {MK_two(`const1_STRING`,POP,const2)}
           {MK_one(`const1`,POP)}
         | {MK_one(`const1`,const2)}.

const2 --> [?] {MK_one(`const2_uninit`,const2)} {MK_one(`const2`,POP)}
         | [(] const more_consts [)] 
           {MK_one(`const2_tuple`,POP)} {MK_one(`const2`,POP)}
         | name const2_name_stuff {MK_one(`const2`,POP)}.

const2_name_stuff --> [/] [(] int [..] 
                      {MK_three(`const2_int_range`,POP,POP,int)} [)]
                    | [/] {MK_two(`const2_formula2`,POP,formula2)}
                    | {MK_two(`const2_char`,POP,char)}
                    | {MK_two(`const2_string`,POP,string)}
                    | [&] {MK_two(`const2_const2`,POP,const2)}
                    | [(] char [..] 
                      {MK_three(`const2_char_range`,POP,POP,char)} [)]
                    | [].

more_consts --> [,] {add_to_list(POP,const)} more_consts
              | [].