Beginning to add regex search functionality to polonius-reader
This commit is contained in:
parent
e81ed794ac
commit
b32dba2e23
|
@ -133,6 +133,7 @@ void reader::file::do_regex_search() {
|
|||
/***
|
||||
TODO:
|
||||
A regex search in Polonius should happen this way:
|
||||
0. Validate the regular expression
|
||||
1. Parse the regular expression into its component parts
|
||||
e.g.:
|
||||
Expression: 'abc[a-z]+235'
|
||||
|
|
|
@ -62,6 +62,15 @@
|
|||
#include "../../shared/process_bytecodes.cpp"
|
||||
#endif
|
||||
|
||||
/* vector<string> parse_regex(string expression) splits a regular expression into its component parts */
|
||||
/* e.g.: parse_regex("[a-z]+123") returns { "[a-z]+", "1", "2", "3" } */
|
||||
/* vector<string> create_sub_expressions(string expression) [same file] runs parse_regex() and then recombines the parts into smaller expressions */
|
||||
/* e.g.: create_sub_expressions("[a-z]+123") returns { "[a-z]+12", "[a-z]+1", "[a-z]+" } */
|
||||
#ifndef FN_PARSE_REGEX
|
||||
#define FN_PARSE_REGEX
|
||||
#include "../../shared/parse_regex.cpp"
|
||||
#endif
|
||||
|
||||
/* Contains the 'meat' of the program */
|
||||
#include "namespace_reader.h"
|
||||
#include "class_file.cpp"
|
||||
|
|
Loading…
Reference in New Issue