This is the talk page for discussing improvements to the Lexer hack article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||
|
The article states that this is an unambigous cast, but it's not. If A is a function it's a function call. Example:
int A(int _b) {
return _b;
}
int main(void) {
int C = 134;
int *B = &C;
int D = (A) (*B); // The function call
printf("%d", D);
}
This article provides no explanations for its technical terms nor are the terms linked to other articles to provide any explanation. Please expand and make accessible for the majority of readers. Velela 17:45, 21 May 2006 (UTC)
According to the reference given (Eli Bendersky's website), clang can get rid of 'the lexer hack' because it is using a recursive / backtracking parser (which allows it to try different interpretations, and tag lexical items with semantic info). Please explain how this supports the claim that clang is using a "non-reference lexical grammar".
Using the example given in this article, if using a LALR parser, it would be impossible to reinterpret "var*(var_or_type)*var" as "var*((type)*var)" instead of "(var*(var))*var" without throwing away the whole syntax tree. — Preceding unsigned comment added by 2A02:2F0E:D2A1:4B00:B165:DC79:CC95:1986 (talk) 23:17, 31 January 2017 (UTC)