the last few days/weeks I wrote ANTLR4 grammar and used it in my Javascript-React project.
While using the javascript runtime ( see here ), my console (powershell) always gave me an error message when my grammar was false or something was missing.
Now I'm out of town for a few weeks and had to install ANTLR4 + runtime on my laptop ( scroll down to WINDOWS for the tutorial I used ). This CLASSPATH stuff didn't worked for me, so I ignored it and .bat script didn't worked for me either, like when I installed it for the first time.
My file structure looks like this:
When I go into my powershell and switch to the right folder and hit
.\antlr-4.11.1-complete.jar -Dlanguage=JavaScript .\FunktionLexer.g4
everything works fine and I have my token for the parser. This is probably exact the same installation I had before going out of town.
But when I use wrong grammar and hit the command just nothing happens. Like nothing, no output on my command line what could be wrong. I tryed to add parameter like -Xlog, which gives me a log until the grammar crashes, but it doesn't really tell me where it crashed.
Thanks in advance!
Given the grammar (without lexer rules):
grammar FunktionLexer;
parse
: .*? EOF
;
I can generate a lexer and parser just fine by running:
java -jar antlr-4.11.1-complete.jar -Dlanguage=JavaScript FunktionLexer.g4
You might want to edit your question and clearly indicate how someone can reproduce what you describe.
Related
I am trying to learn Scala, or at least the basics for now.
I went to the scala website to download it from there. I followed the steps and download Coursier and called cs setup and then cs install scala:3.1.1 and cs install scalac:3.1.1.
I started writing simple scripts without classes, like how you'd do in the interpreter. So I opened a text file and wrote print('x') and saved it to filename.scala, then I went to terminal and tried scala filename.scala; however, that gave me the error ("Illegal start of toplevel definition"). I changed the code inside the .scala file to a simple var x : Int 4, and I get a different error ("Error: No main methods detected in script Desktop/filename.scala").
When I open the scala terminal and use the :load option, everything works fine. After looking around SO for a good half an hour, none of the mentioned answers helped. I understand that scala is looking for a full program with objects and methods like java. But from what I read, it should be able to run scripts like the one I wrote by guessing its type. What's the problem? Is this a problem with scala 3 or my terminal? or am I doing something wrong?
Thanks in advance.
I have developed a problem, I cannot resolve.
I am running Net Bean 8.2 Build: 201609300101.
I am running it on a Windows 7 platform.
Yesterday Net Bean worked fine and would generate the jforms for me. Last night something happened and I can no-longer build, compile and run jforms classes.
I can generate and run simple Java programs. I wrote a simple program that just prints "Hello" and that worked.
When I generate a jform, everything looks good in the IDE but it will not build or run.
I get the following error:
c:users\Admin\Documents\Netbeans\KensPanel\nbproject\build-impl.xml:899 Must set src.dir.
None of the NetBeans examples work either and they did yesterday.
In reviewing the posts on the NetBeans forum concerning the problem, I found several that suggested looking in "nbproject directory for a project.properties file. in the file there should be a "build.dir = build" statement. It is there.
I have completely deleted the project and rebuilt the program and that did not work.
I uninstalled the NetBeans program, the JDK and the JRE programs and reinstalled them (JDK & JRE first) and that did not fix the problem.
I put a simple print statement "(System.out.println("Hello");" in the "Public Static void Main(String[] args)" function at the bottom of the KensPanel.java file and the program will compile and print out "Hello" but will not bring up the GUI.
I get the feeling the problem is somehow related to the "ANT" process but anything having anything to do with that is way over my head.
As I stated earlier, the program worked yesterday afternoon. Last night, the IDE decided that it did not want to play any more and I have not been able to find the problem. I am at a loss.
I am real new to the program and for that matter, Java in general. I really need help.
Ken
I think I found my own answer. At least, I got around the problem.
In the New Java application screen, I had left the "create Main Class" box checked. I found in the NetBeans tutorial, the tutorial stated that I needed to "un-check" the box. When I did that, at least my application works. I haven't tried the examples yet.
Moving on to the next learning task.
Ken
I have used Xdebug of Eclipse 3 months so far. And it runs really well.
However, I got a issue of Xdebug which is "DBGp Response Error: eval:=206 msg:error evaluating code" ( in Error Log).
After I investigate the error, I find that issue is:
206 - Error evaluating code (use from eval() (or perhaps property_get
for a full name get))"
This is reference from http://xdebug.org/docs-dbgp.php
I have taken 2 days for this issue, and nothing has changed.
Please help me solve this. Many thanks and strong appreciation for your help.
Try deleting your watches. You can read the story of how this worked for me in PHPStorm.
It is probably an eval that (your IDE) is doing wrong. Either the symbol does not exist, or the syntax is incorrect. I am not sure where your error_log comes from (do you mean xdebug.remote_log?), but that will also indicate what eval command was sent by the IDE. If you could amend your question with the exact log lines before and after your 206 error too, I can give a better clue. In general, this isn't much of an issue, as it's often not possible to eval specific code.
CentOS 7.7
PHP 7.2 and PHP 7.4
Apache and cli
Same symptoms " The strange in here is that it has run well, and suddenly can not debug with those things in error log" as #ndnguyen
Worked great. Then suddenly didn't work without explanation. I tried updating everything, several different config options, etc, etc.
Just that stupid little check box. FYI: The IDE is vscode.
so once again, I'm having a little problem I can't figure out myself. Meaning, I'm pretty sure I know what the problem is, I just can't fix it.
I'm developing in C++ using Netbeans 7.01 with CMake 2.8.6. However, when I'm trying to build a project, I get the following error from CMake:
CMake Error: The path to the source directory:
H:/Projects/Netbeans/CppApplication_1/CONF=Release
contains unsupported character '='.
Please use a different source directory name.
Please note, that "CONF=Release" isn't a folder. It seems to be a configuration flag set by Netbeans, as it changes when I'm trying a debug build. So, my guess here is, that theres a space missing, or something similar. Unfortunately, I can't figure out where to change that. There are no options in any related Netbeans window, I can't find anything related in the configuration files for netbeans itself or the project either.
Did anyone here have experienced the same problem and found a solution to it? I would be very glad to hear it. If there's any information missing, let me know, I will add them as fast as possible.
Edit:
Just noticed there is already version 7.1 of netbeans, nice to know. However, even with this version, the same problem occurs.
You must specify the command you ran to allow for the error to be identified. However, it looks like you missed the "source-path" parameter.
The cmake command ends with the path to source and should be something like:
cmake -D CONF=Release <path to source>
I'm kinda puzzled how does a unix path looks like. I have followed an example to write a simple fileuploader using GWT. But the guide was written with Windows in mind. Say if I have C drive. In windows I would told the program to save the files to C:\save_here\
But in unix, I'm using ubuntu, there are no C drives or other drives with a single letter representation. So I wonder what do I write instead? I'm getting error 500 all the time now. And I can't figure out how the path should be.
The guide I've been following is found here
EDIT
It was not some problem duo to the path. Still need help though with fixing this problem. I basically followed the steps in the url I posted on this question.
unix paths start at a common root , denoted / and separates directories with a /
e.g. /home/starcom might be your home directory. So create a new directory, mkdir /home/starcom/uploaded and use that as the path. Or for testing you could perhaps just use /tmp
You can get more info here
When you get a 500 return code, that means the server encountered an error. This means that you should see an error message from the server somewhere. If you're running from Eclipse, you'll see the error on the Console tab. If you're running Tomcat, look for those logs.
You want to find the error message, since it'll probably explain what went wrong.