[metaas-dev] No viable alternative error
Martin Schnabel
mb0 at mb0.org
Wed Mar 7 03:48:16 UTC 2007
David Holroyd schrieb:
> On Mon, Feb 19, 2007 at 04:35:31PM +0000, David Holroyd wrote:
>
>> Maybe there's a way to get ICU to generate unicode ranges for each...
>> Poking around in the JavaDoc, it seems to define some promising looking
>> constants, at least:
>>
>
> I hacked up some code which created the definitions that follow.
>
> Adding these to the AS3 grammar brings a noticeable slowdown to the unit
> tests, probably due to the fact that metaas is constantly creating
> parser and lexer instances on the fly, and lexer initialisation is now
> vastly more expensive. Adding these rules makes the generated .java
> file grow by almost 5000 lines. :(
>
> I'll have a play, and see if the performance degradation is actually
> worth doing something about at this point.
>
hi david,
wow thats hardcore.
since in most cases no special chars are needed and they would only
change the lexer why not use a lexer factory and support customized
lexer that support different kinds of languages. so there is one lexer
for greek one for latin languages. another for korean etc.
just an idea. not a good one but... better then handwriting a custom lexer.
or just exclude kanjis and other pictogram chars like that. they have
quite a big range.
it seams that in as2 no unicode is allowed in identifiers. however mtasc
does not support them so i dont need to implement it in asdt.
would be interesting which range is actually supported by the flex sdk,
or did you found a better specification?
best regards
martin
More information about the metaas-dev
mailing list