Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352936 - [Documentation] The Grammar Language example "resetting" missing
Summary: [Documentation] The Grammar Language example "resetting" missing
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: SR2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-23 13:19 EDT by Benjamin Peter CLA
Modified: 2017-09-19 18:02 EDT (History)
3 users (show)

See Also:
sven.efftinge: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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