Skip to content

Instantly share code, notes, and snippets.

View vrthra's full-sized avatar

Rahul Gopinath vrthra

View GitHub Profile
@vrthra
vrthra / gll.py
Created December 9, 2018 11:51 — forked from cheery/gll.py
GLL recognizer/parser
# A GLL recognizer with a twist.
# The parser builds up a list of reduction rules when it is parsing.
# Once sorted, the list can be used to build parse trees.
class GSS(object):
def __init__(self, label, index=0):
self.label = label
self.index = index
self.edges = set()
self.nodes = {}
@vrthra
vrthra / gdb.rb
Created October 15, 2017 13:06 — forked from martinlindhe/gdb.rb
For gdb to execute python3 script on OSX 10.10 or later
class UniversalBrewedPython < Requirement
satisfy { archs_for_command("python").universal? }
def message; <<-EOS.undent
A build of GDB using a brewed Python was requested, but Python is not
a universal build.
GDB requires Python to be built as a universal binary or it will fail
if attempting to debug a 32-bit binary on a 64-bit host.
EOS