Thanks again. Is anything else needed available in order to understand
the reference manual? e.g. I found out that ::= means is defined as (I
assume backwards) but much of the following is beyond me
prefixexp ::= var | functioncall | ‘(’ exp ‘)’
That is the formal grammar, which a beginner like you need not worry about. The grammar is intended more for experts.
In general, the reference manual is designed to be a concise definition of the language and assumes a certain level of programming knowledge, including some familiarity with Lua itself. It is not a good place for a beginner to learn from.
I recommend obtaining the Programming in Lua book; it is written by the Lua team and is much more user- and beginner-friendly, with longer discussions of the topics and many examples. The first edition of the book is available on
lua.org, but was written for Lua 5.0. Lua has undergone several major revisions and changes since then, so some of the material in that version is outdated. The fourth edition of Programming in Lua covers Lua 5.3 (the latest release of Lua) and is available on Amazon and possibly other places. It is well worth the cost, especially if you are trying to learn.