GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — stepcode/src/express/ybreaks.py at develop · stepcode/stepcode

Expand file tree

/

ybreaks.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
20 lines (16 loc) · 653 Bytes
/

ybreaks.py

Copy path

File metadata and controls

executable file
·
20 lines (16 loc) · 653 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python3
# to use in your gdb session
# pi (enters the interactive python interpreter)
# import gdb
# f = open(r'../../ybreaks.txt')
# ybreaks = [gdb.Breakpoint(x.strip()) for x in f]
#
# note you'll also need to set the gdb source path to include the location of the grammar
# dir ../src/express
# dir ../src/express/generated
#
import re
y_line_re = re.compile(r'^#line\s(?P<lineno>[0-9]+)\s"expparse.y"')
with open(r'generated/expparse.c') as f, open(r'generated/ybreaks.txt', 'w+') as g:
ybreaks = ['expparse.y:%s' % y_line_re.match(l).group('lineno') for l in f if y_line_re.match(l)]
g.writelines(x + '\n' for x in ybreaks)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.