source: CIVL/grammar/Command.g4@ 857c22f

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 857c22f was 2f8ab7d, checked in by Manchun Zheng <zmanchun@…>, 11 years ago

added command line option to diable the checking of memory leak problem.

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

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