grun Hello r -tokens HelloWorld.txt
X:\Data\projects\Antlr\Book\Tests\HelloWorld>java org.antlr.v4.gui.TestRig Hello r -tokenshello world^ZTerminate batch job (Y/N)? y
- Windows 10, 64-bit, latest preview
- Java 8.0.1310
- Antlr4.7
grun Hello r -tokens HelloWorld.txtHowever, CTRL+Z is not being recognized as an EOF:X:\Data\projects\Antlr\Book\Tests\HelloWorld>java org.antlr.v4.gui.TestRig Hello r -tokenshello world^ZTerminate batch job (Y/N)? yThe Terminate command is due to the fact that I pressed CTRL+C when the CTRL+Z failed.
Following the example in the book is not doable in my current environment. Why? Not sure, but that is my research to do.
When I searched the forum, I did not see a mention of this particular issue. My post is more for future searchers that may encounter the same issue and also to see if someone has seen it. If not, I will dig and see if I can track it down.
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Following the example in the book is not doable in my current environment. Why? Not sure, but that is my research to do.When I searched the forum, I did not see a mention of this particular issue. My post is more for future searchers that may encounter the same issue and also to see if someone has seen it. If not, I will dig and see if I can track it down.
Thanks Norman, no apologies needed. Shots in the dark on something weird like this.
That is not it. My shortcuts are enabled and CTRL+Z works for copy con. I think it may be a Java issue but I haven’t had time to code up tests on it yet.
This is my main dev machine as well so god knows what all has been done to it over the years.
Thanks,
Alan Churchill
From: antlr-di...@googlegroups.com [mailto:antlr-di...@googlegroups.com] On Behalf Of Norman Dunbar
Sent: Tuesday, June 27, 2017 1:13 PM
To: antlr-di...@googlegroups.com
Subject: Re: [antlr-discussion] CTRL+Z not working in Windows 10
Maybe the ctrl shortcuts have been, or, are disabled in windows 10?
--
For me on Windows 10, Ctrl+Z works as expected. You should not have to enable any shortcut key to make it work. Are you using something other than cmd.exe as your shell?C:\try\antlr4>type Hello.g4
// Define a grammar called Hello
grammar Hello;
r : 'hello' ID ; // match keyword hello followed by an identifier
ID : [a-z]+ ; // match lower-case identifiers
WS : [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines
C:\try\antlr4>antlr4 Hello.g4C:\try\antlr4>javac Hello*.javaC:\try\antlr4>grun Hello r -treeC:\try\antlr4>java org.antlr.v4.gui.TestRig Hello r -tree
hello parrt
^Z
(r hello parrt)C:\try\antlr4>
Nah, I have tried numerous ways of tackling it. Enter is standard for copy con so I did that out of the gate.
I have tried cmd as well as the VS developer console app, both to no avail.
However, I just found out what is causing it. A new ‘feature’ in the cmd.exe (thank you Redmond). If you open a cmd window, left-click on the upper-left, select Properties. There is a new checkbox called:
Use legacy console.
Check that and then relaunch cmd. It then works. Not sure when it was added or what it does but it fixed the CTRL+Z.
I am going to document it in my blog in case it trips someone else up.
Thanks,
Alan Churchill
From: antlr-di...@googlegroups.com [mailto:antlr-di...@googlegroups.com] On Behalf Of Burt_...@hotmail.com
Sent: Wednesday, June 28, 2017 11:29 AM
To: antlr-discussion <antlr-di...@googlegroups.com>
Subject: Re: [antlr-discussion] CTRL+Z not working in Windows 10
Note: After Ctrl+Z I had to press ENTER! Could that be it?
--
That’s odd, it works fine for me on the new console subsystem under Windows 10.0.15063 (Insider’s slow ring). Perhaps you’ve gotten caught-up the unintentional release mentioned here: https://blogs.windows.com/windowsexperience/2017/06/01/note-unintentional-release-builds-today/#TfW4qs75SfhkPpfQ.97 While I think build 16226 was intended as a fix, and I don’t see any specific mention of Ctrl-Z problems, you may still be able to roll-back the latest update installed.
The new features you mention are part of the “console subsystem”, and independent of which shell you are using. However cmder comes with its own console emulator which might not suffer the same problem. A lot of people swear by it.
P.S. In the future, I would recommend against the Windows Insider “fast ring” previews on your main development machine. Personally I’ve never had a problem with “slow ring” or “insider preview” releases making my system unstable, but sometimes it depends on how mainstream your hardware is. The combinatorial explosion of testing across so many combinations of hardware and software versions is impossible to cover completely during short test cycles the fast ring necessitates.
--
You received this message because you are subscribed to a topic in the Google Groups "antlr-discussion" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/antlr-discussion/itEwG7MjNFo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
antlr-discussi...@googlegroups.com.