[antlr-interest] ANTLR for Adobe Flash CS3? It is possible?

Dennis Benzinger Dennis.Benzinger at gmx.net
Sat Apr 4 13:11:18 PDT 2009


Hello Heritiana!

(Hope this is your first name :-)

Am 04.04.2009 20:16, Heritiana Ravaka RAMASIMPANIRY schrieb:
> Thanks for your answer.
> 
> I I did not understand the meaning of this framework.
> In fact, I want to use some sort of language recognition framework
> (grammar,scanner,parser) that can understand a script I would define myself
> inside a fila as input.
> 
> Like for examples: 
> 
> // will add a button type 1 labeled 'str'
> BUTTON1 | {str:string}
> 
> // will add a button type 2 labeled 'str'
> BUTTON2 | {str:string}
> 
> //Will show a message 'str'in a defined zone
> MESSAGE | {str:string}
> 
> //will loop the animation to the top
> LOOP
> 
> I've found a framework which can do this at flashlr
> (code.google.com/p/flashlr/) but it is not ready yet to be used.
> 
> Can it be used for this kind of work?
> [...]

As it is not ready yet it's hard to tell. Probably yes, but if your
script is as simple as the examples you gave you won't need a real
parser. Perhaps some regular expression or simple string splitting are
sufficient. Looking at your examples it seems like everything up to the
pipe symbol is a command and the parameters for this command appear
after the pipe and are surrounded by braces. So you could first split
the string at the pipe, get the command, remove the braces from the
second part and get the parameters.


HTH,
Dennis Benzinger


More information about the antlr-interest mailing list