#include <nimble_expression_parser.h>
◆ Reader() [1/5]
ExpressionParsing::Reader::Reader |
( |
const char * | lit, |
|
|
unsigned int | len ) |
|
inline |
const char * first
Definition nimble_expression_parser.h:371
unsigned int length
Definition nimble_expression_parser.h:372
◆ Reader() [2/5]
ExpressionParsing::Reader::Reader |
( |
const std::string & | s | ) |
|
|
inline |
375:
Reader(s.c_str(), s.size()) {}
Reader(const char *lit, unsigned int len)
Definition nimble_expression_parser.h:374
◆ Reader() [3/5]
ExpressionParsing::Reader::Reader |
( |
const char * | lit | ) |
|
|
inline |
◆ Reader() [4/5]
ExpressionParsing::Reader::Reader |
( |
const char * | start, |
|
|
const char * | end ) |
|
inline |
◆ Reader() [5/5]
ExpressionParsing::Reader::Reader |
( |
const Reader & | r | ) |
|
|
inline |
◆ IsEmpty()
bool ExpressionParsing::Reader::IsEmpty |
( |
| ) |
|
|
inline |
◆ MakeString()
std::string ExpressionParsing::Reader::MakeString |
( |
| ) |
|
|
inline |
◆ Next()
int ExpressionParsing::Reader::Next |
( |
char | open, |
|
|
char | close ) |
|
inline |
400 {
401 const char* f = this->
first;
402 if (f[
pos] == open) {
403 int depth = 1;
406 if (c == open)
407 depth++;
408 else if (c == close)
409 depth--;
410 }
411 return depth;
412 } else
414 return 0;
415 }
unsigned int pos
Definition nimble_expression_parser.h:373
◆ operator char()
ExpressionParsing::Reader::operator char |
( |
| ) |
|
|
inline |
◆ operator<<()
bool ExpressionParsing::Reader::operator<< |
( |
char | c | ) |
|
|
inline |
450 {
452 const char* f =
first;
453 while (
pos > 0 && f[
pos] != c)
Prev(
'(',
')');
454 if (f[
pos] == c)
return true;
455 return false;
456 }
int Prev(char open, char close)
Definition nimble_expression_parser.h:417
◆ operator==() [1/2]
bool ExpressionParsing::Reader::operator== |
( |
const char * | lit | ) |
|
|
inline |
465 {
466 const char* scan =
first;
467 const char* last = scan +
length;
468 while (scan < last && *lit != '\0') {
469 if (*scan == *lit) {
470 scan++;
471 lit++;
472 } else
473 return false;
474 }
475 return scan == last && *lit == '\0';
476 }
◆ operator==() [2/2]
bool ExpressionParsing::Reader::operator== |
( |
std::string & | s | ) |
|
|
inline |
460 {
462 }
bool operator==(std::string &s)
Definition nimble_expression_parser.h:459
◆ operator>>()
bool ExpressionParsing::Reader::operator>> |
( |
char | c | ) |
|
|
inline |
437 {
439 const char* f =
first;
441 while (
pos < max_pos && f[
pos] != c)
Next(
'(',
')');
443 return true;
444 else
445 return false;
446 }
int Next(char open, char close)
Definition nimble_expression_parser.h:399
◆ operator[]()
char ExpressionParsing::Reader::operator[] |
( |
unsigned int | i | ) |
|
|
inline |
◆ Prev()
int ExpressionParsing::Reader::Prev |
( |
char | open, |
|
|
char | close ) |
|
inline |
418 {
419 const char* f = this->
first;
420 if (f[
pos] == close) {
421 int depth = 1;
422 while (depth != 0 &&
pos > 0) {
424 if (c == close)
425 depth++;
426 else if (c == open)
427 depth--;
428 }
429 return depth;
430 } else
432 return 0;
433 }
◆ sub() [1/3]
Reader ExpressionParsing::Reader::sub |
( |
const char * | start, |
|
|
const char * | end ) |
|
inline |
382 {
383 return Reader(start, end - start);
384 }
◆ sub() [2/3]
Reader ExpressionParsing::Reader::sub |
( |
const char * | start, |
|
|
unsigned int | len ) |
|
inline |
394 {
395 return Reader(start, len);
396 }
◆ sub() [3/3]
Reader ExpressionParsing::Reader::sub |
( |
unsigned int | start, |
|
|
unsigned int | end ) |
|
inline |
◆ first
const char* ExpressionParsing::Reader::first |
◆ length
unsigned int ExpressionParsing::Reader::length |
◆ pos
unsigned int ExpressionParsing::Reader::pos = 0 |
The documentation for this struct was generated from the following file: