My study of Lua continues, and I've learned a couple of things:

1) Multiline strings can be delimited by double-brackets ([[
        like
        this
]]).

2) In order to avoid colliding with multiline strings and block comments within block comments, block comments can have zero or more equals signs between the double brackets, to identify pairs:
--[===[
        This is the outer comment
        --[[
                This is the inner comment
        --]]
        And
        --[====[
                Here is another inner comment
        --]====]
        So there.
--]===]

3. Also, I'm not sure I published my solution to the indented-function problem I'd mentioned before (with thanks to Jim Correia).

The revised codeless language model follows this message.

        — F

 --
Fritz Anderson -- http://www.manoverboard.org/
Consulting Programmer -- http://resume.manoverboard.org/
Step into Xcode: Why wait for Christmas? -- http://six.manoverboard.org/

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
  <dict>
    <key>BBEditDocumentType</key>
    <string>CodelessLanguageModule</string>
    <key>BBLMColorsSyntax</key>
    <true />
    <key>BBLMIsCaseSensitive</key>
    <true />
    <key>BBLMKeywordList</key>
    <array>
                <string>break</string>
                <string>do</string>
                <string>else</string>
                <string>for</string>
                <string>if</string>
                <string>elseif</string>
                <string>return</string>
                <string>then</string>
                <string>repeat</string>
                <string>while</string>
                <string>until</string>
                <string>end</string>
                <string>function</string>
                <string>local</string>
                <string>in</string>
                <string>nil</string>
                <string>and</string>
                <string>or</string>
                <string>ipairs</string>
                <string>pairs</string>
        </array>
    <key>BBLMLanguageCode</key>
    <string>Lua0</string>
    <key>BBLMLanguageDisplayName</key>
    <string>Lua</string>
    <key>BBLMScansFunctions</key>
    <true />
    <key>BBLMSuffixMap</key>
    <array>
      <dict>
        <key>BBLMLanguageSuffix</key>
        <string>.lua</string>
        <key>BBLMIsSourceKind</key>
        <true />
      </dict>
    </array>
    <key>Language Features</key>
    <dict>
      <key>Identifier and Keyword Character Class</key>
      <string>0-9A-Za-z_</string>
      <key>Comment Pattern</key>
<string>(-{2,}[^\[].*)|((?s)--\[(?P&lt;eqs&gt;=*)\[.*?\](?P=eqs) \])</string>
      <key>String Pattern</key>
<string>((?P&lt;open&gt;"|')(\\(?P=open)|.)*?(?P=open))|((?s)(? &lt;!-)\[\[.*?\]\])</string>
      <key>Function Pattern</key>
<string>(?s)^(?P&lt;leading_indent&gt;[ \t]*)function\s+(? P&lt;function_name&gt;[A-Za-z_:.]+).+?\r(?P=leading_indent)end\b</ string>
    </dict>
  </dict>
</plist>



--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to