Notany() issue


#1

notany() is throwing error

error 4054: Statement notany is not currently supported in CODE_CONTEXT match

Please advise.


#2

same code when replaced with notany() with any() compiles and behaves as (with any) expected.

is notany deprecated?


#3

It is compiling with version 9.0 and functioning as expected.

Failing in 10.0 with the below error

error 4054: Statement notany is not currently supported in CODE_CONTEXT match


#4

is notany deprecated?

notany should still work. See the reference

Could you provide a code sample of how you’re trying to use notany?


#5

I see notany() compiles. But context(1) is the trouble.
I need context(1), it is also mentioned in the reference. It is possible to use context(1) with notany.
If I do not use the context(1) then, the character not of vow will be deleted.

Please review the below code.

c *** Tamil99 keymap file for use with e-Kalappai Keyman in Windows
c *** This keymap is a modification from the original file written for e-Kalappai for Windows.
c *** References for tamil99 layout and keystroke rules:
c *** layout:                 http://www.tamilvu.org/Tamilnet99/annex1.htm
c *** keystroke rules:    http://www.tamilvu.org/Tamilnet99/annex2.htm

store(&VERSION) '10.0'
store(&Name) "தமிழ்99 | Tamil99"
store(&COPYRIGHT) '© thamizha.com'
store(&BITMAP) 'eKwTamil99Uni.bmp'
c store(&Hotkey) ""
store(&MESSAGE) 'Tamil99 - Contributed by Umar(csd_one@yahoo.com), Mugunth (mugunth@gmail.com) and K. Sethu (skhome@gmail.com) ; March-October 2008'
c store(&language) "Tamil"
c store(&WINDOWSLANGUAGES) 'x0449'
c store(&LANGUAGE) 'x0449'
c store(&ETHNOLOGUECODE) 'tam'
store(&VISUALKEYBOARD) 'eKwTamil99Uni.kvk'
store(&KMW_HELPTEXT) 'Tamil 99 keyboard layout'
store(&KEYBOARDVERSION) '2.0'
store(&TARGETS) 'any'

begin Unicode > use(Main)

group( Main ) using keys

c ============================================
c Assignments for bases of uyir, akarameis, grnatha akarmeis and aytham
c - as per layout and Rule 1

store( uyirE )            "aqswdegtrcxz"          
store( uyirE1 )           "qswdegtrcxz"           
store( akara_meyE )     "hb[]opl;jk'mnv/yui"       

store( uyirT )             U+0B85 U+0B86 U+0B87 U+0B88 U+0B89 U+0B8A \
                                 U+0B8E U+0B8F U+0B90 U+0B92 U+0B93 U+0B94

store( akara_meyT )   U+0B95 U+0B99 U+0B9A U+0B9E U+0B9F U+0BA3 \
                                 U+0BA4 U+0BA8 U+0BAA U+0BAE U+0BAF U+0BB0 \
                                 U+0BB2 U+0BB5 U+0BB4 U+0BB3 U+0BB1 U+0BA9

store( vow )               U+0BBE U+0BBF U+0BC0 U+0BC1 U+0BC2 U+0BC6 \
                                 U+0BC7 U+0BC8 U+0BCA U+0BCB U+0BCC

store(sri)                   U+0BB8 U+0BCD U+0BB0 U+0BC0

store(ksha)                U+0B95 U+0BCD U+0BB7

store(grandhaE)        "QWER"

store(grandhaT)         U+0BB8 U+0BB7 U+0B9C U+0BB9 


 + "F" > U+0B83
+ any( uyirE ) > index( uyirT, 1 )
+ any( akara_meyE ) > index( akara_meyT, 1 )
+ any( grandhaE ) > index( grandhaT, 1 )
notany(vow) U+0B95 U+0BCD + any( grandhaE ) > context(1) U+0B96 U+0BCC U+0BCE index( grandhaT, 4 )

c ஸ்ரீ மற்றும் க்ஷ (Sri and ksha)
 + "T" > outs(sri)
 + "Y" > outs(ksha)

#6

I just tested this with version 9.0.526.0 and found the same compile error reported:

tamiltest.kmn: Error: line 13  error 4054: Statement notany is not currently supported in CODE_CONTEXT match

This error is reported only for KeymanWeb; it works correctly with Keyman Desktop.

How were you getting it to work with version 9?

(Note, if you surround code examples with backquote “`” then it’s a lot easier to read in the forum. Use 3 backquotes in a row to start and finish multi-line code examples).


#7

This was sample code. I generated to report the trouble.

In my keyboard, notany() with context(1) compiles in version 9.0


#8

Can you provide a sample that compiles here so we can test it?


#9

I see what happened. When I changed the version 9.0, I had errors with NCAPS and web. So, I had turned off compilation for web. Sorry. I tried to re-compile with version 9.0. I realized what I had done.

If I keep the notany and context(1), it doesn’t compile with web.

I need this combination to work in all platform.

How do we make it work?

Or is there a work around?


#10

Glad you were able to figure it out – it was puzzling me how you got it to work!

Okay, so for version 10, it looks like this feature won’t make the cut, because it’s non-trivial to implement. I’ve listed this as a feature request at https://github.com/keymanapp/keyman/issues/917

A workaround is also hard. I’m not currently seeing any workarounds that are going to be feasible for KeymanWeb 10…


#11

I suppose it will at least be available for version 11.0

I request you please consider this as bug and resolve it as soon as possible.


#12

Also question on notany(vow)

When the sequence is not of ‘vow’ list and U+0B95 U+0BCD is working fine.

BUT.

when the U+0B95 U+0BCD is at the beginning of the document or even debug window, this sequence is failing. Beginning of document is not considered as not of vow character list.

Please advise.

DIFFERENT ISSUE:

(Moderator moved to separate topic)


#13

Can you pickup the separate issue in a separate topic? Otherwise we’ll get things confused.

In order to match start of document, you explicitly need to test nul, e.g.

nul U+0B95 U+0BCD + 'x' > ...