本文整理匯總了Java中org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken.merge方法的典型用法代碼示例。如果您正苦於以下問題:Java AntlrDatatypeRuleToken.merge方法的具體用法?Java AntlrDatatypeRuleToken.merge怎麽用?Java AntlrDatatypeRuleToken.merge使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken
的用法示例。
在下文中一共展示了AntlrDatatypeRuleToken.merge方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ruleKRONUSKW
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleKRONUSKW() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:2114:28: (kw= 'kronus' )
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:2116:2: kw= 'kronus'
{
kw=(Token)match(input,36,FOLLOW_36_in_ruleKRONUSKW4918);
current.merge(kw);
newLeafNode(kw, grammarAccess.getKRONUSKWAccess().getKronusKeyword());
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例2: ruleOpSingleAssign
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleOpSingleAssign() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
// InternalDSLPolicies.g:1620:2: (kw= '=' )
// InternalDSLPolicies.g:1621:2: kw= '='
{
kw=(Token)match(input,16,FOLLOW_2); if (state.failed) return current;
if ( state.backtracking==0 ) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getOpSingleAssignAccess().getEqualsSignKeyword());
}
}
if ( state.backtracking==0 ) {
leaveRule();
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例3: rulePACKAGE
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken rulePACKAGE() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:2141:28: (kw= 'package' )
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:2143:2: kw= 'package'
{
kw=(Token)match(input,37,FOLLOW_37_in_rulePACKAGE5006);
current.merge(kw);
newLeafNode(kw, grammarAccess.getPACKAGEAccess().getPackageKeyword());
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例4: ruleLogicalOROperator
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleLogicalOROperator() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
{
kw=(Token)match(input,VerticalLineVerticalLine,FOLLOW_2); if (state.failed) return current;
if ( state.backtracking==0 ) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getLogicalOROperatorAccess().getVerticalLineVerticalLineKeyword());
}
}
if ( state.backtracking==0 ) {
leaveRule();
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例5: ruleAS
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleAS() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:1925:28: (kw= 'as' )
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:1927:2: kw= 'as'
{
kw=(Token)match(input,29,FOLLOW_29_in_ruleAS4302);
current.merge(kw);
newLeafNode(kw, grammarAccess.getASAccess().getAsKeyword());
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例6: ruleRETURN
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleRETURN() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:2168:28: (kw= 'return' )
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:2170:2: kw= 'return'
{
kw=(Token)match(input,38,FOLLOW_38_in_ruleRETURN5094);
current.merge(kw);
newLeafNode(kw, grammarAccess.getRETURNAccess().getReturnKeyword());
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例7: ruleTYPE
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleTYPE() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:2222:28: (kw= 'type' )
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:2224:2: kw= 'type'
{
kw=(Token)match(input,40,FOLLOW_40_in_ruleTYPE5270);
current.merge(kw);
newLeafNode(kw, grammarAccess.getTYPEAccess().getTypeKeyword());
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例8: ruleUNARY_ONLY_OPS
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleUNARY_ONLY_OPS() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4831:28: (kw= '!' )
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4833:2: kw= '!'
{
kw=(Token)match(input,23,FOLLOW_23_in_ruleUNARY_ONLY_OPS11303);
current.merge(kw);
newLeafNode(kw, grammarAccess.getUNARY_ONLY_OPSAccess().getExclamationMarkKeyword());
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例9: ruleTypingStrategyDefSiteOperator
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleTypingStrategyDefSiteOperator() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
{
kw=(Token)match(input,Tilde,FOLLOW_2); if (state.failed) return current;
if ( state.backtracking==0 ) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getTypingStrategyDefSiteOperatorAccess().getTildeKeyword());
}
}
if ( state.backtracking==0 ) {
leaveRule();
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例10: ruleUNARY_OPS
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleUNARY_OPS() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
AntlrDatatypeRuleToken this_UNARY_ONLY_OPS_0 = null;
enterRule();
try {
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4858:28: ( (this_UNARY_ONLY_OPS_0= ruleUNARY_ONLY_OPS | kw= '-' ) )
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4859:1: (this_UNARY_ONLY_OPS_0= ruleUNARY_ONLY_OPS | kw= '-' )
{
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4859:1: (this_UNARY_ONLY_OPS_0= ruleUNARY_ONLY_OPS | kw= '-' )
int alt75=2;
int LA75_0 = input.LA(1);
if ( (LA75_0==23) ) {
alt75=1;
}
else if ( (LA75_0==44) ) {
alt75=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 75, 0, input);
throw nvae;
}
switch (alt75) {
case 1 :
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4860:5: this_UNARY_ONLY_OPS_0= ruleUNARY_ONLY_OPS
{
newCompositeNode(grammarAccess.getUNARY_OPSAccess().getUNARY_ONLY_OPSParserRuleCall_0());
pushFollow(FOLLOW_ruleUNARY_ONLY_OPS_in_ruleUNARY_OPS11401);
this_UNARY_ONLY_OPS_0=ruleUNARY_ONLY_OPS();
state._fsp--;
current.merge(this_UNARY_ONLY_OPS_0);
afterParserOrEnumRuleCall();
}
break;
case 2 :
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4872:2: kw= '-'
{
kw=(Token)match(input,44,FOLLOW_44_in_ruleUNARY_OPS11425);
current.merge(kw);
newLeafNode(kw, grammarAccess.getUNARY_OPSAccess().getHyphenMinusKeyword_1());
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例11: ruleNavigationOperator
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleNavigationOperator() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
// InternalGExpressions.g:1412:28: ( (kw= '.' | kw= '->' ) )
// InternalGExpressions.g:1413:1: (kw= '.' | kw= '->' )
{
// InternalGExpressions.g:1413:1: (kw= '.' | kw= '->' )
int alt17=2;
int LA17_0 = input.LA(1);
if ( (LA17_0==22) ) {
alt17=1;
}
else if ( (LA17_0==23) ) {
alt17=2;
}
else {
if (state.backtracking>0) {state.failed=true; return current;}
NoViableAltException nvae =
new NoViableAltException("", 17, 0, input);
throw nvae;
}
switch (alt17) {
case 1 :
// InternalGExpressions.g:1414:2: kw= '.'
{
kw=(Token)match(input,22,FOLLOW_2); if (state.failed) return current;
if ( state.backtracking==0 ) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getNavigationOperatorAccess().getFullStopKeyword_0());
}
}
break;
case 2 :
// InternalGExpressions.g:1421:2: kw= '->'
{
kw=(Token)match(input,23,FOLLOW_2); if (state.failed) return current;
if ( state.backtracking==0 ) {
current.merge(kw);
newLeafNode(kw, grammarAccess.getNavigationOperatorAccess().getHyphenMinusGreaterThanSignKeyword_1());
}
}
break;
}
}
if ( state.backtracking==0 ) {
leaveRule();
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例12: ruleEString
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleEString() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token this_STRING_0=null;
Token this_ID_1=null;
enterRule();
try {
// ../xtext.queryIT/src-gen/xtext/parser/antlr/internal/InternalQueryITParser.g:598:6: ( (this_STRING_0= RULE_STRING | this_ID_1= RULE_ID ) )
// ../xtext.queryIT/src-gen/xtext/parser/antlr/internal/InternalQueryITParser.g:599:1: (this_STRING_0= RULE_STRING | this_ID_1= RULE_ID )
{
// ../xtext.queryIT/src-gen/xtext/parser/antlr/internal/InternalQueryITParser.g:599:1: (this_STRING_0= RULE_STRING | this_ID_1= RULE_ID )
int alt4=2;
int LA4_0 = input.LA(1);
if ( (LA4_0==RULE_STRING) ) {
alt4=1;
}
else if ( (LA4_0==RULE_ID) ) {
alt4=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 4, 0, input);
throw nvae;
}
switch (alt4) {
case 1 :
// ../xtext.queryIT/src-gen/xtext/parser/antlr/internal/InternalQueryITParser.g:599:6: this_STRING_0= RULE_STRING
{
this_STRING_0=(Token)match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleEString1436);
current.merge(this_STRING_0);
newLeafNode(this_STRING_0, grammarAccess.getEStringAccess().getSTRINGTerminalRuleCall_0());
}
break;
case 2 :
// ../xtext.queryIT/src-gen/xtext/parser/antlr/internal/InternalQueryITParser.g:607:10: this_ID_1= RULE_ID
{
this_ID_1=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleEString1462);
current.merge(this_ID_1);
newLeafNode(this_ID_1, grammarAccess.getEStringAccess().getIDTerminalRuleCall_1());
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例13: ruleID
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleID() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token this_CAPITALIZED_ID_0=null;
Token this_OTHER_ID_1=null;
enterRule();
try {
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:5788:28: ( (this_CAPITALIZED_ID_0= RULE_CAPITALIZED_ID | this_OTHER_ID_1= RULE_OTHER_ID ) )
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:5789:1: (this_CAPITALIZED_ID_0= RULE_CAPITALIZED_ID | this_OTHER_ID_1= RULE_OTHER_ID )
{
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:5789:1: (this_CAPITALIZED_ID_0= RULE_CAPITALIZED_ID | this_OTHER_ID_1= RULE_OTHER_ID )
int alt83=2;
int LA83_0 = input.LA(1);
if ( (LA83_0==RULE_CAPITALIZED_ID) ) {
alt83=1;
}
else if ( (LA83_0==RULE_OTHER_ID) ) {
alt83=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 83, 0, input);
throw nvae;
}
switch (alt83) {
case 1 :
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:5789:6: this_CAPITALIZED_ID_0= RULE_CAPITALIZED_ID
{
this_CAPITALIZED_ID_0=(Token)match(input,RULE_CAPITALIZED_ID,FOLLOW_RULE_CAPITALIZED_ID_in_ruleID14106);
current.merge(this_CAPITALIZED_ID_0);
newLeafNode(this_CAPITALIZED_ID_0, grammarAccess.getIDAccess().getCAPITALIZED_IDTerminalRuleCall_0());
}
break;
case 2 :
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:5797:10: this_OTHER_ID_1= RULE_OTHER_ID
{
this_OTHER_ID_1=(Token)match(input,RULE_OTHER_ID,FOLLOW_RULE_OTHER_ID_in_ruleID14132);
current.merge(this_OTHER_ID_1);
newLeafNode(this_OTHER_ID_1, grammarAccess.getIDAccess().getOTHER_IDTerminalRuleCall_1());
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例14: ruleComment
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleComment() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token this_FORMAT_COMMENT_0=null;
enterRule();
try {
// InternalDSLPolicies.g:147:2: (this_FORMAT_COMMENT_0= RULE_FORMAT_COMMENT )
// InternalDSLPolicies.g:148:2: this_FORMAT_COMMENT_0= RULE_FORMAT_COMMENT
{
this_FORMAT_COMMENT_0=(Token)match(input,RULE_FORMAT_COMMENT,FOLLOW_2); if (state.failed) return current;
if ( state.backtracking==0 ) {
current.merge(this_FORMAT_COMMENT_0);
}
if ( state.backtracking==0 ) {
newLeafNode(this_FORMAT_COMMENT_0, grammarAccess.getCommentAccess().getFORMAT_COMMENTTerminalRuleCall());
}
}
if ( state.backtracking==0 ) {
leaveRule();
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
示例15: ruleBINARY_OPS_1
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; //導入方法依賴的package包/類
public final AntlrDatatypeRuleToken ruleBINARY_OPS_1() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4897:28: ( (kw= '*' | kw= '/' ) )
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4898:1: (kw= '*' | kw= '/' )
{
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4898:1: (kw= '*' | kw= '/' )
int alt76=2;
int LA76_0 = input.LA(1);
if ( (LA76_0==47) ) {
alt76=1;
}
else if ( (LA76_0==48) ) {
alt76=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 76, 0, input);
throw nvae;
}
switch (alt76) {
case 1 :
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4899:2: kw= '*'
{
kw=(Token)match(input,47,FOLLOW_47_in_ruleBINARY_OPS_111515);
current.merge(kw);
newLeafNode(kw, grammarAccess.getBINARY_OPS_1Access().getAsteriskKeyword_0());
}
break;
case 2 :
// ../com.ms.qaTools.saturn.kronus/src-gen/com/ms/qaTools/saturn/parser/antlr/internal/InternalKronus.g:4906:2: kw= '/'
{
kw=(Token)match(input,48,FOLLOW_48_in_ruleBINARY_OPS_111534);
current.merge(kw);
newLeafNode(kw, grammarAccess.getBINARY_OPS_1Access().getSolidusKeyword_1());
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}