|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Description Resource Path Location Type Bound mismatch: The generic method create(Class<T [message #1723872 is a reply to message #1723621] |
Thu, 18 February 2016 16:14 |
salha salha Messages: 97 Registered: February 2016 |
Member |
|
|
in the first -Xmx512M works well but when i changed my grammer i get this error
warning(200): ../org.xtext.example.armani/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1820:1: Decision can match input such as "';'" using multiple alternatives: 1, 2, 3
As a result, alternative(s) 3,2 were disabled for that input
warning(201): ../org.xtext.example.armani/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1820:1: The following alternatives are unreachable: 2
warning(208): ../org.xtext.example.armani/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:7692:1: The following token definitions are unreachable: RULE_FLOAT,RULE_BOOLEAN,RULE_LONG,RULE_INT
41077 [main] INFO or.validation.JavaValidatorFragment - executing generate for org.eclipse.xtext.generator.validation.JavaValidatorFragment
warning(200): ../org.xtext.example.armani.ui/src-gen/org/xtext/example/mydsl3/ui/contentassist/antlr/internal/InternalMyDsl.g:7071:51: Decision can match input such as "';'" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
warning(208): ../org.xtext.example.armani.ui/src-gen/org/xtext/example/mydsl3/ui/contentassist/antlr/internal/InternalMyDsl.g:21149:1: The following token definitions are unreachable: RULE_FLOAT,RULE_BOOLEAN,RULE_LONG,RULE_INT
49262 [main] INFO .emf.mwe2.runtime.workflow.Workflow - Done.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Description Resource Path Location Type Bound mismatch: The generic method create(Class& [message #1724094 is a reply to message #1724093] |
Sat, 20 February 2016 22:24 |
salha salha Messages: 97 Registered: February 2016 |
Member |
|
|
it's a big grammar
PropertyDeclaration:
'Property' parse_PropertyDescription=Parse_PropertyDescription ';'
;
Parse_PropertyDescription:
('Property')? P=ID
':' propertyTypeDescription+=PropertyTypeDescription
( '=' propertyValueDeclaration=PropertyValueDeclaration )?
( parse_PropertyDescription+=Parse_PropertyDescription
(';' parse_PropertyDescription+=Parse_PropertyDescription | ';' )*
)?
;
PropertyTypeDescription:
'Int' | 'Long' | 'Float' | 'Double' | 'String'
| 'true' | 'false' | nomm=ID
;
ParseRecordFieldDescription:
nomParseRecordField=ID (',' nnomParseRecordField+=ID )*
( ':' prop=PropertyTypeDescription )?
;
PropertyValueDeclaration:
INT | FLOAT | STRING
| acmeSetValue=AcmeSetValue | acmeSequenceValue=AcmeSequenceValue |
acmeRecordValue=AcmeRecordValue | nn=ID
;
[Updated on: Mon, 22 February 2016 11:47] Report message to a moderator
|
|
|
|
Re: Description Resource Path Location Type Bound mismatch: The generic method create(Class& [message #1724096 is a reply to message #1724095] |
Sat, 20 February 2016 22:57 |
|
Hi,
there are some things you should not do:
- use whitespace in keywords 'a b' => 'a' 'b'
- combine multiple keywords together '};' => '}' ';'
have a look at this grammar:
PropertiesBlock:
'Properties {'
( parse_PropertyDescription+=Parse_PropertyDescription
( ';' parse_PropertyDescription+=Parse_PropertyDescription | ';' )*
)?
'}' ( ';' )?
;
Parse_PropertyDescription:
('Property')? P=ID
':' propertyTypeDescription+=PropertyTypeDescription
( '=' propertyValueDeclaration=PropertyValueDeclaration )?
( parse_PropertyDescription+=Parse_PropertyDescription
(';' parse_PropertyDescription+=Parse_PropertyDescription | ';' )*
)?
;
PropertyValueDeclaration:
INT | STRING
;
PropertyTypeDescription:
'Int' | 'Long' | 'Float' | 'Double' | 'String'
| 'true' | 'false' | nomm=ID
;
and this debugantlrgrammar
/*
* generated by Xtext 2.9.1
*/
grammar DebugInternalMyDsl;
// Rule PropertiesBlock
rulePropertiesBlock:
'Properties {'
(
ruleParse_PropertyDescription
(
';'
ruleParse_PropertyDescription
|
';'
)*
)?
'}'
';'?
;
// Rule Parse_PropertyDescription
ruleParse_PropertyDescription:
'Property'?
RULE_ID
':'
rulePropertyTypeDescription
(
'='
rulePropertyValueDeclaration
)?
(
ruleParse_PropertyDescription
(
';'
ruleParse_PropertyDescription
|
';'
)*
)?
;
// Rule PropertyValueDeclaration
rulePropertyValueDeclaration:
(
RULE_INT
|
RULE_STRING
)
;
// Rule PropertyTypeDescription
rulePropertyTypeDescription:
(
'Int'
|
'Long'
|
'Float'
|
'Double'
|
'String'
|
'true'
|
'false'
|
RULE_ID
)
;
RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
RULE_INT : ('0'..'9')+;
RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\'');
RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/' {skip();};
RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')? {skip();};
RULE_WS : (' '|'\t'|'\r'|'\n')+ {skip();};
RULE_ANY_OTHER : .;
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.11525 seconds