Errors starting with basic xtext - xtext

Recently I have installed Xtext and tried to run the default Hello world! code using the tutorials available on youtube. However, when I try to run the code I am getting 44 errors.
I am new to using Xtext as well as eclipse. I have tried to reinstall eclipse a lot of times. I have tried with normal version, enterprise version and DSL tools version. But every time I am getting the same errors. Please help me resolve this issue. I tried to find out what these errors meant and how to resolve them over the eclipse community forums but did not find any solution.
All the errors are repetitions of the following two errors.
Description Resource Path Location Type
Duplicate field InternalMyDslParser.FOLLOW_ InternalMyDslParser.java /org.xtext.example.mydsl.ide/src-gen/org/xtext/example/mydsl/ide/contentassist/antlr/internal line Java Problem
and
Description Resource Path Location Type
Syntax error on token "?", delete this token InternalMyDslParser.java /org.xtext.example.mydsl.ide/src-gen/org/xtext/example/mydsl/ide/contentassist/antlr/internal line Java Problem
Please Help me resolve this issue.

Related

How to run Derric

I'm trying to run Derric with command
import lang::derric::testparse;
I followed all instructions and got everything to work with eclipse and Rascal. I am running the rascal console with Derric. I have tried downloading older versions of eclipse, used windows 7, and windows 10. Nothing is working, I even read the rascal tutorial on modules to see if everything looks right and it does. I need it to work for a school assignment, if someone can get it to run can you tell me under which circumstances (i.e eclipse version, windows version, steps taken) to run the program?
rascal>import lang::derric::testparse;
Error: Cannot import module lang::derric::testparse
Time: 484ms
ok
rascal>
It's suppose to say ok at the end, and then I can run command generate().
Hi #yoyo great that you are trying Rascal, but you need to give more explanation about what you are trying to do. There are potentially two main causes of the message you get:
the module is correct but it cannot be found, or
the module is incorrect (e.g. it does not even parse correctly).
It would therefore be helpful if you show
where lang::derric::testparse is located in your file system, and
to show its contents.
As a side question: is there any relation with the Derric language (a DSL for file formats) Jeroen van den Bos has been working on a few years ago?

java.lang.UnsatisfiedLinkError: no jnind4jcpu in java.library.path

I started using the 1.0.0-beta2 version of deeplearning4j and I am getting the following error when attempting to start:
java.lang.UnsatisfiedLinkError: no jnind4jcpu in java.library.path
In looking around, I came across this issue: https://github.com/deeplearning4j/nd4j/issues/1687
where the solution seemed to be an incomplete set of packages. I have confirmed that I have nd4j-native-platform-1.0.0-beta2.jar, but this jar file contains no libraries as what seemed to be the problem in the issue mentioned above.
I have looked at the maven repository and things are strange there as well:
For https://mvnrepository.com/artifact/org.nd4j/nd4j-native-platform, the list of files under "View All" seems incomplete for the 1.0.0-beta2 version and the existing jar files under older versons also don't seem to contain any binaries so I am unsure as to where the binaries are supposed to be.
Thanks,
Jason
Do you have a specific OS you are trying? It should work out of the box if you just use platform. Platform includes numerous dependencies. I'm not sure what "incomplete" might be, but if you browse the real maven central (not this website, please do not use it):
https://repo1.maven.org/maven2/org/nd4j/nd4j-native/1.0.0-beta2/
You'll see jars for everything here. We have pretty good coverage publishing for every OS all the way to android and IOS.

Failure running WebSharper 4.0 tutorial

I am learning how to use WebSharper. Actually, I am failing to learn how to use WebSharper.
I wanted to learn how to build a simple SPA so I followed this tutorial from the WebSharper page. I am able to create the SPA with Visual Studio and Zafir (the codename for WebSharper 4.0 that is in beta). I followed every step in the tutorial. I have created a repo on github that is everything in the SPA.
The project won't build. More specifically, in the Client.fs file, I get compiler error
The value or constructor P is not found
in line 10 with the P, in line 11 the same error with the Div, and in line 18 I get the error
Namesapces cannot contain values. Consider using a module to hold your value declrations.
with Run(), yet when I try to move the [<SPAEntryPoint>] information into the module HelloWorld, I get the error
Lookup on object of indeterminate type based on information prior to this program point. A type annotation...
As a result, when I try to build this project, the build fails.
Why am I getting these errors? Is the tutorial out of date with the rest of WebSharper? What can I do to get a simple tutorial to work correctly?
EDIT: I get the same errors when I use WebSharper v3.x, too.
Although not mentioned in the tutorial, adding
open WebSharper.Html.Server
eliminated the compiler errors with P and Div, adding
open WebSharper.Html.Client
eliminated a new compiler error of OnClick, and moving the [<SPAEntryPoint>] into the module eliminated that compiler error and allowed me to build the project.
Thanks for the report! I have updated documentation, indeed that page was not updated since a while. I will review it more thoroughly.
The source of the documentations are found at https://github.com/intellifactory/websharper.docs, feel free to add issue there about further questions/problems or also you can submit a PR.

Error in xml file while creating a project in black berry

I just created a new project in the eclipse and as soon as it was created, it is created with the error below
InvalidRegex:
Pattern value '([a-zA-Z_]{1,63}[\s-a-zA-Z_0-9.]{0,63}[;]?)*' is not a valid
regular expression.
The reported error was: ''-' is an invalid character range.
Write '\-'.' at column '{2}'.
BlackBerry_App_Descriptor.xml Unknown XML Problem.
This is the problem which we will get when there is jre7 in our system which is not supported by eclipse
What is the problem here? How can i rectify this? thank you
Google shows this is related to Java 7. Check these two links:
http://supportforums.blackberry.com/t5/Java-Development/problem-with-the-BlackBerry-App-Descriptor-xml-in-Eclipse-Plug/td-p/959029 and http://cdrussell.blogspot.com/2011/09/blackberry-eclipse-error-invalid-regex.html
The second one tells:
Turns out this could be caused by having Java JRE 7 installed on your
machine. The BlackBerry plugin doesn't support this yet, Eclipse might
be trying to use that.
The fix? You simply have to edit the eclipse.ini that will live in the
same directory as your eclipse.exe that you use to start the IDE.
Closing Eclipse and making a backup of eclipse.ini before you do this
would be a good idea.
Find the line "openFile" and immediately after, add the following:
-vm C:/Program Files/Java/jre6/bin/javaw.exe [or wherever your jre6 directory might be]
Cross your fingers and restart Eclipse. Rebuild your projects.

Error in BlackBerry_App_Descriptor.xml

I've installed Blackberry Java plugin 1.3.0.
When I create a new project BlackBerry_App_Descriptor.xml shows error.
What is the problem? Is there any environment path problem? If yes, what should to set path?
InvalidRegex: Pattern value '([a-zA-Z_]{1,63}[\s-a-zA-Z_0-9.]{0,63}[;]?)*' is not a valid regular expression
you should of course follow the hint in the error and check that none of your values in your BlackBerry_App_Descriptor.xml will fail the regex.
However, there is a very strange case whereby you will see this error regardless of your values. In fact, creating a new project straight from Eclipse will still show the error.
Turns out this could be caused by having Java JRE 7 installed on your machine. The BlackBerry plugin doesn't support this yet, Eclipse might be trying to use that.
The fix? You simply have to edit the eclipse.ini that will live in the same directory as your eclipse.exe that you use to start the IDE. Closing Eclipse and making a backup of eclipse.ini before you do this would be a good idea.
Find the line "openFile" and immediately after, add the following:
-vm
C:/Program Files/Java/jre6/bin/javaw.exe [or wherever your jre6 directory might be]
Cross your fingers and restart Eclipse.
Rebuild your projects.

Resources