Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Plain Language parser in xtext xbase(Need docs/examples on plain language to java conversion using xbase)
Plain Language parser in xtext xbase [message #1794784] Thu, 06 September 2018 12:58 Go to next message
Sreedharan C is currently offline Sreedharan CFriend
Messages: 1
Registered: September 2018
Junior Member

I want to convert the plain language into java code using xext, xbase.
Please provide some docs or share the example code for below sample scenario.

If employee age is greater than 60 then print "sixty"

I want to know how xtext file will be for this simple statement. How the xtext file can be converted to java?

Re: Plain Language parser in xtext xbase [message #1794800 is a reply to message #1794784] Thu, 06 September 2018 17:23 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6112
Registered: July 2009
Senior Member

You want to look at natural language processing. Sometimes I gather it even achieves 95% accuracy. Conversely that means 5% of programs are wrong, a far worse error rate than most programmers achieve.

I very much doubt that Xtext is suitable for natural language parsing.


Ed Willink

Re: Plain Language parser in xtext xbase [message #1794801 is a reply to message #1794800] Thu, 06 September 2018 17:24 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12388
Registered: July 2009
Senior Member
xbase makes only sense if you have a java like semantics and syntax/expressions.
to generate java from a dsl simply produce the java code you wish using a normal IGenerator(2)

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Customize DSL file location in (maven) projects
Next Topic:Need help to implement an ambiguous grammar (ACSL grammar)
Goto Forum:

Current Time: Mon Nov 19 05:53:22 GMT 2018

Powered by FUDForum. Page generated in 0.02515 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top