<p></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rdipardo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rdipardo">@rdipardo</a></p>
<blockquote>
<p dir="auto">Well, being easy but inefficient allowed Python an PHP to become the institutions they are today.<br>
Scintilla has followed that tradition to great success.</p>
</blockquote>
<p dir="auto">I'm not sure I understand how Scintilla follows the "inefficient but easy" tradition, I would have said that writing everything in C++ follows the "difficult but efficient" tradition <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p>
<p dir="auto">Recognising that words (identifiers/names/whatever your language calls them) can represent several different syntactic constructs, and these tend to change as the language evolves, Scintilla provides the facility for the application (thats Geany) to provide several lists of words and facilities for the lexer to efficiently recognise if/which list a word is in, and members of those lists can be styled differently.  Most lexers happily use this facility, but how many lists they support varies from lexer to lexer.  This facility is even (mis)used by Geany to supply lists of typenames detected by the ctags parsers/tagfiles dynamically at runtime for some languages (eg C/C++).<sup><a href="#user-content-fn-1-42a1a459b5f2ad120e35d30b39013be6" id="user-content-fnref-1-42a1a459b5f2ad120e35d30b39013be6" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup></p>
<p dir="auto">The prolog lexer supports these lists:</p>
<pre><code>static const char *const visualPrologWordLists[] = {
    "Major keywords (class, predicates, ...)",
    "Minor keywords (if, then, try, ...)",
    "Directive keywords without the '#' (include, requires, ...)",
    "Documentation keywords without the '@' (short, detail, ...)",
    0,
};
</code></pre>
<p dir="auto">I think <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/techee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/techee">@techee</a> only provided for two in the filetype file.  Maybe they can all be allowed since there is no ctags parser so none need to be reserved for that.  Then the lists might be better arranged.</p>
<section data-footnotes="" class="footnotes"><h2 id="footnote-label" class="sr-only">Footnotes</h2>
<ol dir="auto">
<li id="user-content-fn-1-42a1a459b5f2ad120e35d30b39013be6">
<p dir="auto">lexers run each keystroke so need to be fast and do little and ignore incomplete syntax, just identify the syntactic entities. Parsers need to understand the language to read declarations so they run mostly after a delay on the basis that if the meatware has stopped typing they will likely be thinking for a while, and so a parse delay is less likely to be noticed, and the code is also more likely to be legal enough to parse. <a href="#user-content-fnref-1-42a1a459b5f2ad120e35d30b39013be6" data-footnote-backref="" class="data-footnote-backref" aria-label="Back to content"><g-emoji class="g-emoji" alias="leftwards_arrow_with_hook" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/21a9.png">↩</g-emoji></a></p>
</li>
</ol>
</section>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3171#issuecomment-1109249800">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ3Z5RFFMSCIKRGYY73VG5MADANCNFSM5TSVVLDQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJYAJTVSYIXZXFLLCOLVG5MADA5CNFSM5TSVVLD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIIO46CA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/pull/3171/c1109249800</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3171#issuecomment-1109249800",
"url": "https://github.com/geany/geany/pull/3171#issuecomment-1109249800",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>