Skip to main content



      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 08:58 Go to next message
Eclipse UserFriend
Hi,

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?

Thanks.
Re: Plain Language parser in xtext xbase [message #1794800 is a reply to message #1794784] Thu, 06 September 2018 13:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi

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.

Regards

Ed Willink

Re: Plain Language parser in xtext xbase [message #1794801 is a reply to message #1794800] Thu, 06 September 2018 13:24 Go to previous message
Eclipse UserFriend
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)
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 Jun 23 06:32:57 EDT 2025

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

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

Back to the top