use of antlr.Token in project sonar-java by SonarSource.
the class ValidWhenLexer method mNOTEQUALSIGN.
public final void mNOTEQUALSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype;
Token _token = null;
int _begin = text.length();
_ttype = NOTEQUALSIGN;
int _saveIndex;
match('!');
match('=');
if (_createToken && _token == null && _ttype != Token.SKIP) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length() - _begin));
}
_returnToken = _token;
}
use of antlr.Token in project sonar-java by SonarSource.
the class ValidWhenLexer method mTHIS.
public final void mTHIS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype;
Token _token = null;
int _begin = text.length();
_ttype = THIS;
int _saveIndex;
match("*this*");
if (_createToken && _token == null && _ttype != Token.SKIP) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length() - _begin));
}
_returnToken = _token;
}
use of antlr.Token in project sonar-java by SonarSource.
the class ValidWhenLexer method mHEX_LITERAL.
public final void mHEX_LITERAL(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype;
Token _token = null;
int _begin = text.length();
_ttype = HEX_LITERAL;
int _saveIndex;
match('0');
match('x');
{
int _cnt23 = 0;
_loop23: do {
switch(LA(1)) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
matchRange('0', '9');
break;
}
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
{
matchRange('a', 'f');
break;
}
default:
{
if (_cnt23 >= 1) {
break _loop23;
} else {
throw new NoViableAltForCharException((char) LA(1), getFilename(), getLine(), getColumn());
}
}
}
_cnt23++;
} while (true);
}
if (_createToken && _token == null && _ttype != Token.SKIP) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length() - _begin));
}
_returnToken = _token;
}
use of antlr.Token in project sonar-java by SonarSource.
the class ValidWhenLexer method mWS.
public final void mWS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype;
Token _token = null;
int _begin = text.length();
_ttype = WS;
int _saveIndex;
{
int _cnt15 = 0;
_loop15: do {
switch(LA(1)) {
case ' ':
{
match(' ');
break;
}
case '\t':
{
match('\t');
break;
}
case '\n':
{
match('\n');
break;
}
case '\r':
{
match('\r');
break;
}
default:
{
if (_cnt15 >= 1) {
break _loop15;
} else {
throw new NoViableAltForCharException((char) LA(1), getFilename(), getLine(), getColumn());
}
}
}
_cnt15++;
} while (true);
}
_ttype = Token.SKIP;
if (_createToken && _token == null && _ttype != Token.SKIP) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length() - _begin));
}
_returnToken = _token;
}
use of antlr.Token in project sonar-java by SonarSource.
the class ValidWhenLexer method mLESSTHANSIGN.
public final void mLESSTHANSIGN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
int _ttype;
Token _token = null;
int _begin = text.length();
_ttype = LESSTHANSIGN;
int _saveIndex;
match('<');
if (_createToken && _token == null && _ttype != Token.SKIP) {
_token = makeToken(_ttype);
_token.setText(new String(text.getBuffer(), _begin, text.length() - _begin));
}
_returnToken = _token;
}
Aggregations