Tim Gray
unread,May 14, 2022, 4:36:49 PM5/14/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to BBEdit Talk
I'm trying to write a codeless language module for an obscure 'language' - keystroke program listings for an HP42S calculator (or the Free42 program as the case may be). I think I've got all the keywords and special characters figured out but am struggling with two things. First, here's a sample program listing:
00 { 37-Byte Prgm }
01▸LBL "FAC"
02 X≠0?
03 GTO 00
04 SIGN
05 RTN
06▸LBL 00
07 R↑
08 LSTO "T"
09 R↓
10 LSTO "N"
11 1
12 -
13 XEQ "FAC"
14 RCL "N"
15 ×
16 RCL "T"
17 R↓
18 END
I'd like to have the 'LBL' lines show up in the function popup with the correct label ("FAC" or "00"). Code folding for each section would be nice, but not necessary. I'm not sure the best way to implement this - I tried "Prefix for Functions" but I'm assuming I need "Function Pattern" instead.
My second question pertains to the line numbers. The line numbers are often part of a listing, but are not actually part of the program. I'd like some way to highlight those if possible. Is that doable in a CLM? The regex is easy: '^\d+( |▸)' but I don't know if there is anyway to implement it...
Thanks,
Tim