- commit
- c02ab69
- parent
- 1484dd7
- author
- xplshn
- date
- 2025-08-24 02:43:39 +0000 UTC
Update README.md
1 files changed,
+56,
-61
+56,
-61
1@@ -7,69 +7,64 @@
2
3 This compiler is a project aiming to make a valid B compiler, with _optional_ syntax extensions, and a modules system like Go's
4
5-```
6+```sh
7 ]~/Documents/TrulyMine/gbc@ ./gbc --help
8
9-Copyright (c) 2025: xplshn and contributors
10-For more details refer to <https://github.com/xplshn/gbc>
11-
12- Synopsis
13- gbc [options] <input.b> ...
14-
15- Description
16- A compiler for the B programming language and its extensions, written in Go.
17-
18- Options
19- -o <file> Place the output into <file>.
20- -t, --target <target> Set the QBE target ABI.
21- -I <path> Add a directory to the include path.
22- -L <arg> Pass an argument to the linker.
23- -C <arg> Pass a compiler-specific argument (e.g., -C linker_args='-s').
24- -l<lib> Link with a library (e.g., -lb for 'b').
25- -h, --help Display this information.
26- -std=<std> Specify language standard (B, Bx). Default: Bx
27- -pedantic Issue all warnings demanded by the current B std.
28-
29- Warning Flags
30- -Wall Enable most warnings.
31- -Wno-all Disable all warnings.
32- -W<warnings> Enable a specific warnings.
33- -Wno-<warnings> Disable a specific warnings.
34- Available warnings:
35- c-esc Warn on usage of C-style '\' escapes. [x]
36- b-esc Warn on usage of B-style '*' escapes. [x]
37- b-ops Warn on usage of B-style assignment operators like '=+'. [x]
38- c-ops Warn on usage of C-style assignment operators like '+='. [x]
39- u-esc Warn on unrecognized character escape sequences. [x]
40- truncated-char Warn when a character escape value is truncated. [x]
41- long-char-const Warn when a multi-character constant is too long for a word. [x]
42- c-comments Warn on usage of non-standard C-style '//' comments. [-]
43- overflow Warn when an integer constant is out of range for its type. [x]
44- pedantic Issue all warnings demanded by the strict standard. [-]
45- unreachable-code Warn about code that will never be executed. [x]
46- implicit-decl Warn about implicit function or variable declarations. [x]
47- type Warn about type mismatches in expressions and assignments. [x]
48- extra Enable extra miscellaneous warnings. [x]
49-
50- Feature Flags
51- -F<features> Enable a specific features.
52- -Fno-<features> Disable a specific features.
53- Available features:
54- extrn Allow the 'extrn' keyword. [x]
55- asm Allow `__asm__` blocks for inline assembly. [x]
56- b-esc Recognize B-style '*' character escapes. [-]
57- c-esc Recognize C-style '\' character escapes. [x]
58- b-ops Recognize B-style assignment operators like '=+'. [-]
59- c-ops Recognize C-style assignment operators like '+='. [x]
60- c-comments Recognize C-style '//' line comments. [x]
61- typed Enable the Bx opt-in & backwards-compatible type system. [x]
62- short-decl Enable Bx-style short declaration `:=`. [x]
63- bx-decl Enable Bx-style `auto name = val` declarations. [x]
64- allow-uninitialized Allow declarations without an initializer (`var;` or `auto var;`). [x]
65- strict-decl Require all declarations to be initialized. [-]
66- no-directives Disable `// [b]:` directives. [-]
67- continue Allow the Bx keyword `continue` to be used. [x]
68-
69+ Copyright (c) 2025: xplshn and contributors
70+ For more details refer to <https://github.com/xplshn/gbc>
71+
72+ Synopsis
73+ gbc [options] <input.b> ...
74+
75+ Description
76+ A compiler for the B programming language and its extensions, written in Go.
77+
78+ Options
79+ --compiler-arg<arg> Pass a compiler-specific argument (e.g., -C linker_args='-s')
80+ -h, --help Display this information
81+ --include<path> Add a directory to the include path
82+ --linker-arg<arg> Pass an argument to the linker
83+ -o <file>, --output <file> Place the output into <file> |a.out|
84+ --std<std> Specify language standard (B, Bx) |Bx|
85+ -t <backend/target>, --target <backend/target> Set the backend and target ABI (e.g., llvm/x86_64-linux-musl) |qbe|
86+
87+ Feature Flags
88+ -F<feature flag> Enable a specific feature flag
89+ -Fno-<feature flag> Disable a specific feature flag
90+ Available feature flags:
91+ allow-uninitialized Allow declarations without an initializer (`var;` or `auto var;`). |x|
92+ asm Allow `__asm__` blocks for inline assembly. |x|
93+ b-esc Recognize B-style '*' character escapes. |-|
94+ b-ops Recognize B-style assignment operators like '=+'. |-|
95+ bx-decl Enable Bx-style `auto name = val` declarations. |x|
96+ c-comments Recognize C-style '//' line comments. |x|
97+ c-esc Recognize C-style '\' character escapes. |x|
98+ c-ops Recognize C-style assignment operators like '+='. |x|
99+ continue Allow the Bx keyword `continue` to be used. |x|
100+ extrn Allow the 'extrn' keyword. |x|
101+ no-directives Disable `// [b]:` directives. |-|
102+ short-decl Enable Bx-style short declaration `:=`. |x|
103+ strict-decl Require all declarations to be initialized. |-|
104+ typed Enable the Bx opt-in & backwards-compatible type system. |x|
105+
106+ Warning Flags
107+ -W<warning flag> Enable a specific warning flag
108+ -Wno-<warning flag> Disable a specific warning flag
109+ Available Warning Flags:
110+ b-esc Warn on usage of B-style '*' escapes. |x|
111+ b-ops Warn on usage of B-style assignment operators like '=+'. |x|
112+ c-comments Warn on usage of non-standard C-style '//' comments. |-|
113+ c-esc Warn on usage of C-style '\' escapes. |x|
114+ c-ops Warn on usage of C-style assignment operators like '+='. |x|
115+ extra Enable extra miscellaneous warnings. |x|
116+ implicit-decl Warn about implicit function or variable declarations. |x|
117+ long-char-const Warn when a multi-character constant is too long for a word. |x|
118+ overflow Warn when an integer constant is out of range for its type. |x|
119+ pedantic Issue all warnings demanded by the strict standard. |-|
120+ truncated-char Warn when a character escape value is truncated. |x|
121+ type Warn about type mismatches in expressions and assignments. |x|
122+ u-esc Warn on unrecognized character escape sequences. |x|
123+ unreachable-code Warn about code that will never be executed. |x|
124 ]~/Documents/TrulyMine/gbc@
125 ```
126