<div dir="ltr"><div>Sounds good to me. I think we're at the point where there seems to be a broad agreement on the style, and it'll be easier to see it once it's put into practice, so it'll be good to see what you've come up with once it's ready!</div><div><br></div><div>James<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 22 August 2018 at 10:07, Thomas Preudhomme <span dir="ltr"><<a href="mailto:thomas.preudhomme@linaro.org" target="_blank">thomas.preudhomme@linaro.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi James,</div><div><br></div><div>Yes I think you summary proposal is a good one though I disagree with the colon being optional because there is ambiguity with looking for the value of VAR5 in the %x format. If anything, [[# %x, VAR5]] is equivalent to [[#:%x, VAR5]] or ([[#:%x = VAR5]] with your proposal. My other suggestion would be to use == rather than = since = could be confused with assignment.</div><div><br></div><div>Note that I'll stick to only implementing = for now as supporting <, <=, > or >= requires a different logic than what I'm doing now.</div><div><br></div><div>By the way FYI, I have already started working on the new syntax, still a fair amount to do as I was busy on other tasks but I'm progressing.</div><div><br></div><div>Best regards,</div><div><br></div><div>Thomas<br></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Fri, 17 Aug 2018 at 10:39, James Henderson <<a href="mailto:jh7370.2008@my.bristol.ac.uk" target="_blank">jh7370.2008@my.bristol.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div>Hi,</div><div><br></div><div>I had some more thoughts. Summary of my proposal is at the bottom, but basically I wonder if we need to look again at the syntax a little.</div><div><br></div><div>+++Details+++<br></div><br><div>In
<a href="https://reviews.llvm.org/D49964" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D49964</a>, the proposed test at the time of writing has the size of a compressed and a decompressed version of a section hard-coded in. This feels a little fragile to me, and really what's interesting is whether the compressed section is smaller than the decompressed section. That then led me to think that the current test harness we use for some of our tools allows us to capture an integer and then compare it against another integer to report success or failure. Sometimes, the value in the comparison is computed from a captured number too. I don't have a fully-thought out syntax for this, but I think it should be complementary to the variable expression syntax.</div><div><br></div><div>Example proposal:</div><div><br></div><div>[[# %x < VAR - 10]]</div><div>[[# < VAR - 10]]<br></div><div><br></div><div>The first would match a hex number that is strictly 10 or more less than the value of VAR, and the second would match whatever the default pattern is. Thus the format specifier still works as before. The only difference is that we replace the ',' with a comparison operator (equally valid would be '<=', '>' etc). That then led me to wonder, why not use '==' (or just '=') to indicate equality, instead of ',' i.e:</div><div><br></div><div>[[# %x == VAR - 10]]<br></div><div><br></div><div>Related to this, it occurred to me that sometimes, we might want to capture the variable for reuse later, but also verify that it is based on some other variable (e.g. END is 4 higher than BEGIN, and written in hex). So maybe both can live alongside each other:</div><div><br></div><div>[[# %x, VAR1 < VAR2 - 10]]</div><div><br></div><div>This would capture a hex number, store it in VAR1, but fail if that number is not more than ten less than VAR2. Maybe we might want to use a colon to delineate the capture side from the verification side.</div><div><br></div><div>+++Summary+++</div><div><br></div><div>I think the following would be my proposal:<br></div><div><br></div><div>[[# %x, VAR1 : < VAR2 - 10]] // Capture VAR1 from hex, fail if it doesn't meet the right-hand expression.<br></div><div>[[# %x, VAR3 :]] // Capture VAR3 from hex, always succeeding.<br></div><div>[[# %x = VAR4 + 10]] // Capture a hex string that must equal VAR4 + 10.</div><div><br></div><div>
<div>Thus if nothing is after the colon, just
capture a variable (which I think is what we agreed on before). Anything
after a colon is used as a variable expression that must match the
captured expression.</div>
</div><div><br></div><div>That would suggest that the following would not want to be valid syntax, but maybe ',' could be treated as synonymous with '=', or maybe the colon can be omitted in cases where no verification is needed (and thus the following becomes an assignment)?<br></div><div>[[# %x, VAR5]]</div><div><br></div><div>Thoughts?</div><div><br></div><div>James<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 31 July 2018 at 17:36, <span dir="ltr"><<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US">
<div class="m_5424899625467811937m_-6590256325359990230m_383626816857075258WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I can certainly envision a use case for a [BASE + LENGTH + 4] computation to verify the address of a next-thingy. Comes up in DWARF dumps all the time.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr<u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_5424899625467811937_m_-6590256325359990230_m_383626816857075258__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> llvm-dev [mailto:<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@<wbr>lists.llvm.org</a>]
<b>On Behalf Of </b>James Henderson via llvm-dev<br>
<b>Sent:</b> Tuesday, July 31, 2018 11:53 AM<br>
<b>To:</b> Thomas Preudhomme<br>
<b>Cc:</b> llvm-dev</span></p><div><div class="m_5424899625467811937m_-6590256325359990230h5"><br>
<b>Subject:</b> Re: [llvm-dev] Syntax for FileCheck numeric variables and expressions<u></u><u></u></div></div><p></p>
</div>
</div><div><div class="m_5424899625467811937m_-6590256325359990230h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">This looks like a reasonable subset of features to me. My only question is related to this one:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">> - arithmetic expression involving several variables<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Is it actually harder to write FileCheck to handle this case than to not handle it? I'm (naively) assuming that the variables will be in some form of container, and are just substituted in. If it is harder, that's fine. Otherwise, I just
say do it.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">James<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On 31 July 2018 at 11:51, Thomas Preudhomme via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<u></u><u></u></p>
<p class="MsoNormal">Hi Alex,<br>
<br>
On Fri, 27 Jul 2018 at 11:53, Alexander Richardson<br>
<<a href="mailto:arichardson.kde@gmail.com" target="_blank">arichardson.kde@gmail.com</a>> wrote:<br>
><br>
> On Thu, 26 Jul 2018 at 10:28 Thomas Preudhomme <<a href="mailto:thomas.preudhomme@linaro.org" target="_blank">thomas.preudhomme@linaro.org</a>> wrote:<br>
>><br>
>> Hi Alexander,<br>
>><br>
>> Please forgive me if I'm missing the obvious but I do not see how the<br>
>> order helps allowing a comma in the expression. It seems to me that<br>
>> what would allow it is to make FMTSPEC mandatory or at least the comma<br>
>> to separate it (ie. [[#,EXPR]] for the default format specifier). In<br>
>> any case comma in a function-call like expression can be distinguished<br>
>> from comma for the format specifier since one is always inside a<br>
>> parenthesized expression.<br>
>><br>
> Hi Thomas,<br>
><br>
> I though that FMTSPEC first might be easier to implement because you can just check if the first non-whitespace character after # is a %. If it is parse a fmtspec followed by a comma and if not treat everything else as the expression. But you are right a
function-like syntax would always contain parentheses so there is no ambiguity.<br>
> I think [[#,EXPR]] looks a bit strange and I think we can determine default format vs format specifier based on the first character after the # being a % or not. I.e. [[#EXPR]] means default format and [[#%x,EXPR]] is hex. Does that sound reasonable?<br>
<br>
Yes it does. I've started reworking the changes I made to<br>
FileCheck.rst to document the agreed upon syntax. At the moment I'm<br>
thinking about supporting %u, %d, %x and %X as input and output format<br>
specifier, the optionality of format specifier (defaulting to %u) and<br>
basic numeric variable definition and numeric expression use involving<br>
a variable and an immediate. In particular, I do *not* plan to<br>
implement the following:<br>
- defining a numeric variable from a numeric expression<br>
- arithmetic operations other than - and +<br>
- arithmetic expression involving several variables<br>
<br>
I'll make sure that this can easily be added later and will mention in<br>
the doc that the syntax for these feature has already been agreed as<br>
well.<br>
<br>
Feel free to give me feedback on the set of features I intend to<br>
implement in this initial patch.<br>
<br>
Best regards,<br>
<br>
Thomas<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
><br>
><br>
>><br>
>> That said I don't have a strong opinion about the ordering of the<br>
>> expression wrt. the format specifier. I find EXPR, FMTSPEC more<br>
>> natural but at 2 persons (James and you) expressed preference for the<br>
>> reverse order so I'll assume that's the general preference.<br>
>><br>
><br>
> I don't have a strong preference whether it should come before or after and agree with James that whatever is easiest to implement should be done.<br>
><br>
> Thanks,<br>
> Alex<br>
><br>
><br>
>> Best regards,<br>
>><br>
>> Thomas<br>
>><br>
>> P.S.: My apologies for only asking now but how do you prefer to be<br>
>> called? Alexander Vs Alex Vs something else?<br>
><br>
> Most people call me Alex but if you prefer Alexander is also fine.<br>
><br>
>><br>
>><br>
>> On Sun, 22 Jul 2018 at 20:23, Alexander Richardson<br>
>> <<a href="mailto:arichardson.kde@gmail.com" target="_blank">arichardson.kde@gmail.com</a>> wrote:<br>
>> ><br>
>> > On Wed, 18 Jul 2018 at 13:50 Thomas Preudhomme <<a href="mailto:thomas.preudhomme@linaro.org" target="_blank">thomas.preudhomme@linaro.org</a>> wrote:<br>
>> >><br>
>> >> Hi Alex,<br>
>> >><br>
>> >> Thanks for the feedback. My first thought was that introducing the new<br>
>> >> pseudo var @EXPR is a nice way to generalize that syntax beyond @LINE<br>
>> >> since it would also evaluate to an arithmetic value. On the other hand<br>
>> >> there is a small inconsistency because @LINE evaluates to a value<br>
>> >> which can be part of an expression while @EXPR is an expression, and<br>
>> >> so the @ syntax as a whole becomes defined as introducing something<br>
>> >> which is not a regular variable, ie. a negative definition.<br>
>> >><br>
>> >> I'll stick with the # syntax because # is usually associated with<br>
>> >> numbers and can be defined as introducing an integer<br>
>> >> expression/variable. The one question I wonder is if the # should be<br>
>> >> next to the variable name or next to the [[ as proposed by James. I<br>
>> >> like the former better *but* I think the latter makes more sense since<br>
>> >> [[#VAR + 1]] would suggest that the [[<something>]] syntax already<br>
>> >> allows numeric expression without numeric variable which is not the<br>
>> >> case. Having the # right at the start also clearly indicates that the<br>
>> >> whole expression might have a conversion specifier. Finally, the #<br>
>> >> syntax can allow defining a variable with the result of an arithmetic<br>
>> >> expression:<br>
>> >> [[#BAR, %x:]]<br>
>> >> [[# FOO:BAR+12]]<br>
>> >><br>
>> >> So BAR takes an hex value in lower case syntax, value gets added 12<br>
>> >> (in decimal) and the result is put into FOO. In which case there<br>
>> >> should be no format specifier when defining FOO. ie. format specifier<br>
>> >> for definition is only when there's nothing about the colon. Of course<br>
>> >> we could allow hex immediate with 0x syntax if needed. Again, I'm not<br>
>> >> advocating for implementing all this from the start, but make sure<br>
>> >> that the syntax would allow it if we realize we need this later and I<br>
>> >> think Jame's proposal does.<br>
>> >><br>
>> >> It seems this syntax would suit all your current uses (albeit the<br>
>> >> rewriting necessary), did I miss something?<br>
>> >><br>
>> ><br>
>> > Hi Thomas,<br>
>> ><br>
>> > That would indeed work fine for me and it would be easy to update our tests with a few regex replaces.<br>
>> ><br>
>> > I think I prefer the [[# %FMTSPEC, EXPR]] syntax since that would also make it possible to have commas in the expression part. This might be useful if we allow function-call like expressions such as [[# %X, pow(10, FOO) + 20]].<br>
>> ><br>
>> ><br>
>> > Alex<br>
>> ><br>
>> ><br>
>> ><br>
>> >><br>
>> >> Best regards,<br>
>> >><br>
>> >> Thomas<br>
>> >><br>
>> >> On Tue, 17 Jul 2018 at 21:59, Alexander Richardson<br>
>> >> <<a href="mailto:arichardson.kde@gmail.com" target="_blank">arichardson.kde@gmail.com</a>> wrote:<br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > On Tue, 17 Jul 2018 at 10:02 Thomas Preudhomme via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>> >> >><br>
>> >> >> To be clear, I do not intend to add support for hex specifier in the<br>
>> >> >> current patch, I just want to make sure the syntax we choose is going<br>
>> >> >> to allow it later. My immediate use case is decimal integer and I<br>
>> >> >> intend to write the code so that it's easy to extend to more type of<br>
>> >> >> numeric variables and expressions later. This way we'll only add<br>
>> >> >> specifier that are actually required by actual testcases.<br>
>> >> >><br>
>> >> ><br>
>> >> > I also added FileCheck expressions to our fork of LLVM in order to allow testing both a 128-bit and a 256-bits versions of our CHERI ISA in a single test case [1].<br>
>> >> > I used [[@EXPR foo * 2 + 1]] for FileCheck expressions [2]. I'm not particularly happy with this syntax since it is quite verbose (but then again we don't need it that often so it doesn't really matter). It also doesn't allow saving the expression result
so it needs to be repeated everywhere. I could probably use [[@EXPR:OUTVAR INVAR + 42]] but I haven't really had the need for that yet.<br>
>> >> ><br>
>> >> > We currently need the following two features:<br>
>> >> ><br>
>> >> > - Simple arithmetic with multiple operations. Example:<br>
>> >> > `cld $gp, $zero, [[@EXPR 2 * $CAP_SIZE - 8]]($c11)`<br>
>> >> ><br>
>> >> > - Conversion to hex (upper and lower case since not all tools are consistent here) and to decimal.<br>
>> >> > Example: // READOBJ-NEXT: 0x50 R_MIPS_64/R_MIPS_NONE/R_MIPS_<wbr>NONE .data 0x[[@EXPR hex($CAP_SIZE * 2)]]<br>
>> >> ><br>
>> >> > Alex<br>
>> >> ><br>
>> >> > [1] For most test cases the simple -DVAR=value flag in FileCheck is good enough: we have a %cheri_FileCheck lit substitution that expands to `FileCheck '-D$CAP_SIZE=16/32'` . This works for most IR level tests since usually the only thing that is different
is "align 16" vs "align 32". However, when checking the assembly output or linker addresses we often need something more complex.<br>
>> >> ><br>
>> >> > [2] A test case showing all the currently supported expressions can be found here: <<a href="https://github.com/CTSRD-CHERI/llvm/blob/master/test/FileCheck/expressions.txt" target="_blank">https://github.com/CTSRD-<wbr>CHERI/llvm/blob/master/test/<wbr>FileCheck/expressions.txt</a>><br>
>> >> ><br>
>> >> ><br>
>> >> >><br>
>> >> >> On Mon, 16 Jul 2018 at 18:39, <<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>> wrote:<br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> > > -----Original Message-----<br>
>> >> >> > > From: llvm-dev [mailto:<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@<wbr>lists.llvm.org</a>] On Behalf Of<br>
>> >> >> > > Thomas Preudhomme via llvm-dev<br>
>> >> >> > > Sent: Monday, July 16, 2018 6:24 AM<br>
>> >> >> > > To: <a href="mailto:jh7370.2008@my.bristol.ac.uk" target="_blank">jh7370.2008@my.bristol.ac.uk</a><br>
>> >> >> > > Cc: <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> >> >> > > Subject: Re: [llvm-dev] Syntax for FileCheck numeric variables and<br>
>> >> >> > > expressions<br>
>> >> >> > ><br>
>> >> >> > > Hi James,<br>
>> >> >> > ><br>
>> >> >> > > I like that suggestion very much but I think keeping the order of the<br>
>> >> >> > > two sides as initially proposed makes more sense. In printf/scanf the<br>
>> >> >> > > string is first because the primary use of these functions is to do<br>
>> >> >> > > I/O and so you first specify what you are going to output/input and<br>
>> >> >> > > then where to capture variables. The primary objective of FileCheck<br>
>> >> >> > > variables and expressions is to capture/print them, the specifier is<br>
>> >> >> > > an addon to allow some conversion. Does it make sense?<br>
>> >> >> ><br>
>> >> >> > My immediate reaction is that I'd rather not have FileCheck get into<br>
>> >> >> > the business of handling printf specifiers. OTOH, while LLVM tools<br>
>> >> >> > do typically print lowercase hex, that's not guaranteed, and looking<br>
>> >> >> > at the output of other tools can be useful too. So, a way to specify<br>
>> >> >> > the case for a hex conversion seems worthwhile.<br>
>> >> >> ><br>
>> >> >> > I had also been thinking in terms of the trailing colon to distinguish<br>
>> >> >> > definition from use, as James suggested, that's sort-of consistent<br>
>> >> >> > with the current syntax.<br>
>> >> >> ><br>
>> >> >> > This is starting to make parsing the insides of [[]] much more involved,<br>
>> >> >> > so you'll want to pay attention to making that code well-structured and<br>
>> >> >> > readable.<br>
>> >> >> > --paulr<br>
>> >> >> ><br>
>> >> >> > ><br>
>> >> >> > > In the interest of speeding things up I plan to start implementing<br>
>> >> >> > > this proposal starting tomorrow unless someone gives some more<br>
>> >> >> > > feedback.<br>
>> >> >> > ><br>
>> >> >> > > Best regards,<br>
>> >> >> > ><br>
>> >> >> > > Thomas<br>
>> >> >> > ><br>
>> >> >> > > On Fri, 13 Jul 2018 at 15:51, James Henderson<br>
>> >> >> > > <<a href="mailto:jh7370.2008@my.bristol.ac.uk" target="_blank">jh7370.2008@my.bristol.ac.uk</a>> wrote:<br>
>> >> >> > > ><br>
>> >> >> > > > Hi Thomas,<br>
>> >> >> > > ><br>
>> >> >> > > > In general, I think this is a good proposal. However, I don't think that<br>
>> >> >> > > using ">" or "<" to specify base (at least alone) is a good idea, as it<br>
>> >> >> > > might clash with future ideas to do comparisons etc. I also think it would<br>
>> >> >> > > be nice to have the syntax consistent between definition and use. My first<br>
>> >> >> > > thought on a reasonable alternative was to use commas to separate the two<br>
>> >> >> > > parts, so something like:<br>
>> >> >> > > ><br>
>> >> >> > > > [[# VAR, 16:]] to capture a hexadecimal number (where the spaces are<br>
>> >> >> > > optional). [[# VAR, 16]] to use a variable, converted to a hexadecimal<br>
>> >> >> > > string. In both cases, the base component is optional, and defaults to<br>
>> >> >> > > decimal.<br>
>> >> >> > > ><br>
>> >> >> > > > This led me to thing that it might be better to use something similar to<br>
>> >> >> > > printf style for the latter half, so to capture a hexadecimal number with<br>
>> >> >> > > a leading "0x" would be: "0x[[# VAR, %x:]]" and to use it would be "0x[[#<br>
>> >> >> > > VAR, %x]]". Indeed, that would allow straightforward conversions between<br>
>> >> >> > > formats, so say you defined it by capturing a decimal integer and using it<br>
>> >> >> > > to match a hexadecimal in upper case, with leading 0x and 8 digits<br>
>> >> >> > > following the 0x:<br>
>> >> >> > > ><br>
>> >> >> > > > CHECK: [[# VAR, %d:]] # Defines<br>
>> >> >> > > > CHECK: 0x[[# VAR + 1, %8X]] # Uses<br>
>> >> >> > > ><br>
>> >> >> > > > Of course, if we go down that route, it would probably make more sense<br>
>> >> >> > > to reverse the two sides (e.g. to become "[[# %d, VAR:]]" to capture a<br>
>> >> >> > > decimal and "[[# %8X, VAR + 1]]" to use it).<br>
>> >> >> > > ><br>
>> >> >> > > > Regards,<br>
>> >> >> > > ><br>
>> >> >> > > > James<br>
>> >> >> > > ><br>
>> >> >> > > > On 12 July 2018 at 15:34, Thomas Preudhomme via llvm-dev <llvm-<br>
>> >> >> > > <a href="mailto:dev@lists.llvm.org" target="_blank">dev@lists.llvm.org</a>> wrote:<br>
>> >> >> > > >><br>
>> >> >> > > >> Hi all,<br>
>> >> >> > > >><br>
>> >> >> > > >> I've written a patch to extend FileCheck to support matching<br>
>> >> >> > > >> arithmetic expressions involving variable [1] (eg. to match REG+1<br>
>> >> >> > > >> where REG is a variable with a numeric value). It was suggested to me<br>
>> >> >> > > >> in the review to introduce the concept of numeric variable and to<br>
>> >> >> > > >> allow for specifying the base the value are written in.<br>
>> >> >> > > >><br>
>> >> >> > > >> [1] <a href="https://reviews.llvm.org/D49084" target="_blank">https://reviews.llvm.org/<wbr>D49084</a><br>
>> >> >> > > >><br>
>> >> >> > > >> I think the syntax should satisfy the below requirements:<br>
>> >> >> > > >><br>
>> >> >> > > >> * based off the [[]] construct since anything else might overload an<br>
>> >> >> > > >> existing valid syntax (eg. $$ is supposed to match literally now)<br>
>> >> >> > > >> * consistent with syntax for expressions using @LINE<br>
>> >> >> > > >> * consistent with using ':' to define regular variable<br>
>> >> >> > > >> * allows to specify base of the number a numeric variable is being set<br>
>> >> >> > > to<br>
>> >> >> > > >> * allows to specify base of the result of the numeric expression<br>
>> >> >> > > >><br>
>> >> >> > > >> I've come up with the following syntax for which I'd like feedback:<br>
>> >> >> > > >><br>
>> >> >> > > >> Numeric variable definition: [[#X<base:]] (eg. [[#ADDR<16:]]) where X<br>
>> >> >> > > >> is the numeric variable being defined and <base is optional in which<br>
>> >> >> > > >> case base defaults to 10<br>
>> >> >> > > >> Numeric variable use: [[#X>base]] (eg. [[#ADDR]]>2) where <base is<br>
>> >> >> > > >> optional in which case base defaults 10<br>
>> >> >> > > >> Numeric expression: [[exp>base]] (eg. [[#ADDR+2>16]] where expression<br>
>> >> >> > > >> must contain at least one numeric variable<br>
>> >> >> > > >><br>
>> >> >> > > >><br>
>> >> >> > > >> I'm not a big fan of the > for the output base being inside the<br>
>> >> >> > > >> expression but [[exp]]>base would match >base literally.<br>
>> >> >> > > >><br>
>> >> >> > > >> Any suggestions / opinions?<br>
>> >> >> > > >><br>
>> >> >> > > >> Best regards,<br>
>> >> >> > > >><br>
>> >> >> > > >> Thomas<br>
>> >> >> > > >> ______________________________<wbr>_________________<br>
>> >> >> > > >> LLVM Developers mailing list<br>
>> >> >> > > >> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> >> >> > > >> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">
http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
>> >> >> > > ><br>
>> >> >> > > ><br>
>> >> >> > > ______________________________<wbr>_________________<br>
>> >> >> > > LLVM Developers mailing list<br>
>> >> >> > > <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> >> >> > > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">
http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
>> >> >> ______________________________<wbr>_________________<br>
>> >> >> LLVM Developers mailing list<br>
>> >> >> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> >> >> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">
http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>
</blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>