summaryrefslogtreecommitdiffstats
path: root/lld/ELF/ScriptLexer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Handle ":" as a regular token character in linker scripts.Rui Ueyama2017-03-091-10/+19
| | | | | | | | | This is an alternative to https://reviews.llvm.org/D30500 to simplify the version definition parser and allow ":" in symbol names. Differential Revision: https://reviews.llvm.org/D30722 llvm-svn: 297402
* Apply different tokenization rules to linker script expressions.Rui Ueyama2017-02-151-12/+56
| | | | | | | | | | | | | | | | The linker script lexer is context-sensitive. In the regular context, arithmetic operator characters are regular characters, but in the expression context, they are independent tokens. This afects how the lexer tokenizes "3*4", for example. (This kind of expression is real; the Linux kernel uses it.) This patch defines function `maybeSplitExpr`. This function splits the current token into multiple expression tokens if the lexer is in the expression context. Differential Revision: https://reviews.llvm.org/D29963 llvm-svn: 295225
* Add file comments for ScriptParser.cpp.Rui Ueyama2017-02-141-2/+31
| | | | llvm-svn: 295023
* Rename ScriptParser.{cpp,h} -> ScriptLexer.{cpp,h}.Rui Ueyama2017-02-141-0/+203
These files contain a lexer, so the new names are better. The parser is in LinkerScript.{cpp,h}. llvm-svn: 295022
OpenPOWER on IntegriCloud