ourPLCC / plcc

A Programming Languages Compiler Compiler
GNU General Public License v3.0
6 stars 4 forks source link

Do not assume a default name for the specification file #133

Open StoneyJackson opened 4 months ago

StoneyJackson commented 4 months ago

plccmk defines default names for specification files and a priority among them: "first look for 'spec', then look for 'grammar'".

Based on discussion in #125 , I think we should remove the default from plccmk and require users to supply the path to the file as a command line argument.

plccmk grammar
plccmk ../relative/to/cwd/spec
plccmk /absolute/to/thingamajig

Advantages:

  1. Less magic for the user; explicit connection between the command and the file it operates on.
  2. Allows instructors to use whatever naming convention they feel is best.
  3. Simplifies plccmk logic.

Disadvantages:

  1. Breaks existing course materials that use plccmk with a default file name and location.
jashelio commented 4 months ago

I am in favor of this. But to be honest it does not affect my notes because they never used the grammar file.

Jim

On May 1, 2024, at 9:21 AM, Stoney Jackson @.***> wrote:

plccmk defines default names for specification files and a priority among them: "first look for 'spec', then look for 'grammar'".

Based on discussion in #125 https://github.com/ourPLCC/plcc/issues/125 , I think we should remove the default from plccmk and require users to supply the path to the file as a command line argument.

plccmk grammar plccmk ../relative/to/cwd/spec plccmk /absolute/to/thingamajig Advantages:

Less magic for the user; explicit connection between the command and the file it operates on. Allows instructors to use whatever naming convention they feel is best. Simplifies plccmk logic. Disadvantages:

Breaks existing course materials that use plccmk with a default file name and location. — Reply to this email directly, view it on GitHub https://github.com/ourPLCC/plcc/issues/133, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEH53GSCGINNJDR5DX32QX3ZADT5DAVCNFSM6AAAAABHB62OVKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3TGNBZGI2TOMI. You are receiving this because you are subscribed to this thread.

StoneyJackson commented 4 months ago

AGREED, but don't forget to change the course materials.