Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在文件中保存长行的标准方法是将它们分成较短的子行,并以反斜杠字符结束除最后一行之外的每个子行。
我想创建 lex/flex 规则来扫描这些行。如何告诉扫描仪首先读取并连接它们,然后才尝试将规则应用于“长”字符串?
You'd best redefine the input macro to remove any occurrences of backslash-newline from the input stream. So in a sense you put a preprocessor to the tokenizer.
input