sunflower-embedded-system-emulator icon indicating copy to clipboard operation
sunflower-embedded-system-emulator copied to clipboard

Remove lex file duplication

Open SamuelmsWong-zz opened this issue 6 years ago • 3 comments

lex-hitachi-sh.c and lex-riscv.c differ only in the tokens for their assembly instructions, so the rest (tokens for Sunflower commands and the lexical analyser function) is all duplicated.

SamuelmsWong-zz avatar Oct 16 '19 13:10 SamuelmsWong-zz

One approach would be to split off the common %token T_* at the start of the .ys into a sf-common-tokens.y and to similarly split off the common grammar rules into a sf-common-grammar.y. @SamuelmsWong @rjlv2 @jan-heck : if any of you are interested...

phillipstanleymarbell avatar Nov 30 '19 18:11 phillipstanleymarbell

Hi. I can probably get started on this in a few weeks.

SamuelmsWong-zz avatar Sep 17 '20 10:09 SamuelmsWong-zz

That's great!

phillipstanleymarbell avatar Sep 17 '20 11:09 phillipstanleymarbell