Previously LLD linkerscript tokenizer worked with pre-created
list of tokens. That was not optimal, because sometimes tokens values are context dependent.
Like we were not able to parse "5*5" because in previous approach was impossible
to know if that are 3 tokens (math expression) or a single token representing file name mask.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I cannot say whether this is a good change or not because this patch does not do anything that is intended to do; it just changed the internal data representation. Can you add enough code to demonstrate that the new internal representation works well for what you want to do?
Comment Actions
- Added code that shows we are able to parse expressions like "1+2*4/5" and do not fail.
- Added comments and testcases for above.
Comment Actions
I've been thinking about this change, and I'm not in favor of the way this handles input files. Handling input files like this is tricky, and that's why I chose to tokenize all input ahead of time. I want to keep its simplicity. I have a different idea to do this. I'll sent you a patch.