A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.llvm.org/pipermail/llvm-dev/2020-July/143912.html below:

[llvm-dev] Suggestion for TableGen ranges

[llvm-dev] Suggestion for TableGen ranges [llvm-dev] Suggestion for TableGen rangesPaul C. Anagnostopoulos via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 30 10:00:56 PDT 2020
The is a syntax quirk in TableGen. A leading plus or minus sign on a decimal integer is considered part of the integer token. Coupled with this, the hyphen (-) is used to indicate integer ranges, as in '1-5'. But the compiler lexes '1-5' as '1' followed by '-5', so a special rule is required to treat that as a range. It is documented as follows:

"The peculiar last form of RangePiece is due to the fact that the "-" is included in the TokInteger, hence 1-5 gets lexed as two consecutive TokInteger’s, with values 1 and -5, instead of "1", "-", and "5"."

I propose that we add '..' as a new punctuation token and use it to indicate ranges: 1..5, -10..-5. Then we can deprecate the hyphen range construct.

More information about the llvm-dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4