source: CIVL/grammar/Command.g4@ 0fdf4bd

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

added colon for user/system include path in the command line grammar.

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

  • Property mode set to 100644
File size: 2.8 KB
RevLine 
[5af87592]1/**
2* This file defines the syntax of CIVL's command line specification.
[d8786396]3* There are totally 8 commands, namely, config, compare, gui, help,
4* replay, run, show, and verify.
[5af87592]5* There are a number of options to be chosen as well.
6*
7* The usage of the commands are as follows:
[d8786396]8* civl config
[5af87592]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 :
[3ec1601]24 'help' (REPLAY | COMMAND | 'help' | 'config')? NEWLINE # help
[feba684]25 | 'compare' commonOption? specAndImplCommand NEWLINE #compare
[5af87592]26 | (REPLAY | COMMAND) commandBody NEWLINE #normal
[d8786396]27 | 'config' NEWLINE #config
[feba684]28 | REPLAY commonOption? specAndImplCommand NEWLINE #replayCompare
[5af87592]29 ;
30
[feba684]31specAndImplCommand
[5af87592]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 '-ast'
112 | '-collectHeaps'
113 | '-collectProcesses'
114 | '-collectScopes'
115 | '-deadlock'
116 | '-debug'
117 | '-echo'
118 | '-enablePrintf'
119 | '-errorBound'
120 | '-gui'
121 | '-guided'
122 | '-id'
123 | '-maxdepth'
124 | '-min'
125 | '-ompNoSimplify'
[4a5679a]126 | '-ompLoopDecomp'
[5af87592]127 | '-preproc'
[f944ee6]128 | '-procBound'
[5af87592]129 | '-random'
130 | '-saveStates'
131 | '-seed'
[fe805a6]132 | '-showMemoryUnits'
[5af87592]133 | '-showAmpleSet'
134 | '-showAmpleSetWtStates'
135 | '-showInputs'
[fe805a6]136 | '-showMemoryUnits'
[5af87592]137 | '-showModel'
138 | '-showPathCondition'
139 | '-showProgram'
140 | '-showProverQueries'
141 | '-showQueries'
142 | '-showSavedStates'
143 | '-showStates'
[575d92a]144 | '-showTime'
[5af87592]145 | '-showTransitions'
146 | '-simplify'
147 | '-solve'
148 | '-statelessPrintf'
149 | '-svcomp'
150 | '-sysIncludePath'
151 | '-trace'
152 | '-userIncludePath'
153 | '-verbose'
154 | '-web'
155 ;
156
157VAR
158 :
159 [_a-zA-Z] [_a-zA-Z0-9]*
160 ;
161
162PATH
163 :
[feba684]164 ([_a-zA-Z0-9\.\/])([_:a-zA-Z0-9\-\.\/])*
[5af87592]165 ;
166
167NEWLINE
168 : '\r'? '\n'
169 ;
170
171/*STRING
172 : ~[ =\-\r\n\t]+;*/
173
174WS
175 : [ \t]+ -> skip
176 ;
Note: See TracBrowser for help on using the repository browser.