summaryrefslogtreecommitdiff
path: root/src/parser/antlr_input.h
diff options
context:
space:
mode:
authorChristopher L. Conway <christopherleeconway@gmail.com>2010-05-03 21:25:47 +0000
committerChristopher L. Conway <christopherleeconway@gmail.com>2010-05-03 21:25:47 +0000
commit2673b70e8d31d42b4e2b7ec7d2edd3f28b1dac14 (patch)
tree3353f507db215b68d759327589f8c377cc70471f /src/parser/antlr_input.h
parent09b5745fa1a2fcdc6b8d0a0d31c1ba34c96d67f0 (diff)
Small mistake in previous commit
Diffstat (limited to 'src/parser/antlr_input.h')
-rw-r--r--src/parser/antlr_input.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/parser/antlr_input.h b/src/parser/antlr_input.h
index 244735e9b..d6d01b3cd 100644
--- a/src/parser/antlr_input.h
+++ b/src/parser/antlr_input.h
@@ -137,13 +137,13 @@ public:
static AntlrInput* newInput(InputLanguage lang, AntlrInputStream *inputStream);
/** Retrieve the text associated with a token. */
- inline static std::string tokenText(pANTLR3_COMMON_TOKEN token);
+ static std::string tokenText(pANTLR3_COMMON_TOKEN token);
/** Retrieve an unsigned from the text of a token */
- inline static unsigned tokenToUnsigned( pANTLR3_COMMON_TOKEN token );
+ static unsigned tokenToUnsigned( pANTLR3_COMMON_TOKEN token );
/** Retrieve an Integer from the text of a token */
- inline static Integer tokenToInteger( pANTLR3_COMMON_TOKEN token );
+ static Integer tokenToInteger( pANTLR3_COMMON_TOKEN token );
/** Retrieve a Rational from the text of a token */
- inline static Rational tokenToRational(pANTLR3_COMMON_TOKEN token);
+ static Rational tokenToRational(pANTLR3_COMMON_TOKEN token);
protected:
/** Create an input. This input takes ownership of the given input stream,
@@ -174,7 +174,7 @@ protected:
void setParser(Parser *parser);
};
-std::string AntlrInput::tokenText(pANTLR3_COMMON_TOKEN token) {
+inline std::string AntlrInput::tokenText(pANTLR3_COMMON_TOKEN token) {
ANTLR3_MARKER start = token->getStartIndex(token);
ANTLR3_MARKER end = token->getStopIndex(token);
/* start and end are boundary pointers. The text is a string
@@ -186,7 +186,7 @@ std::string AntlrInput::tokenText(pANTLR3_COMMON_TOKEN token) {
return txt;
}
-unsigned AntlrInput::tokenToUnsigned(pANTLR3_COMMON_TOKEN token) {
+inline unsigned AntlrInput::tokenToUnsigned(pANTLR3_COMMON_TOKEN token) {
unsigned result;
std::stringstream ss;
ss << tokenText(token);
@@ -194,13 +194,12 @@ unsigned AntlrInput::tokenToUnsigned(pANTLR3_COMMON_TOKEN token) {
return result;
}
-
-Integer AntlrInput::tokenToInteger(pANTLR3_COMMON_TOKEN token) {
+inline Integer AntlrInput::tokenToInteger(pANTLR3_COMMON_TOKEN token) {
Integer i( tokenText(token) );
return i;
}
-Rational AntlrInput::tokenToRational(pANTLR3_COMMON_TOKEN token) {
+inline Rational AntlrInput::tokenToRational(pANTLR3_COMMON_TOKEN token) {
Rational r( tokenText(token) );
return r;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback