aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/generator/main.go2
-rw-r--r--cmd/maleeni/compile.go16
2 files changed, 9 insertions, 9 deletions
diff --git a/cmd/generator/main.go b/cmd/generator/main.go
index 20dbc5f..75b7eea 100644
--- a/cmd/generator/main.go
+++ b/cmd/generator/main.go
@@ -93,6 +93,6 @@ func gen() error {
return err
}
defer f.Close()
- fmt.Fprintf(f, b.String())
+ fmt.Fprint(f, b.String())
return nil
}
diff --git a/cmd/maleeni/compile.go b/cmd/maleeni/compile.go
index 2fcb8ad..e353875 100644
--- a/cmd/maleeni/compile.go
+++ b/cmd/maleeni/compile.go
@@ -14,22 +14,22 @@ import (
)
var compileFlags = struct {
- debug *bool
- compLv *int
- output *string
+ debug *bool
+ compLv *int
+ output *string
}{}
func init() {
cmd := &cobra.Command{
- Use: "compile",
- Short: "Compile a lexical specification into a DFA",
- Long: `compile takes a lexical specification and generates a DFA accepting the tokens described in the specification.`,
+ Use: "compile",
+ Short: "Compile a lexical specification into a DFA",
+ Long: `compile takes a lexical specification and generates a DFA accepting the tokens described in the specification.`,
Example: ` Read from/Write to the specified file:
maleeni compile lexspec.json -o clexspec.json
Read from stdin and write to stdout:
cat lexspec.json | maleeni compile`,
- Args: cobra.MaximumNArgs(1),
- RunE: runCompile,
+ Args: cobra.MaximumNArgs(1),
+ RunE: runCompile,
}
compileFlags.compLv = cmd.Flags().Int("compression-level", compiler.CompressionLevelMax, "compression level")
compileFlags.output = cmd.Flags().StringP("output", "o", "", "output file path (default stdout)")