#include <stdio.h>
#include <signal.h>
#include <iostream>
#include <string>
#include <ostream>
#include <sstream>
#include <iomanip>
#include <stdexcept>
#include <algorithm>
#include <pv/logger.h>
#include <pv/pvTimeStamp.h>
#include "pvutils.h"
Go to the source code of this file.
std::string defaultProvider |
( |
"pva" |
| ) |
|
Definition at line 68 of file pvutils.cpp.
71 const char *
const orig = inp;
77 for(; *inp==
' '; inp++) {}
79 if(*inp==
'\0') early(inp, inp-orig);
81 if(isalnum(*inp) || *inp==
'+' || *inp==
'-') {
84 const char *start = inp;
86 while(isalnum(*inp) || *inp==
'.' || *inp==
'+' || *inp==
'-')
89 if(*inp==
'\0') early(inp, inp-orig);
93 out.
push_back(std::string(start, inp-start));
95 }
else if(*inp==
'"') {
98 const char *start = ++inp;
100 while(*inp!=
'\0' && *inp!=
'"')
103 if(*inp==
'\0') early(inp, inp-orig);
107 out.
push_back(std::string(start, inp-start));
111 }
else if(*inp==
']') {
114 fprintf(
stderr,
"Unknown token '%c' in \"%s\"", *inp, inp);
115 throw std::runtime_error(
"Unknown token");
118 for(; *inp==
' '; inp++) {}
121 else if(*inp==
']')
break;
123 fprintf(
stderr,
"Unknown token '%c' in \"%s\"", *inp, inp);
124 throw std::runtime_error(
"Unknown token");
#define assert(exp)
Declare that a condition should be true.
void push_back(param_type v)
std::string request |
( |
"" |
| ) |
|
pvd::PVStructure::Formatter::format_t outmode = pvd::PVStructure::Formatter::NT |