Sunday, October 21, 2012

ca65 Tokens revisited.

Quick note on ca65 tokens. The source file with the enumeration I posted here is pretty helpful, but I noticed that ca65 will actually recognize C style syntax boolean and/or ( && and || ) as a single token, which isn't obvious at all from that source listing. I checked the source and in scanner.c you can see what string data is actually matched to what. Note: &, &&, |, || are different tokens, and && is actually the exact same thing as .and, likewise || is the same as .or (they match the exact same internal token value). As well I found it interesting that '==' is not a token - it will be scanned as two equal tokens, so macro code must be exended to match only '=='.

No comments:

Post a Comment