Displaying 8 results from an estimated 8 matches for "regexstr".
2010 Apr 19
1
[PATCH matahari] Replaces the existing HAL code for ProcessorAgent with udev.
...ator);
+ struct udev_list_entry* entry;
+
+ udev_list_entry_foreach(entry, entries)
+ {
+ core_count++;
+ }
+ }
+
+ udev_enumerate_unref(enumerator);
+ udev_unref(udev);
+
+ ifstream input("/proc/cpuinfo");
+ if(input.is_open())
+ {
+ string regexstr = "(.*\\S)\\s*:\\s*(\\S.*)";
+ int expected = 3;
+ int found[expected * 3];
+ const char* pcre_error;
+ int pcre_error_offset;
+ pcre* regex;
+ bool done = false;
+ bool started = false;
+
+ regex = pcre_compile(regexstr.c_str(), 0, &pcre_error,...
2010 Apr 21
1
[PATCH matahari] Created a new platform-abstraction layer named Platform.
...try;
+
+ udev_list_entry_foreach(entry, entries)
+ {
+ core_count++;
+ }
+ set_number_of_cores(core_count);
+ }
+
+ udev_enumerate_unref(enumerator);
+ udev_unref(udev);
+
+ ifstream input("/proc/cpuinfo");
+ if(input.is_open())
+ {
+ string regexstr = "(.*\\S)\\s*:\\s*(\\S.*)";
+ int expected = 3;
+ int found[expected * 3];
+ const char* pcre_error;
+ int pcre_error_offset;
+ pcre* regex;
+ bool done = false;
+ bool started = false;
+
+ regex = pcre_compile(regexstr.c_str(), 0, &pcre_error,...
2012 Sep 07
1
[LLVMdev] teaching FileCheck to handle variations in order
...ent,
+ MatchEndOfFile
+ };
+
+private:
SMLoc PatternLoc;
- /// MatchEOF - When set, this pattern only matches the end of file. This is
- /// used for trailing CHECK-NOTs.
- bool MatchEOF;
+ /// MatchType - When set to ...
+ /// MatchStr, this pattern matches according to FixedStr or RegExStr.
+ /// MatchCurrent, this pattern matches (the empty string at) the current
+ /// position. This is used for CHECK-PUSHes without preceding CHECKs.
+ /// MatchEndOfFile, this pattern only matches the end of file. This is used
+ /// for trailing CHECK-NOTs.
+ enum MatchType Type;...
2010 Apr 19
1
[PATCH matahari] Removes all code for the previous CPUWrapper class.
...found by querying /proc/cpuinfo. NOTE: This method is very sensitive
- * to the output format of /proc/cpuinfo.
- *
- * Throws a runtime error if file io is unsuccessful.
- */
-void CPUWrapper::fillCPUInfo(vector<CPUWrapper*> &cpus, ManagementAgent *agent)
-{
- string line;
- string regexstr = "(.*\\S)\\s*:\\s*(\\S.*)";
- int desiredmatches = 3; // Match string and two captured substrings
- int matchArraySize = desiredmatches * 3;
- int results[matchArraySize]; // pcre requires this much
- const char *pcre_err;
- int pcre_err_offset;
- pcre *regex;
-
- re...
2009 Aug 24
0
[LLVMdev] Regular Expression lib support
...I might be wrong on some
of the regex syntax, it has been a *long* time since I ever touched
regex inside a program (ever since I started using boost::spirit, only
use it for grep and its kin anymore), but it should get the idea
across. I use this regex for each of the things below:
std::string regexStr("(-?\\d+(?:\\.\\d*)?)\\|(-?\\d+)*(?:\\,(-?\\d+))");
// I hope this is correct...
std::string testStr("3.14|1,2,3,42,128");
The "(-?\\d+(?:\\.\\d*)?)\\|(-?\\d+)*(?:\\,(-?\\d+))" does not check
that the checked integer fits inside an int, does not account for
overflow...
2009 Aug 24
2
[LLVMdev] Regular Expression lib support
On Aug 23, 2009, at 5:50 PM, OvermindDL1 wrote:
> On Sun, Aug 23, 2009 at 6:32 PM, Daniel Dunbar<daniel at zuster.org>
> wrote:
>> This is too heavy, and we don't need the extra features, and regexec
>> is well tested and much more standard. Unless there is an
>> overwhelming
>
> 'regexec' I had never heard of, figured it was a library, turns
2012 Sep 07
5
[LLVMdev] teaching FileCheck to handle variations in order
...ent,
+ MatchEndOfFile
+ };
+
+private:
SMLoc PatternLoc;
- /// MatchEOF - When set, this pattern only matches the end of file. This is
- /// used for trailing CHECK-NOTs.
- bool MatchEOF;
+ /// MatchType - When set to ...
+ /// MatchStr, this pattern matches according to FixedStr or RegExStr.
+ /// MatchCurrent, this pattern matches (the empty string at) the current
+ /// position. This is used for CHECK-PUSHes without preceding CHECKs.
+ /// MatchEndOfFile, this pattern only matches the end of file. This is used
+ /// for trailing CHECK-NOTs.
+ enum MatchType Type;...
2012 Sep 07
0
[LLVMdev] teaching FileCheck to handle variations in order
On 9/7/2012 7:20 AM, Matthew Curtis wrote:
>
> The attached patch implements one possible solution. It introduces a
> position stack and a couple of directives:
>
> * 'CHECK-PUSH:' pushes the current match position onto the stack.
> * 'CHECK-POP:' pops the top value off of the stack and uses it to set
> the current match position.
>
> The above