klee::expr::Token Struct Reference

#include <Lexer.h>

List of all members.

Public Types

enum  Kind {
  At, Arrow, Colon, Comma,
  Comment, EndOfFile, Equals, Identifier,
  KWFalse, KWQuery, KWReserved, KWTrue,
  KWWidth, LBrace, LParen, LSquare,
  Number, RBrace, RParen, RSquare,
  Semicolon, Unknown
}

Public Member Functions

const char * getKindName () const
 getKindName - The name of this token's kind.
std::string getString () const
bool isKeyword () const
 isKeyword - True if this token is a keyword.
void dump ()

Public Attributes

Kind kind
const char * start
 The token kind.
unsigned length
 The beginning of the token string.
unsigned line
 The length of the token.
unsigned column
 The line number of the start of this token.


Detailed Description

Definition at line 21 of file Lexer.h.


Member Enumeration Documentation

Enumerator:
At 
Arrow  '@'
Colon  '->'
Comma  ':'
Comment  ','
EndOfFile  #[^
]+
Equals  <end of="" file>="">
Identifier  ' = '
KWFalse  [a-zA-Z_][a-zA-Z0-9._]*
KWQuery  'false'
KWReserved  'query'
KWTrue  fp[0-9]+([.].*)?, i[0-9]+
KWWidth  'true'
LBrace  w[0-9]+
LParen  '{'
LSquare  '('
Number  '['
RBrace  [+-]?[0-9][a-zA-Z0-9_]+
RParen  '}'
RSquare  ')'
Semicolon  ']'
Unknown  ';'

<other>

Definition at line 22 of file Lexer.h.


Member Function Documentation

void Token::dump (  ) 

Definition at line 53 of file Lexer.cpp.

References column, getKindName(), length, line, and start.

Here is the call graph for this function:

const char * Token::getKindName (  )  const

getKindName - The name of this token's kind.

The column number at the start of this token.

Definition at line 25 of file Lexer.cpp.

References Arrow, At, Colon, Comma, Comment, EndOfFile, Equals, kind, KWFalse, KWQuery, KWReserved, KWTrue, KWWidth, LBrace, LParen, LSquare, Number, RBrace, RParen, RSquare, Semicolon, and Unknown.

Referenced by dump(), and PrintInputTokens().

Here is the caller graph for this function:

std::string klee::expr::Token::getString (  )  const [inline]

getString - The string spanned by this token. This is not particularly efficient, use start and length when reasonable.

Definition at line 59 of file Lexer.h.

References length, and start.

bool klee::expr::Token::isKeyword (  )  const [inline]

isKeyword - True if this token is a keyword.

Definition at line 62 of file Lexer.h.

References kind, KWFalse, and KWTrue.


Member Data Documentation

The line number of the start of this token.

Definition at line 51 of file Lexer.h.

Referenced by dump(), klee::expr::Lexer::Lex(), and PrintInputTokens().

The beginning of the token string.

Definition at line 49 of file Lexer.h.

Referenced by dump(), getString(), klee::expr::Lexer::Lex(), LookupExprInfo(), PrintInputTokens(), and klee::expr::Lexer::SetTokenKind().

The length of the token.

Definition at line 50 of file Lexer.h.

Referenced by dump(), klee::expr::Lexer::Lex(), and PrintInputTokens().


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

Generated on Fri Jun 5 03:33:41 2009 for klee by  doxygen 1.5.8