[gnome-games/wip/exalm/mame: 1/4] mame: Make extract-supported-games preprocess the file more
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/mame: 1/4] mame: Make extract-supported-games preprocess the file more
- Date: Wed, 5 Feb 2020 21:36:48 +0000 (UTC)
commit 2481511f212669e3025c814222a98e90d9ea3f4e
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Feb 6 02:34:33 2020 +0500
mame: Make extract-supported-games preprocess the file more
Only leave id and name in. This will allow to drastically simplify and
speed up the parsing in the next commit.
plugins/mame/tools/extract-suported-games.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/plugins/mame/tools/extract-suported-games.sh b/plugins/mame/tools/extract-suported-games.sh
index 64493bd4..a6acf36f 100755
--- a/plugins/mame/tools/extract-suported-games.sh
+++ b/plugins/mame/tools/extract-suported-games.sh
@@ -3,4 +3,10 @@
# $1: path to the MAME repository
# $2: file name of the produced game database
-cat `find $1/src/mame/drivers -name "*.cpp" | sort` | egrep "^GAMEL?\(.*\)$" > $2
+simple=' *[^,]+ *'
+simpleg=' *([^,]+) *'
+quoted=' *" *(.*?) *" *'
+pattern="$simple,$simpleg,$simple,$simple,$simple,($simple,)?$simple,$simple,$quoted,$quoted,${simple}(${simple})?(,${simple})?"
+regex="^GAMEL?\(${pattern}\) *(//.*)?$"
+
+cat `find $1/src/mame/drivers -name "*.cpp" | sort` | egrep "^GAMEL?\(.*\)$" | sed -E "s|$regex|\1 \4|g" |
sed -E 's/^([^ ]+) +(.+)$/\1 \2/g' | sort > $2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]