Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » As a result, alternative(s) 2 were disabled for that input__ldscript
As a result, alternative(s) 2 were disabled for that input__ldscript [message #1272657] Tue, 18 March 2014 12:31
mao baolong is currently offline mao baolongFriend
Messages: 2
Registered: March 2014
Junior Member
Model:
(
output_format+=OutputFormat
|provide+=Provide
|entry+=Entry
|assignmentExpression+=AssignmentExpression
|memory+=Memory
|sections+=Sections
)*

;
OutputFormat:
'OUTPUT_FORMAT' '(' name=STRING ')'
;
Provide:
'PROVIDE' '(' AssignmentExpressionConent ')' LINE_SPR_KW
;
Entry:
'ENTRY' '(' name=ID ')'
;

Memory:
name='MEMORY' '{' memoryBlock+=MemoryBlock* '}'
;
MemoryBlock:
name=ID ':' 'ORIGIN' '=' orgin =format_number_with_unit
',' 'LENGTH' '=' length=format_number_with_unit
;

Sections:
name = 'SECTIONS' '{'
(
assignment+=AssignmentExpression
|sectionList+=Section)*
'}'
;

Section:
name=(AssignmentLeftName)+
(addr= format_number_with_unit)?
(type='[' ('NOLOAD'|'DSECT'|'COPY'|'INFO'|'OVERLAY') ']')?
':'
('AT''(' lma=format_number_with_unit ')')?
'{'
sectionContent+=SectionContent*
'}'
('>' region=)?
('AT' '>' lma_region=ID)?
('=' fillexp=format_number_with_unit)?
;


SectionContent:

assignmentExpression=AssignmentExpression|
sectionPart =SectionPart|
sort=Sort|
keep=Keep|
provide+=Provide
;

Sort:
SORT_KW '(' filename_id_star ')' LINE_SPR_KW?
;
Keep:
KEEP_KW '(' (SectionPartBase) ')' LINE_SPR_KW?
;
SectionPart:
SectionPartBase LINE_SPR_KW
;
SectionPartBase:
filename_id_star
('(' ( (Exclude_file? filename_id_star)) ')')?
;
Exclude_file:
'EXCLUDE_FILE' '(' (filename_id_star)+ ')'
;
filename_id_star:
(AssignmentLeftName|'?'| '*'|'\\'|'/')+
;


TreeExpression:
Defined '?' expressionL = Expression ':' expressionR =Expression
;
Defined:
'DEFINED' '(' name=ID ')'
;

Align:
ALIGN_KW '(' name =format_number_with_unit ')'
;
Absolute:
ABSOLUTE_KW '(' name ='.' ')'
;

AssignmentExpression:
AssignmentExpressionConent LINE_SPR_KW;

AssignmentExpressionConent:
name=AssignmentLeftName(
"="
| "+="
| "-="
| "*="
| "/="
| "<<="
| ">>="
| "&="
| "|="
)expression=Expression
;



Expression:
Addition
| TreeExpression;

Addition returns Expression:
Multiplication (({Plus.left=current} name='+' | {Minus.left=current} name='-') right=Multiplication)*;

Multiplication returns Expression:
PrimaryExpression (({Multi.left=current} name='*' | {Div.left=current} name='/') right=PrimaryExpression)*;


PrimaryExpression returns Expression:
'(' Expression ')'
| valueStr=format_number_with_unit
| rname=('.'|ID)
| align=Align
| absolute=Absolute
;
AssignmentLeftName:
ID|'.'
;
format_number_with_unit:
FORMAT_NUMBER
( ('m'|'M'|'G'|'B'|'b'|'km'|'kM'|'kG'|'kB'|'kb'|'Km'|'KM'|'KG'|'KB'|'Kb') )?
;
terminal FORMAT_NUMBER returns ecore::EString:
('0'..'9')* ('.' ('0'..'9')+)?
| '0x' (('0'..'9')| ('a'..'f')|('A'..'F'))*
| '0b' ('0'..'1')*


;


terminal INT returns ecore::EInt:
'this one has been deactivated';

ALIGN_KW : 'ALIGN';
ABSOLUTE_KW : 'ABSOLUTE';
SORT_KW:'SORT';
KEEP_KW:'KEEP';
LINE_SPR_KW: ';';
begin 644 MyDsl.xtext
M9W)A;6UA<B!O<F<N>'1E>'0N97AA;7!L92YM>61S;"Y->41S;"!W:71H(&]R
M9RYE8VQI<'-E+GAT97AT+F-O;6UO;BY497)M:6YA;',-"FEM<&]R="`B:'1T
M<#HO+W=W=RYE8VQI<'-E+F]R9R]E;68O,C`P,B]%8V]R92(@87,@96-O<F4-
M"F=E;F5R871E(&UY1'-L(")H='1P.B\O=W=W+GAT97AT+F]R9R]E>&%M<&QE
M+VUY9'-L+TUY1'-L(@T*#0H-"DUO9&5L.@T*"2@-"@D@(&]U='!U=%]F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DI*@T*
M"7P@)S!B)R`H)S`G+BXG,2<I*@T*#0H)#0HN92!H87,@8F5E
M;B!D96%C=&EV871E9"<[#0H-"B!!3$E'3E]+5R`Z("=!3$E'3B<[#0H@04)3
M3TQ55$5?2U<@.B`G04)33TQ55$4G.PT*(%-/4E1?2U<Z)U-/4E0G.PT*($M%
A15!?2U<Z)TM%15`G.PT*($Q)3D5?4U!27TM7.B`G.R<[
`
end
Previous Topic:generate code as is from user input
Next Topic:As a result, alternative(s) 2 were disabled for that input__ldscript
Goto Forum:
  


Current Time: Sat Jan 25 05:00:02 GMT 2020

Powered by FUDForum. Page generated in 0.01772 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top