]> git.ozlabs.org Git - petitboot/commit
discover: Reimplement native-parser as a Bison parser
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 30 Oct 2018 04:26:04 +0000 (15:26 +1100)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Fri, 16 Nov 2018 02:55:13 +0000 (13:55 +1100)
commit646d77d8156ad72da1c24f734a029a525ba4bed9
tree8eaa5db080f5c2b733b506fd82eec773ac2afdb3
parent638f16c7683db165154bbe53772c4b864f9dc90d
discover: Reimplement native-parser as a Bison parser

Occasionally you look at some code and realise that a) this never gets
built, and b) even if it did it would never compile. Today's example is
native-parser.c which we must have just assumed worked for quite a
while.

The native parser has bitrotted entirely and needs to be brought up to
date. While we're here, lets take the chance to implement a proper
grammar for it. This helps us reason more effectively about the parser,
lets us extend it easily in the future, and.. I wanted to write a Bison
parser too.

This implements most of the old functionality, but drops off some
smaller details like settings icons which needs some separate attention
to bring up to date.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
14 files changed:
Makefile.am
discover/Makefile.am
discover/native-parser.c [deleted file]
discover/native/Makefile.am [new file with mode: 0644]
discover/native/native-lexer.l [new file with mode: 0644]
discover/native/native-parser.y [new file with mode: 0644]
discover/native/native.c [new file with mode: 0644]
discover/native/native.h [new file with mode: 0644]
test/parser/Makefile.am
test/parser/data/native-short.conf [new file with mode: 0644]
test/parser/test-native-globals.c [new file with mode: 0644]
test/parser/test-native-short.c [new file with mode: 0644]
test/parser/test-native-simple.c [new file with mode: 0644]
test/parser/test-native-strings.c [new file with mode: 0644]