Talk:Compiler/lexical analyzer: Difference between revisions

Line 120:
</ol>
--[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 16:35, 15 August 2016 (UTC)
 
1) Yes, it is arbitrary. There isn't a ''right'' way to do this,
as far as I'm aware. You could do it either way I suppose.
However, since character literals are really just small integer
constants, that is what the parser needs, and so they have to be
converted somewhere. Since the scanner readily has that
information, it is easy to do the conversion there. Again, there
isn't a right a wrong way. This is just the way I've always done
it. For the integration of the scanner with the parser, this
seemed to be the easier way. I personally like the way it is
done now :-) Again, just my opinion. I hope I have answered the
question(s)!
 
2) I would rather remove the "line" and "col" labels than add
additional ones. Consider it done. It will actually make some
of the code a tad shorter :-)
 
--[[User:Ed Davis|Ed Davis]] ([[User talk:Ed Davis|talk]]) 17:32, 15 August 2016 (UTC)
 
==Token names==
155

edits