Xmipp  v3.23.11-Nereus
Static Public Member Functions | Public Attributes | List of all members
ArgToken Class Reference

#include <argsparser.h>

Static Public Member Functions

static const char * typeString (ArgTokenType type)
 

Public Attributes

ArgTokenType type
 Type of the token. More...
 
String lexeme
 the string literal value of the token More...
 
int line
 line where token was found More...
 
int start
 
int end
 
int visibility
 
bool starred
 Some special mark to tokens. More...
 

Detailed Description

Just a simple struct to hold information about tokens

Definition at line 72 of file argsparser.h.

Member Function Documentation

◆ typeString()

const char * ArgToken::typeString ( ArgTokenType  type)
static

Reserved words

Definition at line 33 of file argsparser.cpp.

34 {
35  switch (type)
36  {
37  case TOK_ID: //identifier
38  return "ID";
39  case TOK_OPT: // -ID or --ID
40  return "OPTION";
41  case TOK_INT: //integer number
42  return "INT";
43  case TOK_FLOAT: //float number
44  return "FLOAT";
45  case TOK_STR: //string value
46  return "STRING";
47  case TOK_MINUS: // - or --
48  return "MINUS";
49  case TOK_EQ: // =
50  return "EQUAL";
51  case TOK_COMM: // Comment: from : until end of line
52  return "COMMENT";
53  case TOK_LAN: // <
54  return "<";
55  case TOK_RAN: // >
56  return ">";
57  case TOK_LBRA: // [
58  return "[";
59  case TOK_RBRA: // ]
60  return "]";
61  case TOK_END: // end of input
62  return "EOF";
64  case TOK_WHERE: // 'WHERE' keyword
65  return "WHERE";
66  case TOK_ALIAS: // 'ALIAS' keyword
67  return "ALIAS";
68  case TOK_SECTION:
69  return "SECTION";
70  case TOK_SEMI:
71  return ";";
72  case TOK_COMMA:
73  return ",";
74  case TOK_PLUS:
75  return "+";
76  default:
77  return "UKNOWN";
78  };
79 }
ArgTokenType type
Type of the token.
Definition: argsparser.h:75
Reserved words.
Definition: argsparser.h:62

Member Data Documentation

◆ end

int ArgToken::end

start and end position of the lexeme.

Definition at line 78 of file argsparser.h.

◆ lexeme

String ArgToken::lexeme

the string literal value of the token

Definition at line 76 of file argsparser.h.

◆ line

int ArgToken::line

line where token was found

Definition at line 77 of file argsparser.h.

◆ starred

bool ArgToken::starred

Some special mark to tokens.

Definition at line 85 of file argsparser.h.

◆ start

int ArgToken::start

Definition at line 78 of file argsparser.h.

◆ type

ArgTokenType ArgToken::type

Type of the token.

Definition at line 75 of file argsparser.h.

◆ visibility

int ArgToken::visibility

this info will be used by parser and printers 0 - means visible 1 - less visible while great is the number is less visible

Definition at line 83 of file argsparser.h.


The documentation for this class was generated from the following files: