|
This article contains instructions on how to enable LassoScript syntax coloring in BBEdit 8.5.x and how to use AppleScript to switch language modes between LassoScript, HTML and JavaScript.
This codeless language module is designed to work with both the LassoScript <?lassoscript ?> and square-bracket [] syntaxes for Lasso Professional 8.5.x.
Filenames must end with ".lasso", ".las" or ".inc". You can modify the file "LassoScript.plist" to include other file suffixes.
The BBLMKeywordList is current as of Lasso Professional 8.5.5. To update the BBLMKeywordList, edit "LassoScript.plist" as specified in this message on LassoTalk: Subject: List of all LDML tags and keywords.
I modified the SQL statement from the above message as shown below.
To update the BBLMKeywordList
Step 1: Export tags, parameter names and parameter values
Begin by going to the LassoAdmin database browser, under the SQL tab:
http://localhost/DatabaseBrowser.0.LassoApp?tab1=sql
Use the following search parameters:
Expand SQL Statement options
Datasource: Lasso Internal
Host: Internal
Database: LDML8_Reference
Table: Tags
Expand Format options
Format: Tab Delimited
Field Names: No
Line Endings: UNIX/Mac OS X
Expand Options options
Show Fields:
Max Records: All Records
Max Field Lines:
Submit on Return: No
SQL Statement field:
SELECT tag_name FROM tags
UNION
SELECT DISTINCT param_name FROM parameters WHERE param_name LIKE "-%"
UNION
SELECT DISTINCT param_value FROM parameters WHERE param_value LIKE "-%"
ORDER BY tag_name;
Click Issue SQL Statement button.
Click Export Results button.
Step 2: Clean up export in BBEdit
Manually remove any symbols and other Types from the records (! Not Logical ... -> Member).
After you have done that, you can either use the following process manually, or you can use the AppleScript 'LDML_Prep.scpt' which is included in the .zip download. LDML_Prep.scpt executes the following steps in order.
Strip ' ... ' (spaces before and after) for matching container tags, then a stray '...' (no spaces), then account for parameter values that are comma-separated, then strip square brackets, then format for the plist.
Step 3: Modify plist
Paste results into my plist at the top of the BBLMKeywordList, select the array of keywords, and use BBEdit's Text > Process Duplicate Lines command to remove duplicate keywords.
Complete information on writing Codeless Language Modules can be found in Appendix D of the BBEdit manual.
|