Talk:Compiler/lexical analyzer: Difference between revisions

add another bullet point
m (correction)
(add another bullet point)
Line 10:
* '''string literals:''' How can a double quote be represented inside a string literal, if there are no other escape sequences besides <code>\n</code> and <code>\\</code>?
* '''whitespace:''' This needs an actual thorough description, instead of just an example. Am I right to assume that zero or more whitespace characters or comments are allowed between ''any'' two tokens, with no exceptions, and that "longest token matching" is used to resolve conflicts (e.g. in order to match <code><=</code> as a single token rather than the two tokens <code><</code> and <code>=</code>)?
* '''operators''': How is the lexer supposed to differentiate between <code>Sub</code> and <code>Uminus</code>? And why does the third test-case print "Sub" for both?
<br>Sorry if some of these sound pedantic, but experience on rosettacode has shown that tasks of this complexity absolutely need to be precise and unambiguous in order to not cause problems for people who will try to add solutions... :)<br>
--[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 1314:3222, 14 August 2016 (UTC)
Anonymous user