Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » whitespace Indentation based grammar ?
whitespace Indentation based grammar ? [message #975677] Wed, 07 November 2012 21:28 Go to next message
Jay Liu is currently offline Jay Liu
Messages: 1
Registered: November 2012
Junior Member
does xtext support it ? and is there any sample code ?

this kind of grammars is quite common , like python, haml, yaml.

Re: whitespace Indentation based grammar ? [message #984394 is a reply to message #975677] Wed, 14 November 2012 12:06 Go to previous messageGo to next message
Aaron Digulla is currently offline Aaron Digulla
Messages: 258
Registered: July 2009
Location: Switzerland
Senior Member
Unfortunately, no. Indentation based grammars need a special lexer and a grammar which can handle the output of such a lexer. ANTLR (the parser framework used by Xtext) can't handle this.
Re: whitespace Indentation based grammar ? [message #984819 is a reply to message #975677] Wed, 14 November 2012 19:58 Go to previous message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2498
Registered: July 2009
Senior Member
On 2012-08-11 14:59, Jay Liu wrote:
> does xtext support it ? and is there any sample code ?
>
> this kind of grammars is quite common , like python, haml, yaml.
>
Short answer: no

Longer answer:
Search this forum for earlier responses on this topic as people have
been positing suggestions on how to do this - not sure if there are any
successful implementations available anywhere to look at though.

But, "supported", like out of the box: no.

Regards
- henrik
Previous Topic:Validator - Error/Warning Message Syntax
Next Topic:using filters in cross referencing
Goto Forum:
  


Current Time: Tue Jul 29 17:03:10 EDT 2014

Powered by FUDForum. Page generated in 0.02203 seconds