From f400c8d27e11477d79ba67ca930ca7e7511b9ee5 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 13 Aug 2021 17:20:10 +0930 Subject: ld lexer tidy, possibly break the world This tidies the states in which ld lexer rules are enabled. This change will quite likely trip over issues similar to those mentioned in the new ldlex.l comments, so please test it out. * ldgram.y (wildcard_name): Remove now unnecessary components. * ldlex.l: Restrict many rules' states. Remove -l expression state rule. Comment on lookahead state madness and need for /DISCARD/ in expression state. --- ld/ldgram.y | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'ld/ldgram.y') diff --git a/ld/ldgram.y b/ld/ldgram.y index 24979de..1f6c44a 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -421,21 +421,11 @@ statement_anywhere: lang_add_assignment (exp_assert ($4, $6)); } ; -/* The '*' and '?' cases are there because the lexer returns them as - separate tokens rather than as NAME. */ wildcard_name: NAME { $$ = $1; } - | '*' - { - $$ = "*"; - } - | '?' - { - $$ = "?"; - } ; wildcard_maybe_exclude: -- cgit v1.1