Skip to content

Commit

Permalink
eclipse-archived#190 POC: Fixed insertion on directors
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodolfo Totaro committed Dec 17, 2016
1 parent 259e330 commit aacc5a6
Show file tree
Hide file tree
Showing 19 changed files with 2,160 additions and 1,965 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ protected String getRuleName(AbstractElement element) {
private static final long serialVersionUID = 1L;
{
put(grammarAccess.getCommandAccess().getAlternatives_0(), "rule__Command__Alternatives_0");
put(grammarAccess.getNamedObjAccess().getNameAlternatives_0(), "rule__NamedObj__NameAlternatives_0");
put(grammarAccess.getJvmTypeReferenceAccess().getAlternatives(), "rule__JvmTypeReference__Alternatives");
put(grammarAccess.getJvmArgumentTypeReferenceAccess().getAlternatives(), "rule__JvmArgumentTypeReference__Alternatives");
put(grammarAccess.getJvmWildcardTypeReferenceAccess().getAlternatives_2(), "rule__JvmWildcardTypeReference__Alternatives_2");
Expand Down Expand Up @@ -81,7 +82,7 @@ protected String getRuleName(AbstractElement element) {
put(grammarAccess.getQualifiedNameInStaticImportAccess().getGroup(), "rule__QualifiedNameInStaticImport__Group__0");
put(grammarAccess.getTriquetrumScriptAccess().getCommandsAssignment(), "rule__TriquetrumScript__CommandsAssignment");
put(grammarAccess.getInsertAccess().getObjAssignment_1(), "rule__Insert__ObjAssignment_1");
put(grammarAccess.getInsertAccess().getAliasAssignment_2_1(), "rule__Insert__AliasAssignment_2_1");
put(grammarAccess.getInsertAccess().getNameAssignment_2_1(), "rule__Insert__NameAssignment_2_1");
put(grammarAccess.getInsertAccess().getParametersAssignment_3_1(), "rule__Insert__ParametersAssignment_3_1");
put(grammarAccess.getInsertAccess().getParametersAssignment_3_2_1(), "rule__Insert__ParametersAssignment_3_2_1");
put(grammarAccess.getParameterAccess().getValueAssignment_2(), "rule__Parameter__ValueAssignment_2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,27 @@ finally {
restoreStackSize(stackSize);
}

rule__NamedObj__NameAlternatives_0
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getNamedObjAccess().getNameQualifiedNameParserRuleCall_0_0()); }
ruleQualifiedName
{ after(grammarAccess.getNamedObjAccess().getNameQualifiedNameParserRuleCall_0_0()); }
)
|
(
{ before(grammarAccess.getNamedObjAccess().getNameSTRINGTerminalRuleCall_0_1()); }
RULE_STRING
{ after(grammarAccess.getNamedObjAccess().getNameSTRINGTerminalRuleCall_0_1()); }
)
;
finally {
restoreStackSize(stackSize);
}

rule__JvmTypeReference__Alternatives
@init {
int stackSize = keepStackSize();
Expand Down Expand Up @@ -920,9 +941,9 @@ rule__Insert__Group_2__1__Impl
}
:
(
{ before(grammarAccess.getInsertAccess().getAliasAssignment_2_1()); }
(rule__Insert__AliasAssignment_2_1)
{ after(grammarAccess.getInsertAccess().getAliasAssignment_2_1()); }
{ before(grammarAccess.getInsertAccess().getNameAssignment_2_1()); }
(rule__Insert__NameAssignment_2_1)
{ after(grammarAccess.getInsertAccess().getNameAssignment_2_1()); }
)
;
finally {
Expand Down Expand Up @@ -3147,15 +3168,15 @@ finally {
restoreStackSize(stackSize);
}

rule__Insert__AliasAssignment_2_1
rule__Insert__NameAssignment_2_1
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getInsertAccess().getAliasNamedObjParserRuleCall_2_1_0()); }
{ before(grammarAccess.getInsertAccess().getNameNamedObjParserRuleCall_2_1_0()); }
ruleNamedObj
{ after(grammarAccess.getInsertAccess().getAliasNamedObjParserRuleCall_2_1_0()); }
{ after(grammarAccess.getInsertAccess().getNameNamedObjParserRuleCall_2_1_0()); }
)
;
finally {
Expand Down Expand Up @@ -3213,9 +3234,9 @@ rule__NamedObj__NameAssignment
}
:
(
{ before(grammarAccess.getNamedObjAccess().getNameQualifiedNameParserRuleCall_0()); }
ruleQualifiedName
{ after(grammarAccess.getNamedObjAccess().getNameQualifiedNameParserRuleCall_0()); }
{ before(grammarAccess.getNamedObjAccess().getNameAlternatives_0()); }
(rule__NamedObj__NameAlternatives_0)
{ after(grammarAccess.getNamedObjAccess().getNameAlternatives_0()); }
)
;
finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,10 @@ public final void mRULE_ID() throws RecognitionException {
try {
int _type = RULE_ID;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalTqcl.g:3643:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' | '0' .. '9' )* )
// InternalTqcl.g:3643:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' | '0' .. '9' )*
// InternalTqcl.g:3664:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' | '0' .. '9' )* )
// InternalTqcl.g:3664:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' | '0' .. '9' )*
{
// InternalTqcl.g:3643:11: ( '^' )?
// InternalTqcl.g:3664:11: ( '^' )?
int alt1=2;
int LA1_0 = input.LA(1);

Expand All @@ -565,7 +565,7 @@ public final void mRULE_ID() throws RecognitionException {
}
switch (alt1) {
case 1 :
// InternalTqcl.g:3643:11: '^'
// InternalTqcl.g:3664:11: '^'
{
match('^');

Expand All @@ -583,7 +583,7 @@ public final void mRULE_ID() throws RecognitionException {
recover(mse);
throw mse;}

// InternalTqcl.g:3643:44: ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' | '0' .. '9' )*
// InternalTqcl.g:3664:44: ( 'a' .. 'z' | 'A' .. 'Z' | '$' | '_' | '0' .. '9' )*
loop2:
do {
int alt2=2;
Expand Down Expand Up @@ -632,10 +632,10 @@ public final void mRULE_STRING() throws RecognitionException {
try {
int _type = RULE_STRING;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalTqcl.g:3645:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* ( '\"' )? | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* ( '\\'' )? ) )
// InternalTqcl.g:3645:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* ( '\"' )? | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* ( '\\'' )? )
// InternalTqcl.g:3666:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* ( '\"' )? | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* ( '\\'' )? ) )
// InternalTqcl.g:3666:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* ( '\"' )? | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* ( '\\'' )? )
{
// InternalTqcl.g:3645:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* ( '\"' )? | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* ( '\\'' )? )
// InternalTqcl.g:3666:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* ( '\"' )? | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* ( '\\'' )? )
int alt7=2;
int LA7_0 = input.LA(1);

Expand All @@ -653,10 +653,10 @@ else if ( (LA7_0=='\'') ) {
}
switch (alt7) {
case 1 :
// InternalTqcl.g:3645:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* ( '\"' )?
// InternalTqcl.g:3666:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* ( '\"' )?
{
match('\"');
// InternalTqcl.g:3645:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
// InternalTqcl.g:3666:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
loop3:
do {
int alt3=3;
Expand All @@ -672,15 +672,15 @@ else if ( ((LA3_0>='\u0000' && LA3_0<='!')||(LA3_0>='#' && LA3_0<='[')||(LA3_0>=

switch (alt3) {
case 1 :
// InternalTqcl.g:3645:21: '\\\\' .
// InternalTqcl.g:3666:21: '\\\\' .
{
match('\\');
matchAny();

}
break;
case 2 :
// InternalTqcl.g:3645:28: ~ ( ( '\\\\' | '\"' ) )
// InternalTqcl.g:3666:28: ~ ( ( '\\\\' | '\"' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
Expand All @@ -700,7 +700,7 @@ else if ( ((LA3_0>='\u0000' && LA3_0<='!')||(LA3_0>='#' && LA3_0<='[')||(LA3_0>=
}
} while (true);

// InternalTqcl.g:3645:44: ( '\"' )?
// InternalTqcl.g:3666:44: ( '\"' )?
int alt4=2;
int LA4_0 = input.LA(1);

Expand All @@ -709,7 +709,7 @@ else if ( ((LA3_0>='\u0000' && LA3_0<='!')||(LA3_0>='#' && LA3_0<='[')||(LA3_0>=
}
switch (alt4) {
case 1 :
// InternalTqcl.g:3645:44: '\"'
// InternalTqcl.g:3666:44: '\"'
{
match('\"');

Expand All @@ -722,10 +722,10 @@ else if ( ((LA3_0>='\u0000' && LA3_0<='!')||(LA3_0>='#' && LA3_0<='[')||(LA3_0>=
}
break;
case 2 :
// InternalTqcl.g:3645:49: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* ( '\\'' )?
// InternalTqcl.g:3666:49: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* ( '\\'' )?
{
match('\'');
// InternalTqcl.g:3645:54: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
// InternalTqcl.g:3666:54: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
loop5:
do {
int alt5=3;
Expand All @@ -741,15 +741,15 @@ else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=

switch (alt5) {
case 1 :
// InternalTqcl.g:3645:55: '\\\\' .
// InternalTqcl.g:3666:55: '\\\\' .
{
match('\\');
matchAny();

}
break;
case 2 :
// InternalTqcl.g:3645:62: ~ ( ( '\\\\' | '\\'' ) )
// InternalTqcl.g:3666:62: ~ ( ( '\\\\' | '\\'' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
Expand All @@ -769,7 +769,7 @@ else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=
}
} while (true);

// InternalTqcl.g:3645:79: ( '\\'' )?
// InternalTqcl.g:3666:79: ( '\\'' )?
int alt6=2;
int LA6_0 = input.LA(1);

Expand All @@ -778,7 +778,7 @@ else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=
}
switch (alt6) {
case 1 :
// InternalTqcl.g:3645:79: '\\''
// InternalTqcl.g:3666:79: '\\''
{
match('\'');

Expand Down Expand Up @@ -809,12 +809,12 @@ public final void mRULE_ML_COMMENT() throws RecognitionException {
try {
int _type = RULE_ML_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalTqcl.g:3647:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
// InternalTqcl.g:3647:19: '/*' ( options {greedy=false; } : . )* '*/'
// InternalTqcl.g:3668:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
// InternalTqcl.g:3668:19: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*");

// InternalTqcl.g:3647:24: ( options {greedy=false; } : . )*
// InternalTqcl.g:3668:24: ( options {greedy=false; } : . )*
loop8:
do {
int alt8=2;
Expand All @@ -839,7 +839,7 @@ else if ( ((LA8_0>='\u0000' && LA8_0<=')')||(LA8_0>='+' && LA8_0<='\uFFFF')) ) {

switch (alt8) {
case 1 :
// InternalTqcl.g:3647:52: .
// InternalTqcl.g:3668:52: .
{
matchAny();

Expand Down Expand Up @@ -869,12 +869,12 @@ public final void mRULE_SL_COMMENT() throws RecognitionException {
try {
int _type = RULE_SL_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalTqcl.g:3649:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// InternalTqcl.g:3649:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// InternalTqcl.g:3670:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// InternalTqcl.g:3670:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("//");

// InternalTqcl.g:3649:24: (~ ( ( '\\n' | '\\r' ) ) )*
// InternalTqcl.g:3670:24: (~ ( ( '\\n' | '\\r' ) ) )*
loop9:
do {
int alt9=2;
Expand All @@ -887,7 +887,7 @@ public final void mRULE_SL_COMMENT() throws RecognitionException {

switch (alt9) {
case 1 :
// InternalTqcl.g:3649:24: ~ ( ( '\\n' | '\\r' ) )
// InternalTqcl.g:3670:24: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
input.consume();
Expand All @@ -907,7 +907,7 @@ public final void mRULE_SL_COMMENT() throws RecognitionException {
}
} while (true);

// InternalTqcl.g:3649:40: ( ( '\\r' )? '\\n' )?
// InternalTqcl.g:3670:40: ( ( '\\r' )? '\\n' )?
int alt11=2;
int LA11_0 = input.LA(1);

Expand All @@ -916,9 +916,9 @@ public final void mRULE_SL_COMMENT() throws RecognitionException {
}
switch (alt11) {
case 1 :
// InternalTqcl.g:3649:41: ( '\\r' )? '\\n'
// InternalTqcl.g:3670:41: ( '\\r' )? '\\n'
{
// InternalTqcl.g:3649:41: ( '\\r' )?
// InternalTqcl.g:3670:41: ( '\\r' )?
int alt10=2;
int LA10_0 = input.LA(1);

Expand All @@ -927,7 +927,7 @@ public final void mRULE_SL_COMMENT() throws RecognitionException {
}
switch (alt10) {
case 1 :
// InternalTqcl.g:3649:41: '\\r'
// InternalTqcl.g:3670:41: '\\r'
{
match('\r');

Expand Down Expand Up @@ -959,10 +959,10 @@ public final void mRULE_WS() throws RecognitionException {
try {
int _type = RULE_WS;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalTqcl.g:3651:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
// InternalTqcl.g:3651:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
// InternalTqcl.g:3672:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
// InternalTqcl.g:3672:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
{
// InternalTqcl.g:3651:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
// InternalTqcl.g:3672:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
int cnt12=0;
loop12:
do {
Expand Down Expand Up @@ -1016,8 +1016,8 @@ public final void mRULE_ANY_OTHER() throws RecognitionException {
try {
int _type = RULE_ANY_OTHER;
int _channel = DEFAULT_TOKEN_CHANNEL;
// InternalTqcl.g:3653:16: ( . )
// InternalTqcl.g:3653:18: .
// InternalTqcl.g:3674:16: ( . )
// InternalTqcl.g:3674:18: .
{
matchAny();

Expand Down
Loading

0 comments on commit aacc5a6

Please sign in to comment.