[m-rev.] for review: merge integer token representations in the lexer
Julien Fischer
jfischer at opturion.com
Sat Apr 22 18:01:41 AEST 2017
On Sat, 22 Apr 2017, Julien Fischer wrote:
>
> On Sat, 22 Apr 2017, Julien Fischer wrote:
>
>>
>> Hi Zoltan,
>>
>> On Sat, 22 Apr 2017, Zoltan Somogyi wrote:
>>
>>> On Sat, 22 Apr 2017 16:47:25 +1000 (AEST), Julien Fischer
>>> <jfischer at opturion.com> wrote:
>>
>>>>>> - ;
>>>>>> - Token = big_integer(LexerBase, Integer),
>>>>>> + Signedness =
>>>>>> lexer_signedness_to_term_signedness(LexerSignedness),
>>>>>> + Size = lexer_size_to_term_size(LexerSize),
>>>>>
>>>>> Why is there a need for these type conversions?
>>>>> By that I mean: why does lexer.m has its own copies
>>>>> of these types?
>>>>
>>>> The existing code already handled the base argument thus; the rationale
>>>> for it doing so was to avoid the lexer module having to import the term
>>>> module.
>>>
>>> Can't these types be defined in integer.m?
>>
>> Nothing in the intger module requires them and they're not anything that
>> other users of the integer module outside of the term parser would want.
>
> Thinking about this a bit more: while I don't want the types to be
> part of the publicly documented interface to integer.m, I have no
> objection to it privately exporting them for use by the compiler.
Ignore that, it's a dreadful idea -- those types are part of the
public interface of the term module.
Julien.
More information about the reviews
mailing list