Skip to content

Commit

Permalink
Update Alan LangDef: v2.0.0
Browse files Browse the repository at this point in the history
This commit fixes some keywords issues and improves the syntax:
- kwd-ID 1: Add missing Keywords: `indirectly`, `meta`, `transitively`.
- kwd-ID 2: Add missing Prefefined Classes: `literal`, `string`.
- Add new keywords group (ID 3) and move `hero` into it (from kwd-ID 2).
For more details on these changes, see discussion with Alan develepor Thomas
Nilefalk (@thoni56) at:
    alan-if/alan-docs#15
    alan-if/alan-docs#17
  • Loading branch information
tajmone committed Sep 11, 2018
1 parent b940cea commit 5e4cf5d
Showing 1 changed file with 46 additions and 15 deletions.
61 changes: 46 additions & 15 deletions langDefs/alan.lang
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--[[ "alan.lang" v1.0.2 (2018/06/26) | Alan 3.0beta5 | Highlight v3.43 | Lua 5.3
--[[ "alan.lang" v2.0.0 (2018/09/11) | Alan 3.0beta6 | Highlight v3.44 | Lua 5.3
********************************************************************************
* *
* ALAN IF Syntax Definition *
Expand Down Expand Up @@ -130,36 +130,53 @@ Keywords = {
--------------------------------------------------------------------------------
{ Id = 1,
List = {
-- Keywords (121):
-- Keywords (124):
"add", "after", "an", "and", "are", "article", "at", "attributes",
"before", "between", "by", "can", "cancel", "character", "characters",
"check", "container", "contains", "count", "current", "decrease",
"definite", "depend", "depending", "describe", "description", "directly",
"do", "does", "each", "else", "elsif", "empty", "end", "entered",
"event", "every", "exclude", "exit", "extract", "first", "for", "form",
"from", "has", "header", "here", "if", "import", "in", "include",
"increase", "indefinite", "initialize", "into", "is", "isa", "it",
"last", "limits", "list", "locate", "look", "make", "max", "mentioned",
"message", "min", "name", "near", "nearby", "negative", "no", "not",
"of", "off", "on", "only", "opaque", "option", "options", "or", "play",
"prompt", "pronoun", "quit", "random", "restart", "restore", "save",
"say", "schedule", "score", "script", "set", "show", "start", "step",
"stop", "strip", "style", "sum", "synonyms", "syntax", "system",
"taking", "the", "then", "this", "to", "transcript", "until", "use",
"verb", "visits", "wait", "when", "where", "with", "word", "words",
"increase", "indefinite", "indirectly", "initialize", "into", "is",
"isa", "it", "last", "limits", "list", "locate", "look", "make", "max",
"mentioned", "message", "meta", "min", "name", "near", "nearby",
"negative", "no", "not", "of", "off", "on", "only", "opaque", "option",
"options", "or", "play", "prompt", "pronoun", "quit", "random",
"restart", "restore", "save", "say", "schedule", "score", "script",
"set", "show", "start", "step", "stop", "strip", "style", "sum",
"synonyms", "syntax", "system", "taking", "the", "then", "this", "to",
"transcript", "transitively", "until", "use", "verb", "visits", "wait",
"when", "where", "with", "word", "words",
-- Treat as keywords:
"=>", --> Shorthand for 'THEN'.
".", ",", ":" --> These are never used as operators.
}
},
--------------------------------------------------------------------------------
-- Predefined Alan Classes and Special Entities
-- Predefined Alan Classes
--------------------------------------------------------------------------------
-- These are the seven predefined classes of the Alan language.
--
-- NOTE: Usually there is no need to syntax-highlight the predefined classes or
-- the 'hero' instance (next keywords group) as there isn't anything
-- special about them beside being hard-coded into the language.
-- You can always style this group as normal text if you wish; I've
-- created a dedicated keywords group for them in order to allow styling
-- them if needed (for example, in documentation or tutorials it might be
-- desirable to do so).
{ Id = 2,
List = {
-- Built-in usable classes:
"actor", "entity", "location", "object", "thing",
-- Special entity for protagonist:
"actor", "entity", "literal", "location", "object", "string", "thing",
}
},
--------------------------------------------------------------------------------
-- Predefined Instances
--------------------------------------------------------------------------------
-- The 'hero' is a special predefined actor instance, used for the protagonist.
-- (See NOTE above!)
{ Id = 3,
List = {
"hero"
}
}
Expand Down Expand Up @@ -196,6 +213,20 @@ end
This syntax definition abides to Semantic Versioning 2.0.0:
http://semver.org
--------------------------------------------------------------------------------
v2.0.0 (2018/09/11) | Alan 3.0beta6 | Highlight v3.44
- BUG FIXES:
- Add missing keywords "meta", "indirectly" and "transitively".
- Add missing "literal" and "string" to the Predefined Alan classes.
For more details, see discussion with Alan develepor Thomas Nilefalk at:
https://github.com/alan-if/alan-docs/issues/15
https://github.com/alan-if/alan-docs/issues/17
- MAJOR CHANGES:
- Add new Keywords group and move "hero" there. This new group is for
"predefined instances", but its sole member is "hero", the predefined
actor instance representing the player. In some contexts, like tutorials
and documentation, it might be desirable to be able to syntax highlight
this special instance; in all other cases it can just be styled as
normal text (or non-styled) to visually hide it.
v1.0.2 (2018/06/26) | Alan 3.0beta5 | Highlight v3.43)
- BUG FIXES:
- Now Quoted IDs are passed through as STANDARD text. Before, if Quoted IDs
Expand Down

0 comments on commit 5e4cf5d

Please sign in to comment.