slight reorganization
This commit is contained in:
parent
1907029d56
commit
f4249274bd
@ -32,7 +32,16 @@ bool parse_input(char * buff, int size)
|
|||||||
"\\s*$"}, /* possible trailing ws */
|
"\\s*$"}, /* possible trailing ws */
|
||||||
{&rule, "^\\s*(\\S+)\\s*:=(.*)$"}
|
{&rule, "^\\s*(\\S+)\\s*:=(.*)$"}
|
||||||
};
|
};
|
||||||
|
const int ovec_size = 30;
|
||||||
|
int ovector[ovec_size];
|
||||||
|
int lineno = 1;
|
||||||
|
char * newline;
|
||||||
|
char * input = buff;
|
||||||
|
string sn;
|
||||||
|
map<string, Section> sections;
|
||||||
|
sections["none"] = none;
|
||||||
|
sections["tokens"] = tokens;
|
||||||
|
sections["rules"] = rules;
|
||||||
Section section = none;
|
Section section = none;
|
||||||
|
|
||||||
for (int i = 0; i < sizeof(exprs)/sizeof(exprs[0]); i++)
|
for (int i = 0; i < sizeof(exprs)/sizeof(exprs[0]); i++)
|
||||||
@ -48,16 +57,6 @@ bool parse_input(char * buff, int size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const int ovec_size = 30;
|
|
||||||
int ovector[ovec_size];
|
|
||||||
int lineno = 1;
|
|
||||||
char * newline;
|
|
||||||
char * input = buff;
|
|
||||||
string sn;
|
|
||||||
map<string, Section> sections;
|
|
||||||
sections["none"] = none;
|
|
||||||
sections["tokens"] = tokens;
|
|
||||||
sections["rules"] = rules;
|
|
||||||
while ((newline = strstr(input, "\n")) != NULL)
|
while ((newline = strstr(input, "\n")) != NULL)
|
||||||
{
|
{
|
||||||
int line_length = newline - input;
|
int line_length = newline - input;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user