chiark / gitweb /
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
Improve checking for C99-style varargs macros.
This is a rather sad story. C99 introduced `variadic macros'
(gratuitously incompatible with GCC's better thought-out existing
feature for doing the same thing). GCC implements the feature, and
enables it by default. Unfortunately, GCC doesn't declare conformance
with C99 by default (by defining `__STDC_VERSION__' appropriately), so
the naïve test doesn't actually work unless you give GCC some extra
options.
Now that we have a place for `preliminary utilities' in the header file,
define a new macro `SOD__HAVE_VARARGS_MACROS' to report the feature's
availability to generated code, and use this to guard definitions which
make use of the feature.
Apparently (https://gcc.gnu.org/c99status.html) the feature was added to
GCC in version 2.95; I'm testing for version three or later because it's
easy. But this isn't enough. If GCC isn't fully committed to the C99
feature set, then `-pedantic' mode will issue warnings about the use of
variadic macros. Normally we could suppress these with some hacking
involving `__extension__' or `#pragma GCC diagnostic', but GCC's
preprocessor isn't clever enough to deal with any of that. Instead, we
reach for the big hammer and have header files declare themselves to be
`system headers', which means that GCC stops trying to warn about them
at all.
This is really quite a long way from being an ideal situation.
Mark Wooding [Tue, 5 Jan 2016 19:29:59 +0000 (19:29 +0000)]
src/output-impl.lisp: Add a debugging dump of the known constraints.
It's disabled, but the format string is quite hairy, and this rune can
make confusing bugs a little easier to track down so I'm committing it.
Mark Wooding [Wed, 30 Dec 2015 00:34:15 +0000 (00:34 +0000)]
src/class-output.lisp, src/output-impl.lisp: Warn about unused items.
After an output run, report warnings about all of the items which didn't
get output (because they're not named in any constraints).
Unfortunately, this reports a whole bunch of internally generated items
which (harmlessly) never actually reach the output, so arrange not to
make those items in the first place.
Mark Wooding [Tue, 15 Dec 2015 15:44:25 +0000 (15:44 +0000)]
src/frontend.lisp: Add `--backtrace' option to expose error context.
Skips the usual fancy error reporting. Useful when debugging.
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
src/final.lisp: Add convenient macro for testing parsers at the REPL.
Nothing especially awesome.
Mark Wooding [Tue, 5 Jan 2016 17:20:55 +0000 (17:20 +0000)]
test/test.sod: New file containing miscellaneous tests.
Currently there's just a tidied-up version of the aggregating method
combination tests I was using during development.
Mark Wooding [Tue, 5 Jan 2016 17:05:59 +0000 (17:05 +0000)]
src/module-parse.lisp: Support multi-word item names in fragment syntax.
A sequence of identifiers can be written in parentheses. There's still
no way to refer to items whose names contain objects such as classes or
methods. This probably isn't too disastrous.
Mark Wooding [Tue, 5 Jan 2016 17:02:17 +0000 (17:02 +0000)]
src/module-parse.lisp: Frob `_' to `-' in item names.
This was just a stupid bug.
Mark Wooding [Tue, 5 Jan 2016 17:19:11 +0000 (17:19 +0000)]
test/chimaera.{sod,ref}: Make `Chimaera' less tolerant of tickling.
Just happens to demonstrate inheritance of slot initializers.
Mark Wooding [Tue, 5 Jan 2016 17:18:27 +0000 (17:18 +0000)]
test/chimaera.sod: Make `Serpent' tickle tolerance be a slot.
No observable change (because nothing writes the slot).
Mark Wooding [Tue, 5 Jan 2016 17:17:40 +0000 (17:17 +0000)]
test/chimaera.sod: Reformatting.
Takes up less space now.
Mark Wooding [Tue, 29 Dec 2015 15:49:17 +0000 (15:49 +0000)]
lib/Makefile.am: Associate man pages with the code where possible.
Mark Wooding [Wed, 16 Dec 2015 03:59:33 +0000 (03:59 +0000)]
lib/Makefile.am: List headers before sources.
The header file works as a sort of natural stanza heading to categorize
the immediately following source files.
Mark Wooding [Tue, 5 Jan 2016 18:50:12 +0000 (18:50 +0000)]
src/class-make-impl.lisp: Freeze file locations at object-creation time.
A couple got missed.
Mark Wooding [Tue, 5 Jan 2016 18:42:53 +0000 (18:42 +0000)]
src/class-make-proto.lisp: Remove `define-sod-class'.
Nobody's using it, and it's out of date.
Mark Wooding [Tue, 5 Jan 2016 17:50:13 +0000 (17:50 +0000)]
src/classes.lisp: Fix `print-object' on `sod-initializer'.
Would have recursed forever.
Also use `with-slots' to make the whole thing rather shorter: I think
it's allowed here.
Mark Wooding [Tue, 5 Jan 2016 19:28:14 +0000 (19:28 +0000)]
src/output-impl.lisp: No need to use `equal' on items rather than names.
Mark Wooding [Wed, 16 Dec 2015 05:25:51 +0000 (05:25 +0000)]
src/: Style cleanup: use constant names for types where available.
For example, say `c-type-int' rather than `(c-type int)'.
Mark Wooding [Wed, 16 Dec 2015 06:15:06 +0000 (06:15 +0000)]
src/c-types-{proto,impl}.lisp: Add `:export' parameter to `defctype'.
Similar to `definst' (changed in
418752c), have `defctype' optionally
export its type name and variable. Use this to (a) eliminate the
enormous explicit export list, and (b) actually export the variable
names.
Also change `define-simple-c-type' to match.
And document these changes.
Mark Wooding [Tue, 5 Jan 2016 16:31:09 +0000 (16:31 +0000)]
src/{module-impl,utilities}.lisp: Make `#line' work when pretty-printing.
The `pprint-logical-block' macro interposes a `pretty-printing stream'
between its body and the underlying stream. This makes using fancy
functionality of the underlying stream (e.g., having it keep track of
the current cursor position) rather tricky.
It would (just about) be possible to introduce a wrapper around
`pprint-logical-block' which keeps track of the mapping between
pretty-printing and plain streams; but that requires that the macro is
actually used everywhere, which is difficult because pretty-printing can
also be initiated using the `format' `~<...~:>' command.
So instead I introduce a system-specific hack `print-ugly-stuff' which
knows how to extract and expose the underlying stream to its caller, and
synchronize things so that nothing gets lost (on SBCL and CMUCL, at
least; on others, it just passes back the pretty-printing stream). The
function `output-c-excursion' now uses this to do its thing.
Mark Wooding [Tue, 5 Jan 2016 16:29:45 +0000 (16:29 +0000)]
src/module-impl.lisp (output-c-excursion): Remove redundant `~&'.
There's no need to have both an explicit call to `fresh-line' and `~&'
on the front of the following `format' string. The `fresh-line' call is
the right one to leave: otherwise the new line (if any) is started after
we've called `position-aware-stream-line', which will therefore give us
the wrong answer.
Mark Wooding [Wed, 16 Dec 2015 01:24:16 +0000 (01:24 +0000)]
src/builtin.lisp (class-slot "init"): Fix declaration of temporaries.
Each slot initializer is first used to initialize a temporary of the
correct type, which is then assigned to the slot's structure
member. (This was introduced in commit
1d8206e.) Unfortunately, the
temporary was declared naïvely, as `TYPE NAME', which works when TYPE
involves only declaration specifiers and pointer declarator operators,
but not otherwise.
Fix this, by using the `pprint-c-type' function like it was meant to be.
Mark Wooding [Wed, 16 Dec 2015 07:20:53 +0000 (07:20 +0000)]
src/c-types-impl.lisp (arguments-lists-equal-p): Fix stupid bug.
If some ARG-B is `:ellipsis', but the corresponding ARG-A is a proper
argument object, then we'd have a type error applying `argument-type' to
ARG-B. Make sure this doesn't happen.
Mark Wooding [Tue, 15 Dec 2015 17:04:00 +0000 (17:04 +0000)]
src/method-impl.lisp (compute-method-entry-functions): Fix varargs handling.
The `convert-stmts' in `finish-entry' didn't cover the trailing
`va_end', with the possible result of a premature return.
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
src/c-types-impl.lisp: Fix mis-spelled function name.
Mark Wooding [Wed, 16 Dec 2015 03:17:49 +0000 (03:17 +0000)]
src/c-types-parse.lisp: Cope if `*module-type-map*' is unbound.
This is useful for testing parsing outside of the context of a module
file.
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
doc/list-exports.lisp: Don't report gensyms as leaked slot names.
Mark Wooding [Tue, 15 Dec 2015 19:15:23 +0000 (19:15 +0000)]
doc/: Use the correct notation for `->' arrows.
I'm still not entirely sure I want to get into this pretty-printing
game, but this way I can at least make the decision in a single place.
Mark Wooding [Sat, 7 May 2016 11:49:24 +0000 (12:49 +0100)]
doc/sod.sty: Make the `->' operator look like its component characters.
Using an actual arrow is pretty, but it's not C.
Mark Wooding [Tue, 15 Dec 2015 19:15:23 +0000 (19:15 +0000)]
doc/sod.sty: Add a `describe' category for messages.
Mark Wooding [Tue, 15 Dec 2015 19:15:23 +0000 (19:15 +0000)]
doc/syntax.tex: Give the syntax chapter a little love.
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
doc/syntax.tex, src/sod-module.5: Document new C99 types.
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
doc/syntax.tex: Refactor the <class-definition> syntax.
* Attach the semicolon terminators to the individual <...-item>
syntaxes rather than including them in <class-item>.
* Conversely, pull the property sets out of the individual items and
into the top-level syntax, on the grounds that all class items have
property sets as a fundamental part of the high-level syntax.
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
doc/syntax.tex: Fix up the syntax notation.
Also correct some pieces which are badly out of date.
* Fix typesetting of concrete parameters to parametrized nonterminals.
* Now that <foo-list> isn't reserved, use it for <argument-list>.
* Fix the <message-item> and <method-item> syntaxes to use the correct
declarator nonterminals.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
doc/clang.tex: Fix terrible English in description of pointer types.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
doc/syntax.tex, src/sod-module.5: Typeset `<qualifier>s' properly.
In `doc/syntax.tex', the plural `s' was mistakenly included as part of
the nonterminal name. In `src/sod-module.5', the nonterminal didn't
have distinctive typesetting at all.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
doc/clang.tex: Missing return type in `format-qualifiers' synopsis.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
doc/layout.tex, doc/meta.tex: Move some `sod-class-...' descriptions.
I left a comment saying that `sod-class-ilayout', `-vtables', and
`-effective-methods' were really layout functions, but didn't move
them. This is now done.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
doc/*.tex: Whitespace hacking.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
doc/list-exports.lisp: Make executable with `cl-launch' header.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
doc/list-exports.lisp: Ignore generic functions with strange names.
CMUCL introduces functions `(pcl:class-predicate CLASS)' for its own
internal purposes, and it's not interesting to list them.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
doc/list-exports.lisp: Support use of CMUCL MOP.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
src/class-finalize-impl.lisp: Reorder `flet'/`macrolet'.
The `macrolet' macro expansion explicitly references the function
defined in the `flet' form, so probably they should be the other way
out.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
src/method-proto.lisp: Fix boneheaded `:keyword' as a type.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
src/class-make-impl.lisp: Don't store `nil' in the `metaclass' slot.
Normally we can fill `metaclass' in at construction time, but this is
difficult while we're bootstrapping the class graph. Previously, we'd
store `nil' in the slot, and expect `bootstrap-classes' to fix things up
later; but actually, the `metaclass' slot is declared to hold only
`sod-class' objects.
Rather than expand the slot type, delay the `guess-metaclass' machinery
until class finalization (moving the code across into the relevant
source files).
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
src/pset-proto.lisp (default-slot-from-property): Maybe leave slot unbound.
If there are no DEFAULT-VALUE forms, and the property isn't set, then
leave the slot unbound.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
src/*.lisp: Fix declared slot types.
SBCL doesn't seem too bothered about type mismatches in slot values, but
CMUCL kicks up a fuss. These declared types were too strict, either
because of inadequate thinking or because the declarations had become
stale.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
src/parser/package.lisp: Do better at finding Gray streams on CMUCL.
Take the opportunity to reorganize the conditional machinery. Avoid the
trap waiting because CMUCL's Gray streams are in its `extensions'
package, along with things whose names which conflict with our
utilities.
Mark Wooding [Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)]
src/*.asd.in: Load `auto.lisp' explicitly relative to `*load-pathname*'.
Mark Wooding [Tue, 15 Dec 2015 19:15:23 +0000 (19:15 +0000)]
doc/structures.tex: Better typesetting of structure expressions.
Mark Wooding [Tue, 15 Dec 2015 19:15:23 +0000 (19:15 +0000)]
doc/structures.tex: Fix fake property lists for the builtin classes.
SodObject was missing its `nick' property, which is unfortunate because
that's probably the most important one to be aware of. SodClass was
missing a property list altogether.
Mark Wooding [Tue, 15 Dec 2015 19:15:23 +0000 (19:15 +0000)]
doc/structures.tex: Insert missing member name in structure display.
Mark Wooding [Tue, 15 Dec 2015 19:15:23 +0000 (19:15 +0000)]
doc/runtime.tex: Highlight formal argument names.
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
doc/clang.tex: Display the `fun' type specifier.
It's too long to read comfortably in running text.
Mark Wooding [Sat, 7 May 2016 12:21:42 +0000 (13:21 +0100)]
doc/misc.tex (options): Add in missing argument form.
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
doc/clang.tex: Fix function name.
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
doc/clang.tex: No, `*sod-tmp-ap*' is not exported.
Mark Wooding [Tue, 15 Dec 2015 19:15:23 +0000 (19:15 +0000)]
doc/: Just some whitespace fiddling.
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
doc/output.tex: Actually document the output symbols.
Mark Wooding [Tue, 15 Dec 2015 18:30:18 +0000 (18:30 +0000)]
src/: Minor formatting tweaks.
Mark Wooding [Tue, 15 Dec 2015 19:15:23 +0000 (19:15 +0000)]
STYLE: Some minor wording fixes.
* Some actual typos.
* Punt on the issue of `a ~flet~' versus `an ~flet~' and how I'm
pronouncing `flet' today.
Mark Wooding [Wed, 25 May 2016 16:15:48 +0000 (17:15 +0100)]
src/c-types-test.lisp, src/test-base.lisp: Force pretty-printing.
It seems that later `xlunit' versions turn this off.
Mark Wooding [Wed, 25 May 2016 15:30:16 +0000 (16:30 +0100)]
src/optparse.lisp: Rearrange system-specific stuff.
* Remove `cl-launch' from the explicit `:use' list.
* Prefer using `uiop' to collect arguments if it's present, because it
does everything properly.
* Fall back to `cl-launch' driven by steam if it's available.
* Otherwise use a hacky list of system-specific runes copied from my
other Lisp library.
* Reformat the `exit' function so it's easier to slot new
implementations in, similar to the new `set-command-line-arguments'.
* Load `sod-frontend' and use `optparse:exit' rather than
`cl-launch:quit', because the latter has disappeared in later
versions.
Mark Wooding [Wed, 25 May 2016 15:27:42 +0000 (16:27 +0100)]
src/Makefile.am: Add current directory to ASDF source registry.
Newer ASDF doesn't look for system definitions in the current directory
by default any more.
Mark Wooding [Wed, 25 May 2016 15:26:49 +0000 (16:26 +0100)]
src/Makefile.am: Append `$(EXEEXT)' to placate newer Automake.
I don't think it will help much because I don't expect that `cl-launch'
works on Windows.
Mark Wooding [Tue, 29 Dec 2015 23:00:33 +0000 (23:00 +0000)]
Remove `SOD_CAR' from the public interface.
It's now called `SOD__CAR', no longer documented, and in a new, clearly
marked `preliminaries utilities' section of the header file. This new
section precedes the header-file inclusions because they can in
principle depend on the definitions made here.
This macro probably won't change, but I reserve the right to make the
internal utilities be weird in ways which won't break the way Sod uses
them, but might break other things which rely on them.
Mark Wooding [Sun, 10 Jan 2016 13:51:04 +0000 (13:51 +0000)]
doc/clang.tex: Order the table of `simple' C types more sensibly.
Mark Wooding [Sun, 10 Jan 2016 03:01:16 +0000 (03:01 +0000)]
doc/: Bring the `SYMBOLS' file and description stubs up to date.
Mark Wooding [Sun, 10 Jan 2016 03:00:53 +0000 (03:00 +0000)]
src/class-output.lisp (*instance-class*): Add a docstring.
Mark Wooding [Sun, 10 Jan 2016 02:15:24 +0000 (02:15 +0000)]
doc/list-exports.lisp: Add in the obvious interactive rune.
Just saves typing. You know?
Mark Wooding [Sun, 10 Jan 2016 02:11:02 +0000 (02:11 +0000)]
doc/list-exports.lisp: Add in some packaging boilerplate.
Mark Wooding [Sun, 10 Jan 2016 02:10:39 +0000 (02:10 +0000)]
doc/list-exports.lisp: Bind `*package*' while reading files.
Otherwise we can get confused by read-time evaluation and other such
wonders. Unfortunately this means that some of the macros we have
magical support for now need package qualification here. Oh, well.
Mark Wooding [Sun, 10 Jan 2016 02:06:42 +0000 (02:06 +0000)]
src/parser/scanner-charbuf-impl.lisp: Replace pointless use of `#.'.
This only existed because `charbuf-size' is (in theory) a tweakable
constant, but `defclass' wants a literal type specifier as its `:type'
argument. But the correct type specifier, `charbuf-index' was already
defined at the same time (both were added in the same, rather sketchy,
old commit).
It's useful to kill this because it confuses the (rather stupid) reader
in `list-exports'.
Mark Wooding [Wed, 6 Jan 2016 17:52:40 +0000 (17:52 +0000)]
doc/lispintro.tex: Clarify and expound the API compatibility rules.
A lot of this is (ahem) `borrowed' from the MOP spec.
Mark Wooding [Tue, 15 Dec 2015 14:44:44 +0000 (14:44 +0000)]
lib/: Attach proper LGPL notices to files.
Include a `.skelrc' file so that future files added here get the proper
notice.
Mark Wooding [Tue, 15 Dec 2015 14:34:33 +0000 (14:34 +0000)]
doc/concepts.tex: Document changed `and' and `or' combination return values.
Mark Wooding [Tue, 15 Dec 2015 14:31:01 +0000 (14:31 +0000)]
doc/concepts.tex: Highlight method role names.
Mark Wooding [Tue, 15 Dec 2015 14:27:52 +0000 (14:27 +0000)]
lib/sod.h: Mark-up fix.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
src/method-aggregate.lisp: `and' and `or' combinations return decisive value.
Rather than canonifying to an integer result, effective methods with
`and' and `or' method combination now return the decisive value -- which
means that they can be used with any scalar return type (so the type
restriction has been removed).
Most significantly, the `or' combination is very useful with pointer
returns: it returns the result of the most specific direct method which
returns a non-null value.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
src/c-types-parse.lisp: Actually emit the type complexity.
Bug introduced in
0e7cdea0...
Mark Wooding [Tue, 17 Nov 2015 17:24:21 +0000 (17:24 +0000)]
src/method-aggregate.lisp: Let `custom' methods have weird return types.
Mark Wooding [Tue, 17 Nov 2015 17:23:18 +0000 (17:23 +0000)]
src/method-aggregate.lisp: New protocol for method return types.
Rather than assume that primary methods should always return the same
type as the message, introduce protocol for the method combination to
decide which return type it wants.
Mark Wooding [Tue, 17 Nov 2015 17:20:16 +0000 (17:20 +0000)]
src/method-aggregate.lisp: Store keyword list as a plist on the message.
We'll need some properties in other methods on the message.
Mark Wooding [Tue, 17 Nov 2015 20:30:28 +0000 (20:30 +0000)]
src/method-aggregate.lisp: Make the method count be `size_t'.
Mark Wooding [Tue, 17 Nov 2015 17:16:19 +0000 (17:16 +0000)]
src/pset-*.lisp: Allow parsing and retrieval of C types as property values.
Hack src/sod.asd.in because pset now depends on c-types.
Mark Wooding [Tue, 17 Nov 2015 17:35:46 +0000 (17:35 +0000)]
src/pset-proto.lisp: Remove the write wrapper for `p-%type'.
Mark Wooding [Tue, 17 Nov 2015 17:15:23 +0000 (17:15 +0000)]
src/module-parse.lisp: New statement to set module-level properties.
Mark Wooding [Tue, 17 Nov 2015 20:27:44 +0000 (20:27 +0000)]
src/lexer-*.lisp: Add option to `error' to ignore non-consuming failure.
Maybe you're using `error' somewhere where a totally missing thing is
OK: the new :ignore-unconsumed option lets you tell it that this isn't a
problem.
Mark Wooding [Tue, 17 Nov 2015 17:14:26 +0000 (17:14 +0000)]
src/{builtin,c-types-{impl,parse}}.lisp: Add some more builtin types.
Add `wchar_t', `_Bool' and `bool', and the C99 complex and imaginary
types.
Mark Wooding [Tue, 17 Nov 2015 17:36:49 +0000 (17:36 +0000)]
src/sod-test.asd.in: Fix the setting of the system version.
Mark Wooding [Tue, 17 Nov 2015 17:11:08 +0000 (17:11 +0000)]
doc/concepts.tex: Provide a conceptual background.
This is a bit messy still, but I think it's a solid start.
Mark Wooding [Tue, 17 Nov 2015 17:10:32 +0000 (17:10 +0000)]
doc/clang.tex: Document `argument' accessors together.
I'm not happy about the description, but the general shape is right.
Mark Wooding [Tue, 17 Nov 2015 17:08:15 +0000 (17:08 +0000)]
doc/syntax.tex: Remove pointless repeats on <declarator-suffix>.
<primary-declarator>[k] is already a recursive definition, because of
the parentheses. Besides, if <declarator-suffix> was going to be shown
as repeatable, it should have a `+' rather than a `*', otherwise the
rule is directly recursive.
Mark Wooding [Tue, 17 Nov 2015 17:05:06 +0000 (17:05 +0000)]
doc/syntax.tex: Settle on <dotted-name> rather than <qualified-identifier>.
The document used both rather randomly. The former is shorter and
less pointlessly abstract.
Mark Wooding [Tue, 17 Nov 2015 17:03:06 +0000 (17:03 +0000)]
doc/syntax.tex: Allow `0' as an integer literal.
It's too short to be octal, and that's ugly anyway, so include it as a
strange decimal literal.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
doc/syntax.tex: Improve the syntax notation.
Rather than having a bunch of special rules, define the notational
extensions in terms of the parametrized nonterminals we have anyway for
declarators, and set that on a more formal footing.
I'm not quite sure how powerful this formalism is. I believe it's
strictly more powerful than context-free grammars, but I haven't decided
whether it's Turing-equivalent. It doesn't matter much here either way,
because the actual grammar is indeed context-free even if the formalism
is more expressive than that.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
doc/structures.tex: Fix section label.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
doc/structures.tex: Fix indentation error.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
STYLE: Minor tweakery.
Mark Wooding [Wed, 21 Oct 2015 23:46:28 +0000 (00:46 +0100)]
.gitignore: Ignore more TeX debris.