Split scanner.c, move io part out (say into io.c and io.h) #1914
Description
I always found it very confusing that things like OpenInput
, Pr
etc. are inside scanner.c
. Sure, I understand nowadays why (it is also explained in the comment at the top of scanner.c
and scanner.h
. I still find it confusing, and if I don't touch the GAP kernel for some time, will forget.
As it is, the two parts seem to be only very loosely coupled, so I think it'd be rather easy to separate them. Further separating the "scanner" / parser part from the IO part should also help with later refactoring.
The new files could be called io.c
and io.h
(although there is a slight chance of confusion with the io
package, I guess). I actually would have suggested iostream.{c,h}
, but those already exist -- and contain code to handle managing subprocesses (so perhaps that file should be renamed, too?)
Activity