aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ast
Commit message (Collapse)AuthorAgeFilesLines
* pkg/compiler: add builtin bool type aliasesDmitry Vyukov2018-01-081-2/+2
| | | | | | | | | | | | | | | | This adds builtin: type bool8 int8[0:1] type bool16 int16[0:1] type bool32 int32[0:1] type bool64 int64[0:1] type boolptr intptr[0:1] We used to use just int's for bools. But bool types provide several advantages: - make true/false probability equal - improve description expressiveness - reduce search space (we will take advantage of this later)
* sys: support type aliases (aka typedefs)Dmitry Vyukov2018-01-086-64/+107
| | | | | | | | | | | | | | | | | | | | | | Complex types that are often repeated can be given short type aliases using the following syntax: ``` type identifier underlying_type ``` For example: ``` type signalno int32[0:65] type net_port proc[20000, 4, int16be] ``` Then, type alias can be used instead of the underlying type in any contexts. Underlying type needs to be described as if it's a struct field, that is, with the base type if it's required. However, type alias can be used as syscall arguments as well. Underlying types are currently restricted to integer types, `ptr`, `ptr64`, `const`, `flags` and `proc` types.
* pkg/ast: fix TestParseAllDmitry Vyukov2017-10-191-10/+6
|
* executor, sys/windows: initial windows supportDmitry Vyukov2017-09-251-0/+3
|
* pkg/ast: prohibit empty stringsDmitry Vyukov2017-09-042-0/+12
| | | | This is currently unsupported and unused.
* pkg/ast: fix struct comment parsingDmitry Vyukov2017-09-042-0/+13
|
* pkg/compiler: check and generate typesDmitry Vyukov2017-09-022-10/+10
| | | | | | Move most of the logic from sysgen to pkg/compiler. Update #217
* pkg/compiler: more static error checkingDmitry Vyukov2017-08-277-103/+211
| | | | Update #217
* pkg/compiler: move more const-processing code to compilerDmitry Vyukov2017-08-273-67/+57
|
* pkg/compiler, sys/syz-sysgen: move const handling to pkg/compilerDmitry Vyukov2017-08-277-88/+312
| | | | Now pkg/compiler deals with consts.
* sys/syz-sysgen: switch to new parserDmitry Vyukov2017-08-182-3/+36
| | | | | For now we just generate the old structs from the new AST. But this allows to delete the old parser entirely.
* sys/syz-extract: switch to the new parserDmitry Vyukov2017-08-184-6/+116
|
* Makefile: enforce formatting of sys files in presubmitDmitry Vyukov2017-08-181-6/+4
|
* pkg/ast: new parser for sys descriptionsDmitry Vyukov2017-08-186-0/+1213
The old parser in sys/sysparser is too hacky, difficult to extend and drops debug info too early, so that we can't produce proper error messages. Add a new parser that is build like a proper language parser and preserves full debug info for every token.