Fornax-Platform
Forum

Re: [sculptor] weird errors after editing DSL

by polly.c.chang :: Rate this Message:

Reply to Author | View in Thread

Any ideas for how to debug this issue?  I downloaded ANTLRWorks and tested my model.design file, and it parses correctly.  I know this because I tested with a broken model.design so I would know what the output looks like for something that is broken, and my model.design is not broken.

I cannot figure out why adding those two keywords to DslAttribute works but adding the same ones to DslReference does not work.  I'm copying and pasting the same snippets in the XText file.  The OAW errors are so cryptic too.  Googling the OAW newsgroups has not been helpful.  

I'm just banging my head against the wall now, so any help would be greatly appreciated!  ;)

Thanks,
Polly


amphoras wrote:
OK, I have gotten a little bit further.  The first "mismatched input" error gave me a clue about the problem.  I had added two attributes to DslReference.  When I comment out the two new attributes from the sculptordsl.xtxt file and remove them from my model.design file, the generator works.  I don't see the problem though because I copied and pasted them from another concept and those work fine.  Also, I can see these two attributes in the generated metamodel Java files.  The definition is as follows:

DslReference :
  (doc=STRING)?
  REF (visibility=DslVisibility)? (collectionType=DslCollectionType"<")? (("@")?domainObjectType=[DslSimpleDomainObject]) (">")? name=ID
    ((key?="key") |
     ((notChangeable?=NOT "changeable") | ("changeable")) |
     ((required?="required") | (NOT "required")) |
     ((nullable?="nullable") | (NOT "nullable")) |
     ("cascade" "=" cascade=STRING) |
     ("fetch" "=" fetch=STRING) |
     ((cache?="cache") | (NOT "cache")) |
     ((inverse?="inverse") | (NOT "inverse")) |
     ("databaseColumn" "=" databaseColumn=STRING) |
     ("orderBy" "=" orderBy=ID) |
     ("foo" "=" foo=STRING) |
     ("foo2" "=" foo2=STRING))*
    (OPPOSITE oppositeName=ID)? (";")?;  

--Polly

 « Return to Thread: [sculptor] weird errors after editing DSL

LightInTheBox - Buy quality products at wholesale price!