#!/usr/bin/env bash
-# Cycript - Optimizing JavaScript Compiler/Runtime
-# Copyright (C) 2009-2014 Jay Freeman (saurik)
+# Cycript - The Truly Universal Scripting Language
+# Copyright (C) 2009-2016 Jay Freeman (saurik)
# GNU Affero General Public License, Version 3 {{{
#
%define slot-name name_
%struct-type
-%omit-struct-type
%pic
+%delimiters="|"
+
struct CYBridgeEntry {
int name_;
const char *value_;
- void *cache_;
};
%%
EOF
-grep '^[CFV]' "$1" | sed -e 's/^C/0/;s/^F/1/;s/^V/2/' | sed -e 's/"/\\"/g;s/^\([^ ]*\) \([^ ]*\) \(.*\)$/\1\2, "\3", NULL/';
-grep '^[EST]' "$1" | sed -e 's/^S/3/;s/^T/4/;s/^E/5/' | sed -e 's/^5\(.*\)$/4\1 i/;s/"/\\"/g' | sed -e 's/^\([^ ]*\) \([^ ]*\) \(.*\)$/\1\2, "\3", NULL/';
+grep -v '^$'
cat <<EOF
%%