Talk:Formal AviSynth grammar
From Avisynth
Hi, just wondering what the exact connection with AviSynth is :) Wilbert 15:06, 4 May 2008 (PDT)
- It will be (hopefully, if I haven't made any errors - see my updated text) the documentation of the formal grammar used by the AviSynth language (ie the parser). This may not be of much interest to most end-users since it is developer-oriented, but it is useful as a documentation aid.
- For example, while making this I verified the following (i believe undocumented) behaviors:
- It is possible to declare a function inside a compound statement (ie inside a function and a try..catch block. But this function is global and not private, although nested; and it can be used as if were declared global. From the prespective of our documentation this is a bug.
- It is possible in the declaration of a function to have arguments such as: int, clip, "bool", "int f", etc.
- The first are implicitly converted to val type arguments with names int, clip, bool, etc. and can be used as normal (although their type is val and thus any type can be passed to the function call). This is probably a feature.
- However "int f" parses at the declaration while it shouldn't (ie whitespace is not handled correctly). And of course it can't be accessed at the body of the function.
- Therefore, I believe that it deserves a page somewhere in the AviSynth syntax documentation (probably at the Scripting reference section, where more advanced stuff goes).
- It will certainly need review by the core AviSynth developers before putting it at the main wiki space. There are some parts where I have some doubts (see the (* comments inside *) ). I will keep it in my user space until it gets "officially approved". Gzarkadas 06:50, 5 May 2008 (PDT)
Update: I think I have finished the grammar. I will leave it here as is for review and comments (if anyone has free time for mental exersices as I did) and keep going with the rest of reorganisation of Avisynth Syntax (cf. the first section of my SandBox) plus some new stuff in Scripting reference. Since it will take me some months to finish the later, there is plenty of time. Gzarkadas 13:34, 5 May 2008 (PDT)

