source: CIVL/grammar/Command.g4@ 85b7e48

1.23 2.0 main test-branch
Last change on this file since 85b7e48 was 575d92a, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

added new option "-showTime" to print the timing of preprocessing, parsing, linking phases, etc.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@1692 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 2.7 KB
Line 
1/**
2* This file defines the syntax of CIVL's command line specification.
3* There are totally 7 commands, namely, compare, gui, help, replay, run, show, and verify.
4* There are a number of options to be chosen as well.
5*
6* The usage of the commands are as follows:
7* civl compare [option]* -spec [option]* file+ -impl [option]* file+
8* civl gui (no options needed)
9* civl help [command]
10* civl replay [option]* file+ (replay for one program)
11* civl replay [option]* -spec [option]* file+ -impl [option]* file+
12* (replay for the comparison of two programs.)
13* civl run [option]* file+
14* civl show [option]* file+
15* civl verify [option]* file+
16*/
17grammar Command;
18
19/* The top-level rule */
20start
21 :
22 'help' (REPLAY | COMMAND | 'help')? NEWLINE # help
23 | 'compare' commonOption? specOrImplCommand NEWLINE #compare
24 | (REPLAY | COMMAND) commandBody NEWLINE #normal
25 | REPLAY commonOption? specOrImplCommand NEWLINE #replayCompare
26 ;
27
28specOrImplCommand
29 : specCommand implCommand
30 | implCommand specCommand
31 ;
32
33commonOption
34 :
35 option+
36 ;
37
38specCommand
39 :
40 SPEC commandBody
41 ;
42
43implCommand
44 :
45 IMPL commandBody
46 ;
47
48commandBody
49 :
50 option* file+
51 ;
52
53option
54 :
55 OPTION_NAME ('=' value )? # normalOption
56 | INPUT VAR '=' value # inputOption
57 | MACRO VAR ('=' value)? # macroOption
58 ;
59
60file
61 :
62 PATH
63 ;
64
65value
66 : BOOLEAN
67 | VAR
68 | NUMBER
69 | PATH
70 ;
71
72BOOLEAN
73 : 'true' | 'false'
74 ;
75
76NUMBER
77 :
78 [\-\+]?[0-9]+
79 ;
80
81SPEC
82 :'-spec'
83 ;
84
85IMPL
86 :'-impl'
87 ;
88
89INPUT
90 : '-input'
91 ;
92
93MACRO
94 : '-D'
95 ;
96
97COMMAND:
98 'verify' | 'run' | 'show' | 'gui'
99 ;
100
101REPLAY
102 :
103 'replay'
104 ;
105
106OPTION_NAME
107 :
108 '-ast'
109 | '-collectHeaps'
110 | '-collectProcesses'
111 | '-collectScopes'
112 | '-deadlock'
113 | '-debug'
114 | '-echo'
115 | '-enablePrintf'
116 | '-errorBound'
117 | '-gui'
118 | '-guided'
119 | '-id'
120 | '-maxdepth'
121 | '-min'
122 | '-ompNoSimplify'
123 | '-preproc'
124 | '-random'
125 | '-saveStates'
126 | '-seed'
127 | '-showAmpleSet'
128 | '-showAmpleSetWtStates'
129 | '-showInputs'
130 | '-showModel'
131 | '-showPathCondition'
132 | '-showProgram'
133 | '-showProverQueries'
134 | '-showQueries'
135 | '-showSavedStates'
136 | '-showStates'
137 | '-showTime'
138 | '-showTransitions'
139 | '-simplify'
140 | '-solve'
141 | '-statelessPrintf'
142 | '-svcomp'
143 | '-sysIncludePath'
144 | '-trace'
145 | '-userIncludePath'
146 | '-verbose'
147 | '-web'
148 ;
149
150VAR
151 :
152 [_a-zA-Z] [_a-zA-Z0-9]*
153 ;
154
155PATH
156 :
157 ([_a-zA-Z0-9\.\/])([_a-zA-Z0-9\-\.\/])*
158 ;
159
160NEWLINE
161 : '\r'? '\n'
162 ;
163
164/*STRING
165 : ~[ =\-\r\n\t]+;*/
166
167WS
168 : [ \t]+ -> skip
169 ;
Note: See TracBrowser for help on using the repository browser.