options {
language = "Cpp";
namespace = "JdLab";
genHashLines = false;
}
class
ConfigFileParser_v1 extends Parser;
options {
}
configFile
:
versionBlock (globalOptionsBlock)? (classBlock)* EOF
;
versionBlock
:
"VERSION" "{" Real "}"
;
globalOptionsBlock
:
"OPTIONS" "{" (commonOptions ";")* "}"
;
classBlock
:
ClassSig "{" (classOptionsBlock)? (classHashBlock)? (methodBlock)* "}"
;
classOptionsBlock
:
"OPTIONS" "{" (
(commonOptions |
"redefineClass" optionBoolean)
";" )* "}"
;
classHashBlock
:
"HASH" "{"
"}"
;
methodBlock
:
Name MethodSig "{" (methodOptionsBlock)? breakPointsBlock "}"
;
methodOptionsBlock
:
"OPTIONS" "{"
(
(commonOptions |
"reconstructionType"
("full" | "entryExit") ) ";"
)* "}"
;
breakPointsBlock
:
"BP" "{" (Decimal)*
"}"
;
commonOptions
:
"methodArgumentLogging" optionBoolean |
"objectSerialization" optionBoolean |
"objectSerializationDepth" Decimal |
"objectSerializationOfSuperClasses" optionBoolean |
"timeLogging" optionBoolean |
"thisLogging" optionBoolean
;
optionBoolean
:
"true"
| "false" | "yes"
| "no" | "1"
| "0" | "on"
| "off"
;
___________________________________________________________________________________