[Jprogramming] State machine add multiple words action

2023-01-12 Thread Pawel Jakubas
Dear J enthusiasts, I try to learn state machine parsing and try to use 4 or 5 action code in practice. Here is an example to be concrete. 1. So we have the file: $ cat test1.txt 1000ddd 2000 ab3000 1xxx 11 22 2. now I want to ideally have three boxes, one containing 1000, 2000,

Re: [Jprogramming] State machine add multiple words action

2023-01-12 Thread Raul Miller
The fastest to find example here would be parsing of numbers in the original dictionary parsing example: https://www.jsoftware.com/help/dictionary/d332.htm Here, when parsing '1 2 3', each time a space is encountered, the word is "terminated" and the subsequent 4 actions extend the word. (And in

[Jprogramming] State machine add multiple words action

2023-01-12 Thread Pawel Jakubas
Thanks Raul for the solution! Wow! Could you please share some illustrative example of action code 4 and 5, especially useful in contrast to one word actions? Kindest regards, Pawel -- For information about J forums see

Re: [Jprogramming] Fwd: A big beautiful beta regex bomb

2023-01-12 Thread bill lam
I checked there was a recent update to the base library to fix a long outstanding bug that utf8 defaults to ON but is not functioning. The libjpcre binary was supposedly built with utf8 support but not so. Therefore you didn't see the error. A workaround is to execute rxutf 0 to turn off the

Re: [Jprogramming] Fwd: A big beautiful beta regex bomb

2023-01-12 Thread bill lam
May I know which platform you are referring to? On Fri, 13 Jan 2023 at 1:28 AM John Baker wrote: > Sorry for the duplication. I wasn't sure the message to the beta forum > went. > > There are some changes in how regex'es work in the last J9.04 beta > that will probably zing many. > > John Baker

Re: [Jprogramming] State machine add multiple words action

2023-01-12 Thread Raul Miller
Action codes 4 and 5 aren't specifically what I think you would want in this context. What they allow you to do is tentatively emit a token and then return to that state to potentially extend the length of that token. In other words, action codes 4 (and 5) simply give you a longer word which

[Jprogramming] Fwd: A big beautiful beta regex bomb

2023-01-12 Thread John Baker
Sorry for the duplication. I wasn't sure the message to the beta forum went. There are some changes in how regex'es work in the last J9.04 beta that will probably zing many. John Baker -- Forwarded message - From: John Baker Date: Thu, Jan 12, 2023 at 10:08 AM Subject: A big

Re: [Jprogramming] 904-beta-j

2023-01-12 Thread bill lam
904-beta-j is available for android On Sun, Jan 8, 2023 at 1:42 AM Eric Iverson wrote: > 904-beta-j is available for windows/linux/macos/rpi. > > If you already run J904-beta, then upgrade is easy: >load'pacman' >'upgrade'jpkg'jengine' > > If you have not yet installed J904-beta, there

Re: [Jprogramming] Fwd: A big beautiful beta regex bomb

2023-01-12 Thread John Baker
Sorry, It’s win 64 intel running on win10. > On Jan 12, 2023, at 18:58, bill lam wrote: > > I checked there was a recent update to the base library to fix a long > outstanding bug that utf8 defaults to ON but is not functioning. > The libjpcre binary was supposedly built with utf8 support

Re: [Jprogramming] Fwd: A big beautiful beta regex bomb

2023-01-12 Thread John Baker
I will give this a try. Thanks > On Jan 12, 2023, at 18:58, bill lam wrote: > > I checked there was a recent update to the base library to fix a long > outstanding bug that utf8 defaults to ON but is not functioning. > The libjpcre binary was supposedly built with utf8 support but not so. >