Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#!/bin/sh
# This file:       (find-angg "bin/patch-lua-5.1.3")
#   newer version: (find-angg "bin/patch-lua-5.2")
# (find-es "lua5" "risclua")
# (find-es "lua5" "minimal_GCW_SUGAR")
# http://www.wra1th.plus.com/lua/book/rb04.html
# http://angg.twu.net/luaforth.html#GCW_SUGAR
# (find-TH "luaforth" "GCW_SUGAR")

# (find-lua51file "src/llex.c" "#ifdef GCW_SUGAR")
# (find-lua51file "src/llex.c.orig" "case '=':")
# (find-tkdiff (ee-lua51file "src/llex.c") (ee-lua51file "src/llex.c.orig"))

cp -iv src/llex.c src/llex.c.orig
patch -p0 src/llex.c <<'%%%'
370a371,376
> #ifdef GCW_SUGAR
>         switch(ls->current) {
>          case '=': next(ls); return TK_EQ; break;
>          case '>': next(ls); return TK_RETURN; break;
>          default: return '=';  } 
> #else
372a379
> #endif
373a381,386
> #ifdef GCW_SUGAR
>       case '\\': {
>         next(ls);
>         return TK_FUNCTION;
>         }
> #endif
%%%

# Pre-compile llex.c with GCW_SUGAR=1
# cd src; gcc -O2 -Wall -DLUA_USE_LINUX -DGCW_SUGAR -c -o llex.o llex.c; cd ..
# Instead:
# (find-lua51file "src/Makefile")

cp -iv src/Makefile src/Makefile.orig
patch -p0 src/Makefile <<'%%%'
11c11
< CFLAGS= -O2 -Wall $(MYCFLAGS)
---
> CFLAGS= -O2 -Wall $(MYCFLAGS) -g $(MYEXTRACFLAGS) -DGCW_SUGAR
%%%