added data gathering; changed the way gathering was done (now ${...$} and %{...%}); added continue_line in parseInputFile()

This commit is contained in:
Josh Holtrop committed 2010-05-19 12:00:06 -04:00
1 parent b90b83ab0f
commit 762ff3d561
4 files changed
+159 -72

No files matched your search

+16 -2
View File
@@ -6,12 +6,26 @@ OR or
NOT not
LPAREN \(
RPAREN \)
WS \s+ {{
WS \s+ %{
cout << "Hi there WS!!!!!" << endl;
}}
%}
EQUALS =
IDENTIFIER [a-zA-Z_][a-zA-Z_0-9]*
DEC_INT [1-9]\d*\b
${
uint64_t value;
$}
%{
sscanf("%lld", matches[1].c_str(), &value);
%}
HEX_INT 0x([0-9a-fA-F]+)\b ${ uint64_t value; $} %{
sscanf("%llx", matches[1].c_str(), &value);
%}
OCT_INT 0([0-7]*)\b
[rules]
Assignment := IDENTIFIER ASSIGN Expression