Hi,
considering that the tokens are processed by the parser in the order
they are listed in the grammar, and looking at the generated code,
does it make sense to list the alternatives in the order of higher to
lower frequency ?
For example, considering the following rule :
dataType
: Any
| Blob
| Boolean
| Byte
| Char
| DateTime
| Date
| Dec
| Double
| Int
| LongLong
| Long
| Real
| String
| Time
| UInt
| ULong ;
I have put the different types in the order they are listed in the
language help file. But while knowing that I have far more longs,
integers and strings than bytes or dates (and theoretically no Reals
for example), should I move the most used types at the beginning ? I
did not found an answer in the FAQ yet.
Regards.
--
Sébastien Kirche
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.