Oh, about the guy I thought I got to do the student competition: turns out ambiguity was just being annoying... he said something along the lines of "I think I'll pass" which I interpreted as "passing" the competition (i.e. doing well), when he actually meant he'll pass up the opportunity.
@Feeds What?! A class? (At first, I thought that was Uriel)
I am trying to parse APL expressions using ANTLR, It is sort of APL source code parser. It parse normal characters but fails to parse special symbols(like '←')
expression = N←0
Lexer
/* Lexer Tokens. */
NUMBER:
(DIGIT)+ ( '.' (DIGIT)+ )?;
ASSIGN:
'←'
;
DIGIT :
[0-9]
;
...
I am trying to parse APL expressions using ANTLR, It is sort of APL source code parser. It parse normal characters but fails to parse special symbols(like '←')
expression = N←0
Grammar:
grammar APL;
translationunit
:
aplDocument? EOF
;
aplDocument:
NUMBER+
;
/* Lexer Tokens. ...
@J.Sallé ⊂{t/⍵⊣⍵{t[m]←('01!'⍳⍵)⊃0 1,e,⍨~e←t[m←⍺|i⊢←i+¯1 1 0⊃⍨'<>'⍳⍵]}¨⍺⊣i←⊃t←⍬⍳⍺}¨1+⍳∘≢ needs each each input to be a character vector (not scalar) and keep boxing off, as it returns a nested result which just prints with additional spacing. To get a simple vector result, stick a ∊ on the very left.