skeet70 / pascal-compiler

A project Pascal compiler written in Haskell.
5 stars 1 forks source link

Scanner Method: openFile #10

Closed skeet70 closed 11 years ago

skeet70 commented 11 years ago

The openFile method or procedure, when called by the driver, is to take one parameter, the name of the file to be scanned that was entered by the user as a command line parameter (see the first bullet). The other interface components are self-explanatory.

iduhetonas commented 11 years ago

This bug is redundant with #9 since the language in "implement a driver" implied that it would accept a parameter. Therefore, this bug is closed.

skeet70 commented 11 years ago

This isn't a bug, it's a feature. This is specifically laid out in his explanation of what methods the driver needs to have, so this needs to be a method. The CLI parameter will be passed by the driver to this method, which will handle opening the file.

iduhetonas commented 11 years ago

In that case, I'll put it in the backlog to anybody that wants to start on it. I haven't started working on, or thinking about, implementing this yet.

skeet70 commented 11 years ago

I'm going to close this one, because the impure 'read' function completely satisfies this requirement. I tried wrapping/writing my own version either doing this or using Text.Read, but it's not worth it.