-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8245 from tautschnig/no-reentrant-c-scanner
C/C++ front-end: Revert scanner re-entrancy
- Loading branch information
Showing
10 changed files
with
661 additions
and
702 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,23 +10,6 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include "c_storage_spec.h" | ||
|
||
int yyansi_clex_init_extra(ansi_c_parsert *, void **); | ||
int yyansi_clex_destroy(void *); | ||
int yyansi_cparse(ansi_c_parsert &, void *); | ||
void yyansi_cset_debug(int, void *); | ||
|
||
bool ansi_c_parsert::parse() | ||
{ | ||
void *scanner; | ||
yyansi_clex_init_extra(this, &scanner); | ||
#ifdef ANSI_C_DEBUG | ||
yyansi_cset_debug(1, scanner); | ||
#endif | ||
bool parse_fail = yyansi_cparse(*this, scanner) != 0; | ||
yyansi_clex_destroy(scanner); | ||
return parse_fail; | ||
} | ||
|
||
ansi_c_id_classt ansi_c_parsert::lookup( | ||
const irep_idt &base_name, | ||
irep_idt &identifier, // output | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,9 @@ Author: Daniel Kroening, [email protected] | |
#include "ansi_c_parse_tree.h" | ||
#include "ansi_c_scope.h" | ||
|
||
class ansi_c_parsert; | ||
int yyansi_cparse(ansi_c_parsert &); | ||
|
||
class ansi_c_parsert:public parsert | ||
{ | ||
public: | ||
|
@@ -41,7 +44,10 @@ class ansi_c_parsert:public parsert | |
scopes.push_back(scopet()); | ||
} | ||
|
||
bool parse() override; | ||
bool parse() override | ||
{ | ||
return yyansi_cparse(*this) != 0; | ||
} | ||
|
||
void clear() override | ||
{ | ||
|
@@ -169,4 +175,6 @@ class ansi_c_parsert:public parsert | |
std::list<std::map<const irep_idt, bool>> pragma_cprover_stack; | ||
}; | ||
|
||
void ansi_c_scanner_init(ansi_c_parsert &); | ||
|
||
#endif // CPROVER_ANSI_C_ANSI_C_PARSER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.