rfc:improved-parser-error-message
Differences
This shows you the differences between two versions of the page.
rfc:improved-parser-error-message [2011/08/06 19:27] stas [Request for Comments: Improved parser error message] |
rfc:improved-parser-error-message [2017/09/22 13:28] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Request for Comments: Improved parser error message ====== | ||
- | * Version: 1.0 | ||
- | * Date: 2011-05-16 | ||
- | * Author: Felipe Pena < | ||
- | * Status: Implemented | ||
- | * Discussion: [[http:// | ||
- | |||
- | |||
- | ===== Introduction ===== | ||
- | |||
- | The purpose of this RFC is to propose a naming of our tokens to have an crypto-less parser error messages. This is simply achieved by using an old Bison feature. | ||
- | |||
- | ==== BC ==== | ||
- | |||
- | There is no BC break. The token_*() functions aren't affected by the patch. | ||
- | |||
- | < | ||
- | $ sapi/ | ||
- | string(6) " | ||
- | </ | ||
- | |||
- | ==== Examples ==== | ||
- | |||
- | < | ||
- | $ sapi/ | ||
- | Patched: | ||
- | Parse error: syntax error, unexpected ' | ||
- | |||
- | Current: | ||
- | Parse error: syntax error, unexpected T_STRING, expecting ' | ||
- | </ | ||
- | |||
- | < | ||
- | $ sapi/ | ||
- | Patched: | ||
- | Parse error: syntax error, unexpected '""' | ||
- | |||
- | Current: | ||
- | Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, | ||
- | </ | ||
- | |||
- | < | ||
- | $ sapi/ | ||
- | Patched: | ||
- | Parse error: syntax error, unexpected '::' | ||
- | nexpected '::' | ||
- | |||
- | Current: | ||
- | Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in Command line code on line 1 | ||
- | </ | ||
- | |||
- | < | ||
- | $ sapi/ | ||
- | Patched: | ||
- | Parse error: syntax error, unexpected '<< | ||
- | |||
- | Current: | ||
- | Parse error: syntax error, unexpected T_SL_EQUAL in Command line code on line 1 | ||
- | </ | ||
- | |||
- | < | ||
- | $ sapi/ | ||
- | Patched: | ||
- | Parse error: syntax error, unexpected end of file, expecting identifier (T_STRING) in Command line code on line 1 | ||
- | |||
- | Current: | ||
- | Parse error: syntax error, unexpected $end, expecting T_STRING in Command line code on line 1 | ||
- | </ | ||
- | ===== Patch ===== | ||
- | |||
- | * http:// | ||
rfc/improved-parser-error-message.txt · Last modified: 2017/09/22 13:28 (external edit)