CLexerSourceWhen one registers a keyword she can declare it starts a quotation. In particular using QUOTATION("name:") in a grammar rule declares "name:" as a keyword and the token QUOTATION is matched whenever the keyword is followed by an identifier or a parenthesized text. Eg
constr:x string:.... ltac:(....) ltac:....
The delimiter is made of 1 or more occurrences of the same parenthesis, eg ((.....)) or [[[....]]]. The idea being that if the text happens to contain the closing delimiter, one can make the delimiter longer and avoid confusion (no escaping). Eg
string:[ .. ']' .. ]
Nesting the delimiter is allowed, eg ((..((...))..)) is OK.
Keywords don't need to end in ':'
This should be functional but it is not due to the interface
Precondition: the input is a number (c.f. NumTok.t)
The lexer of Coq:
Create a lexer. true enables alternate handling for computing diffs. It ensures that, ignoring white space, the concatenated tokens equal the input string. Specifically: