I have a regular expression for a codeless language module that works in the
editor, but will not parse when BBEdit tries to load it. I need a fresh pair of
eyes.
Consider this file content (but not too long):
(1912) PLEASE (1913) NEXT
DO .2 <- :1~'#65280$#65280'
PLEASE RETRIEVE :2 + .3 + :1 + :3
DO RESUME #2
(1914) PLEASE RESUME #1$"'.1~.1'~#1"
(1913) PLEASE (1914) NEXT
"Functions" run from the initial label up to the parenthesis beginning the next
label (or end-of-file).
I'm writing the CLM using the regular-expression options. The following pattern
matches every function exactly when I use the find dialog in BBEdit:
(?P<function>(^\((?P<function_name>\d+)\))(?s:.+?(?=\r\(|\Z)))
This gets XML-ified for the plist as
<string>(?P<function>(^\((?P<function_name>\d+)\))(?s:.+?(?=\r\(|\Z)))</string>
(If your mail client broke that line, rest assured it's all one line.) I'd like
to use (?x:...) syntax and CDATA, but I'm cutting out extraneous issues.
The CLM loader rejects the function pattern:
6/1/14 ... The following problem(s) were encountered while loading the language
module at /Users/fritza/Dropbox/Application Support/BBEdit/Language
Modules/INTERCAL.plist:
6/1/14 ... The Function Pattern was invalid (missing ')' (application error
code: 12214)).
6/1/14 ... The reported problems will prevent the language module from loading.
plutil thinks the plist is OK. I've checked the plist for extraneous angle
brackets and ampersands. Using CDATA doesn't help.
I need a fresh set of eyes here. What am I missing?
-- F
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].