Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352936

Summary: [Documentation] The Grammar Language example "resetting" missing
Product: [Modeling] TMF Reporter: Benjamin Peter <myeclipsebugs.200.dedeibel>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: jan, myeclipsebugs.200.dedeibel, sven.efftinge
Version: 0.7.0Flags: sven.efftinge: indigo+
Target Milestone: SR2   
Hardware: All   
OS: All   
Whiteboard:

Description Benjamin Peter CLA 2011-07-23 13:19:31 EDT
Hello,

to me it seems like there is an error in the "The Grammar Language example".

http://www.eclipse.org/Xtext/documentation/2_0_0/020-grammar-language.php

I am currently just learning to use xtext but this doesn't seem right to me and is confusing, might also just be me not understanding. Maybe you could clarify or change this.

The "events" are declared as follows:

events
  doorClosed  D1CL
  drawOpened  D2OP
  lightOn     L1ON
  doorOpened  D1OP
  panelClosed PNCL
  resetting doorOpened D1OP
end

Note the "resetting" line.

But the later grammar definition just declares the following terminmals

Statemachine :
  'events'
     (events+=Event)+
  'end'
  ('resetEvents'
     (resetEvents+=[Event])+
  'end')?
  'commands'
     (commands+=Command)+
  'end'
  (states+=State)+;

Here "resetEvents" is declared as separate begin/end block instead of as part of 'events'.

In addition to that neither resetting or resetEvents is used or mentioned again. Could you maybe clarify it, like saying it is not used or add an example how to handle it?

Thanks for reading.
Comment 1 Sven Efftinge CLA 2011-07-23 15:56:16 EDT
you are right, there's an inconsistency.
Comment 2 Dennis Huebner CLA 2011-08-02 09:34:15 EDT
Moving to Xtext component
Comment 3 Jan Koehnlein CLA 2011-10-26 09:45:26 EDT
Fixed in HEAD
Comment 4 Karsten Thoms CLA 2017-09-19 17:51:24 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 18:02:08 EDT
Closing all bugs that were set to RESOLVED before Neon.0