Skip to content

Commit

Permalink
Update for Csound 6.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nwhetsell committed Dec 24, 2017
1 parent fc0799d commit 5ec2eb9
Showing 1 changed file with 42 additions and 31 deletions.
73 changes: 42 additions & 31 deletions pygments/lexers/_csound_builtins.py
Expand Up @@ -7,32 +7,47 @@
:license: BSD, see LICENSE for details.
"""

# Opcodes in Csound 6.09.1 at commit 0815e64 from
# csound --list-opcodes3
# Opcodes in Csound 6.10.0 at commit 71eedf01f9c8db6c9fbfdd59888eb3d5ef52f7a0 using
# python -c "
# import re, subprocess
# output = subprocess.Popen(['csound', '--list-opcodes0'], stderr=subprocess.PIPE).communicate()[1]
# opcodes = output[re.search(r'^\d+ opcodes$', output, re.M).end():re.search(r'^Usage:', output, re.M).start()].split()
# output = subprocess.Popen(['csound', '--list-opcodes2'], stderr=subprocess.PIPE).communicate()[1]
# all_opcodes = output[re.search(r'^\d+ opcodes$', output, re.M).end():re.search(r'^Usage:', output, re.M).start()].split()
# deprecated_opcodes = [opcode for opcode in all_opcodes if opcode not in opcodes]
# print '''OPCODES = set(\'''
# {}
# \'''.split())
#
# DEPRECATED_OPCODES = set(\'''
# {}
# \'''.split())
# '''.format('\n'.join(opcodes), '\n'.join(deprecated_opcodes))
# "
# except for
# cggoto https://csound.github.io/docs/manual/cggoto.html
# cigoto https://csound.github.io/docs/manual/cigoto.html
# cggoto csound.com/docs/manual/cggoto.html
# cigoto csound.com/docs/manual/cigoto.html
# cingoto (undocumented)
# ckgoto https://csound.github.io/docs/manual/ckgoto.html
# cngoto https://csound.github.io/docs/manual/cngoto.html
# ckgoto csound.com/docs/manual/ckgoto.html
# cngoto csound.com/docs/manual/cngoto.html
# cnkgoto (undocumented)
# endin https://csound.github.io/docs/manual/endin.html
# endop https://csound.github.io/docs/manual/endop.html
# goto https://csound.github.io/docs/manual/goto.html
# igoto https://csound.github.io/docs/manual/igoto.html
# instr https://csound.github.io/docs/manual/instr.html
# kgoto https://csound.github.io/docs/manual/kgoto.html
# loop_ge https://csound.github.io/docs/manual/loop_ge.html
# loop_gt https://csound.github.io/docs/manual/loop_gt.html
# loop_le https://csound.github.io/docs/manual/loop_le.html
# loop_lt https://csound.github.io/docs/manual/loop_lt.html
# opcode https://csound.github.io/docs/manual/opcode.html
# reinit https://csound.github.io/docs/manual/reinit.html
# return https://csound.github.io/docs/manual/return.html
# rireturn https://csound.github.io/docs/manual/rireturn.html
# rigoto https://csound.github.io/docs/manual/rigoto.html
# tigoto https://csound.github.io/docs/manual/tigoto.html
# timout https://csound.github.io/docs/manual/timout.html
# endin csound.com/docs/manual/endin.html
# endop csound.com/docs/manual/endop.html
# goto csound.com/docs/manual/goto.html
# igoto csound.com/docs/manual/igoto.html
# instr csound.com/docs/manual/instr.html
# kgoto csound.com/docs/manual/kgoto.html
# loop_ge csound.com/docs/manual/loop_ge.html
# loop_gt csound.com/docs/manual/loop_gt.html
# loop_le csound.com/docs/manual/loop_le.html
# loop_lt csound.com/docs/manual/loop_lt.html
# opcode csound.com/docs/manual/opcode.html
# reinit csound.com/docs/manual/reinit.html
# return csound.com/docs/manual/return.html
# rireturn csound.com/docs/manual/rireturn.html
# rigoto csound.com/docs/manual/rigoto.html
# tigoto csound.com/docs/manual/tigoto.html
# timout csound.com/docs/manual/timout.html
# which are treated as keywords in csound.py.

OPCODES = set('''
Expand Down Expand Up @@ -138,12 +153,9 @@
MixerSetLevel
MixerSetLevel_i
OSCinit
OSCinitM
OSClisten
OSCraw
OSCsend
OSCsendA
OSCsend_lo
S
STKBandedWG
STKBeeThree
Expand Down Expand Up @@ -242,9 +254,11 @@
chnclear
chnexport
chnget
chngetks
chnmix
chnparams
chnset
chnsetks
chuap
clear
clfilt
Expand Down Expand Up @@ -821,6 +835,7 @@
midion
midion2
midiout
midiout_i
midipgm
midipitchbend
midipolyaftertouch
Expand Down Expand Up @@ -1302,6 +1317,7 @@
sprintfk
spsend
sqrt
squinewave
statevar
stix
strcat
Expand Down Expand Up @@ -1605,10 +1621,6 @@
lentab
maxtab
mintab
pop
pop_f
push
push_f
scalet
sndload
soundout
Expand All @@ -1622,7 +1634,6 @@
specscal
specsum
spectrum
stack
sumtab
tabgen
tabmap
Expand Down

0 comments on commit 5ec2eb9

Please sign in to comment.