Thank you for your lending some input.

> 4r5 is a valid number in J. Would this explain the behaviour?
By "other", I was referring to the 'X' character class defined in the input 
mapping table. I believe your example never hits this column of the state table.

Perhaps it's clearer to just focus on the Q class. When lexing numbers and 
encountering a quote, the state table defines output code 4, so we emit a 
vector. In other words, taken in isolation, this state cell says that number 
tokens might contain quote characters, right?

If I am understanding dyadic ;: correctly, then the example J lexer never 
actually lets number tokens contain quote characters. So I am just curious why 
it chooses to emit a vector in the above case anyway.

On Sat, Oct 05, 2019 at 11:12:06PM -0700, 'robert therriault' via Programming 
wrote:
> 4r5 is a valid number in J. Would this explain the behaviour?
> 
> Cheers, bob
> 
> > On Oct 5, 2019, at 6:21 PM, ethiejiesa via Programming 
> > <[email protected]> wrote:
> > 
> >> What would it emit instead?
> > Words that just happen to contain spaces.
> > 
> > I just realized, however, that my original email example lets number words 
> > contain trailing spaces. So, I agree that the cell "0 5" in the state table 
> > needs to be what it is. However, if we're in state num and encounter a 
> > quote or "other" character, I still don't grok why ev (emit vector) is used 
> > instead of em (emit). Is there a case where we have a number token 
> > containing a quote character, or likewise for "other" characters?
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to