5

1

So - I'm starting to work on the code formatting for Macros / LUA posted in epicadvice.com questions. Does anyone have any idea where I can get a good list of keywords and good solid information about the language syntax for the WoW Macros and LUA?

Updated:

I'm not necessarily looking to learn the language, or how to program it (areas I already have experience with) - mainly I'm looking for good lists of keywords / commands for use in Macros.

I found a 'decent' LUA lexer out there already - so it is not as important. As an example of what I mean by a keyword list - this is what the LUA lexer I found listed:

and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while
flag
Since you're looking for info on how to code a lexer for epicadvice.com, and not looking to learn LUA or write AddOns, you may also want to edit this question's title, so that other people looking for LUA/AddOn help don't end up here. Eventually there may be many many Q's ans A's on this site related to AddOn/macro programming and you wouldn't want to confuse them. :) – Wikwocket Oct 10 at 15:18

3 Answers

4

The two best sites for information about LUA and Macros are these.

1) LUA-Users.org: Tutorials

2) WoWProgramming Docs

Those are general language references for the WoW API and LUA. It would be pretty annoying and hard to code up formatting for all API commands in general. Here's two more resources that I think directly answer what you were asking.

1) WoWWiki List of Slash Commans

2) WoWWiki Macro Conditionals

The first is a list of slash commands in WoW. These are the exhaustive list of the valid slash commands the in-game API recognizes.

The second is a list of all the conditions that go inside the [ ] boxes for relevant slash commands.

I believe that is what you asked about, if you want additional references I would suggest looking at the mod WoWLua and seeing the general way that it formats WoW code in game. It's very basic but provides good formatting. If you reverse engineer it's code prettifying routine, you can probably co-opt that here.

WoWLua Mod: http://www.wowinterface.com/downloads/info7366-WowLua.html

link|flag
Well - I'm working on writing a lexer from scratch - so i was thinking #anything or /anything becomes a 'command' and then [modifiers]something ; (right) – gnarf Oct 9 at 12:45
I've added additional information that I hope answers your question. If not, please let me know and I'll dig a little further. – Takkara Oct 9 at 13:39
Thanks much Takkara - Saved me some research time while I was learning these lexers. I think I got enough info - take a look at code formatting around here. – gnarf Oct 9 at 13:52
for the Lua at least, the extended BNF is available here: lua.org/manual/5.1/manual.html - this pretty much gives the exact syntax for it, which is typically designed to only need to be mildly rewritten for RegEx. [or rather, it's a regular language, so regex is usually perfect to parse it] – Baberth Feb 2 at 11:57
1

link text

Best site for finfo for macros, since Cogwheel told Blizzard to stuff themselves.

link|flag
1

Gnarf if you are just starting out my first piece of advice would be to pick up the book world of warcraft programming. This has the best reference/tutorial/examples I have seen so far. Another great source of information is from wowwiki. If you search for lua commands it has pages listing most of the method calls and their purposes. Along with this there are links to even more useful sights and tools.

link|flag
This is indeed a good link for beginners - but offers me no practical data I can use - I have updated the original question to reflect further what I was looking for. – gnarf Oct 9 at 12:28

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.