├── .gitignore ├── README.md ├── scintilla ├── License.txt ├── README ├── bin │ └── empty.txt ├── cocoa │ ├── InfoBar.h │ ├── InfoBar.mm │ ├── InfoBarCommunicator.h │ ├── PlatCocoa.h │ ├── PlatCocoa.mm │ ├── QuartzTextLayout.h │ ├── QuartzTextStyle.h │ ├── QuartzTextStyleAttribute.h │ ├── ScintillaCallTip.h │ ├── ScintillaCallTip.mm │ ├── ScintillaCocoa.h │ ├── ScintillaCocoa.mm │ ├── ScintillaFramework │ │ ├── English.lproj │ │ │ └── InfoPlist.strings │ │ ├── Info.plist │ │ ├── ScintillaFramework.xcodeproj │ │ │ └── project.pbxproj │ │ └── Scintilla_Prefix.pch │ ├── ScintillaListBox.h │ ├── ScintillaListBox.mm │ ├── ScintillaTest │ │ ├── AppController.h │ │ ├── AppController.mm │ │ ├── English.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── MainMenu.xib │ │ ├── Info.plist │ │ ├── Scintilla-Info.plist │ │ ├── ScintillaTest.xcodeproj │ │ │ └── project.pbxproj │ │ ├── ScintillaTest_Prefix.pch │ │ ├── TestData.sql │ │ └── main.m │ ├── ScintillaView.h │ ├── ScintillaView.mm │ └── res │ │ ├── info_bar_bg.png │ │ ├── mac_cursor_busy.png │ │ └── mac_cursor_flipped.png ├── delbin.bat ├── delcvs.bat ├── doc │ ├── Design.html │ ├── Icons.html │ ├── Lexer.txt │ ├── SciBreak.jpg │ ├── SciCoding.html │ ├── SciRest.jpg │ ├── SciTEIco.png │ ├── SciWord.jpg │ ├── ScintillaDoc.html │ ├── ScintillaDownload.html │ ├── ScintillaHistory.html │ ├── ScintillaRelated.html │ ├── ScintillaToDo.html │ ├── ScintillaUsage.html │ ├── Steps.html │ ├── annotations.png │ ├── index.html │ └── styledmargin.png ├── gtk │ ├── Converter.h │ ├── PlatGTK.cxx │ ├── ScintillaGTK.cxx │ ├── deps.mak │ ├── makefile │ ├── scintilla-marshal.c │ ├── scintilla-marshal.h │ ├── scintilla-marshal.list │ └── scintilla.mak ├── include │ ├── Accessor.h │ ├── Face.py │ ├── HFacer.py │ ├── KeyWords.h │ ├── Platform.h │ ├── PropSet.h │ ├── SciLexer.h │ ├── Scintilla.h │ ├── Scintilla.iface │ ├── ScintillaWidget.h │ └── WindowAccessor.h ├── macosx │ ├── ExtInput.cxx │ ├── ExtInput.h │ ├── PlatMacOSX.cxx │ ├── PlatMacOSX.h │ ├── QuartzTextLayout.h │ ├── QuartzTextStyle.h │ ├── QuartzTextStyleAttribute.h │ ├── SciTest │ │ ├── English.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── main.nib │ │ │ │ ├── classes.nib │ │ │ │ ├── info.nib │ │ │ │ └── objects.xib │ │ ├── Info.plist │ │ ├── SciTest.xcode │ │ │ └── project.pbxproj │ │ ├── SciTest_Prefix.pch │ │ ├── main.cpp │ │ └── version.plist │ ├── ScintillaCallTip.cxx │ ├── ScintillaCallTip.h │ ├── ScintillaListBox.cxx │ ├── ScintillaListBox.h │ ├── ScintillaMacOSX.cxx │ ├── ScintillaMacOSX.h │ ├── TCarbonEvent.cxx │ ├── TCarbonEvent.h │ ├── TRect.h │ ├── TView.cxx │ ├── TView.h │ ├── deps.mak │ └── makefile ├── src │ ├── AutoComplete.cxx │ ├── AutoComplete.h │ ├── CallTip.cxx │ ├── CallTip.h │ ├── CellBuffer.cxx │ ├── CellBuffer.h │ ├── CharClassify.cxx │ ├── CharClassify.h │ ├── CharacterSet.h │ ├── ContractionState.cxx │ ├── ContractionState.h │ ├── Decoration.cxx │ ├── Decoration.h │ ├── Document.cxx │ ├── Document.h │ ├── DocumentAccessor.cxx │ ├── DocumentAccessor.h │ ├── Editor.cxx │ ├── Editor.h │ ├── ExternalLexer.cxx │ ├── ExternalLexer.h │ ├── FontQuality.h │ ├── Indicator.cxx │ ├── Indicator.h │ ├── KeyMap.cxx │ ├── KeyMap.h │ ├── KeyWords.cxx │ ├── LexAPDL.cxx │ ├── LexASY.cxx │ ├── LexAU3.cxx │ ├── LexAVE.cxx │ ├── LexAbaqus.cxx │ ├── LexAda.cxx │ ├── LexAsm.cxx │ ├── LexAsn1.cxx │ ├── LexBaan.cxx │ ├── LexBash.cxx │ ├── LexBasic.cxx │ ├── LexBullant.cxx │ ├── LexCLW.cxx │ ├── LexCOBOL.cxx │ ├── LexCPP.cxx │ ├── LexCSS.cxx │ ├── LexCaml.cxx │ ├── LexCmake.cxx │ ├── LexConf.cxx │ ├── LexCrontab.cxx │ ├── LexCsound.cxx │ ├── LexD.cxx │ ├── LexEScript.cxx │ ├── LexEiffel.cxx │ ├── LexErlang.cxx │ ├── LexFlagship.cxx │ ├── LexForth.cxx │ ├── LexFortran.cxx │ ├── LexGAP.cxx │ ├── LexGen.py │ ├── LexGui4Cli.cxx │ ├── LexHTML.cxx │ ├── LexHaskell.cxx │ ├── LexInno.cxx │ ├── LexKix.cxx │ ├── LexLPeg.cxx │ ├── LexLisp.cxx │ ├── LexLout.cxx │ ├── LexLua.cxx │ ├── LexMMIXAL.cxx │ ├── LexMPT.cxx │ ├── LexMSSQL.cxx │ ├── LexMagik.cxx │ ├── LexMarkdown.cxx │ ├── LexMatlab.cxx │ ├── LexMetapost.cxx │ ├── LexMySQL.cxx │ ├── LexNimrod.cxx │ ├── LexNsis.cxx │ ├── LexOpal.cxx │ ├── LexOthers.cxx │ ├── LexPB.cxx │ ├── LexPLM.cxx │ ├── LexPOV.cxx │ ├── LexPS.cxx │ ├── LexPascal.cxx │ ├── LexPerl.cxx │ ├── LexPowerPro.cxx │ ├── LexPowerShell.cxx │ ├── LexProgress.cxx │ ├── LexPython.cxx │ ├── LexR.cxx │ ├── LexRebol.cxx │ ├── LexRuby.cxx │ ├── LexSML.cxx │ ├── LexSQL.cxx │ ├── LexScriptol.cxx │ ├── LexSmalltalk.cxx │ ├── LexSorcus.cxx │ ├── LexSpecman.cxx │ ├── LexSpice.cxx │ ├── LexTACL.cxx │ ├── LexTADS3.cxx │ ├── LexTAL.cxx │ ├── LexTCL.cxx │ ├── LexTeX.cxx │ ├── LexVB.cxx │ ├── LexVHDL.cxx │ ├── LexVerilog.cxx │ ├── LexYAML.cxx │ ├── LineMarker.cxx │ ├── LineMarker.h │ ├── Partitioning.h │ ├── PerLine.cxx │ ├── PerLine.h │ ├── PositionCache.cxx │ ├── PositionCache.h │ ├── PropSet.cxx │ ├── PropSetSimple.h │ ├── RESearch.cxx │ ├── RESearch.h │ ├── RunStyles.cxx │ ├── RunStyles.h │ ├── SVector.h │ ├── SciTE.properties │ ├── ScintillaBase.cxx │ ├── ScintillaBase.h │ ├── Selection.cxx │ ├── Selection.h │ ├── SplitVector.h │ ├── Style.cxx │ ├── Style.h │ ├── StyleContext.cxx │ ├── StyleContext.h │ ├── UniConversion.cxx │ ├── UniConversion.h │ ├── ViewStyle.cxx │ ├── ViewStyle.h │ ├── WindowAccessor.cxx │ ├── XPM.cxx │ └── XPM.h ├── test │ ├── MessageNumbers.py │ ├── README │ ├── XiteMenu.py │ ├── XiteWin.py │ ├── examples │ │ ├── x.asp │ │ ├── x.asp.styled │ │ ├── x.cxx │ │ ├── x.cxx.styled │ │ ├── x.d │ │ ├── x.d.styled │ │ ├── x.html │ │ ├── x.html.styled │ │ ├── x.php │ │ ├── x.php.styled │ │ ├── x.py │ │ ├── x.py.styled │ │ ├── x.vb │ │ └── x.vb.styled │ ├── lexTests.py │ ├── performanceTests.py │ ├── simpleTests.py │ └── xite.py ├── tgzsrc ├── vcbuild │ └── SciLexer.dsp ├── version.txt ├── win32 │ ├── .cvsignore │ ├── Margin.cur │ ├── PlatWin.cxx │ ├── PlatformRes.h │ ├── SciTE.properties │ ├── ScintRes.rc │ ├── Scintilla.def │ ├── ScintillaWin.cxx │ ├── deps.mak │ ├── makefile │ ├── scintilla.mak │ └── scintilla_vc6.mak └── zipsrc.bat ├── scintillua ├── LICENSE ├── README └── scintillua.patch └── scite ├── License.txt ├── README ├── bin └── empty.txt ├── boundscheck ├── SciTE.dsp ├── SciTE.sln ├── SciTE.vcproj └── vcproj.gen ├── custom ├── SciTEGlobal.properties ├── lexers │ ├── Io.lua │ ├── actionscript.lua │ ├── ada.lua │ ├── antlr.lua │ ├── apacheconf.lua │ ├── apdl.lua │ ├── applescript.lua │ ├── asp.lua │ ├── awk.lua │ ├── b.lua │ ├── bash.lua │ ├── batch.lua │ ├── boo.lua │ ├── container.lua │ ├── cpp.lua │ ├── csharp.lua │ ├── css.lua │ ├── diff.lua │ ├── django.lua │ ├── dmd.lua │ ├── dot.lua │ ├── eiffel.lua │ ├── erlang.lua │ ├── errorlist.lua │ ├── forth.lua │ ├── fortran.lua │ ├── gap.lua │ ├── gettext.lua │ ├── gnuplot.lua │ ├── groovy.lua │ ├── haskell.lua │ ├── hypertext.lua │ ├── idl.lua │ ├── ini.lua │ ├── java.lua │ ├── javascript.lua │ ├── json.lua │ ├── latex.lua │ ├── lexer.lua │ ├── lisp.lua │ ├── lua.lua │ ├── makefile.lua │ ├── maxima.lua │ ├── null.lua │ ├── objective_c.lua │ ├── ocaml.lua │ ├── pascal.lua │ ├── perl.lua │ ├── php.lua │ ├── pike.lua │ ├── pkgbuild.lua │ ├── postscript.lua │ ├── props.lua │ ├── python.lua │ ├── r.lua │ ├── ragel.lua │ ├── rebol.lua │ ├── rexx.lua │ ├── rhtml.lua │ ├── ruby.lua │ ├── scheme.lua │ ├── smalltalk.lua │ ├── sql.lua │ ├── tcl.lua │ ├── template.txt │ ├── tex.lua │ ├── themes │ │ ├── dark.lua │ │ ├── light.lua │ │ └── scite.lua │ ├── vala.lua │ ├── vb.lua │ ├── vbscript.lua │ ├── verilog.lua │ ├── vhdl.lua │ └── xml.lua ├── scite-debug │ ├── SciTE.lib │ ├── SciTEIco.png │ ├── cpp.png │ ├── doc.css │ ├── documentation.html │ ├── extman.html │ ├── extman.lua │ ├── lua_clidebugger │ │ ├── clidebug.lua │ │ ├── dbgl.c │ │ ├── dbgl.dll │ │ ├── dbgl.so │ │ └── debugger.lua │ ├── makefile │ ├── makefile.win32 │ ├── remDebug │ │ ├── controller.lua │ │ ├── remdebug.lua │ │ └── remdebug │ │ │ └── engine.lua │ ├── scite-debug.png │ ├── scite.def │ ├── scite.la │ ├── scite_lua │ │ ├── _examples │ │ │ ├── bit.luax │ │ │ ├── borland.lua │ │ │ ├── macro.lua │ │ │ ├── prompt.lua │ │ │ ├── scrunch.lua │ │ │ └── select_block.lua │ │ ├── _unused │ │ │ ├── other.lua │ │ │ ├── select_string.lua │ │ │ ├── smartpaste.lua │ │ │ ├── switch_buffers.lua │ │ │ └── tie.lua │ │ ├── class.lua │ │ ├── code.lua │ │ ├── ctagsdx.lua │ │ ├── debug │ │ │ ├── clidebug.cmd │ │ │ ├── clidebugger.lua │ │ │ ├── debugger.lua │ │ │ ├── gdb.lua │ │ │ ├── jdb.lua │ │ │ ├── luagdb.lua │ │ │ ├── mdb.lua │ │ │ ├── pydb.lua │ │ │ └── remdebug.lua │ │ ├── extlib.lua │ │ ├── micromode.lua │ │ └── switch_headers.lua │ ├── spawner-ex.dll │ ├── stubby.c │ ├── stubby.dll │ ├── stubby.so │ ├── tests │ │ ├── lfs.c │ │ ├── lfs.def │ │ ├── lfs.h │ │ ├── smart.lua │ │ ├── test1.cpp │ │ ├── test1.py │ │ ├── test2.lua │ │ ├── test3.c │ │ ├── test3.lua │ │ ├── test4.lua │ │ ├── testdir │ │ │ └── assert.lua │ │ ├── testlfs.lua │ │ └── testlua.lua │ ├── trace.lua │ ├── unix-spawner-ex.c │ ├── unix-spawner-ex.so │ ├── win32-spawner-ex.c │ └── xpdb.py └── scripts │ ├── README.txt │ ├── c │ └── c.api │ ├── doc │ ├── keys_doc.txt │ ├── luadoc │ │ ├── files │ │ │ ├── html │ │ │ │ ├── commands.html │ │ │ │ ├── html.html │ │ │ │ └── snippets.html │ │ │ ├── lua │ │ │ │ ├── commands.html │ │ │ │ ├── lua.html │ │ │ │ └── snippets.html │ │ │ ├── php │ │ │ │ ├── commands.html │ │ │ │ ├── php.html │ │ │ │ └── snippets.html │ │ │ ├── ruby │ │ │ │ ├── commands.html │ │ │ │ ├── ruby.html │ │ │ │ └── snippets.html │ │ │ ├── scite │ │ │ │ ├── cdialog.html │ │ │ │ ├── decoder.html │ │ │ │ ├── editing.html │ │ │ │ ├── file_browser.html │ │ │ │ ├── filter_through.html │ │ │ │ ├── functions.html │ │ │ │ ├── key_commands.html │ │ │ │ ├── keys.html │ │ │ │ ├── macros.html │ │ │ │ ├── mlines.html │ │ │ │ ├── scite.html │ │ │ │ └── snippets.html │ │ │ ├── terminal │ │ │ │ ├── commands.html │ │ │ │ └── terminal.html │ │ │ └── utils │ │ │ │ └── test_snippets.html │ │ ├── index.html │ │ ├── luadoc.css │ │ └── modules │ │ │ ├── modules.html.commands.html │ │ │ ├── modules.html.html │ │ │ ├── modules.html.snippets.html │ │ │ ├── modules.lua.commands.html │ │ │ ├── modules.lua.html │ │ │ ├── modules.lua.snippets.html │ │ │ ├── modules.php.commands.html │ │ │ ├── modules.php.html │ │ │ ├── modules.php.snippets.html │ │ │ ├── modules.ruby.commands.html │ │ │ ├── modules.ruby.html │ │ │ ├── modules.ruby.snippets.html │ │ │ ├── modules.scite.cdialog.html │ │ │ ├── modules.scite.editing.html │ │ │ ├── modules.scite.filebrowser.html │ │ │ ├── modules.scite.functions.html │ │ │ ├── modules.scite.html │ │ │ ├── modules.scite.keys.html │ │ │ ├── modules.scite.macros.html │ │ │ ├── modules.scite.mlines.html │ │ │ ├── modules.scite.snippets.html │ │ │ ├── modules.terminal.commands.html │ │ │ └── modules.terminal.html │ ├── modules_doc.txt │ └── snippets_doc.txt │ ├── html │ ├── commands.lua │ ├── html.lua │ └── snippets.lua │ ├── lua │ ├── commands.lua │ ├── lua.lua │ ├── lua5.api │ ├── snippets.lua │ └── wxlua.api │ ├── php │ ├── commands.lua │ ├── php.lua │ └── snippets.lua │ ├── pm │ └── file_browser.lua │ ├── ruby │ ├── commands.lua │ ├── ruby.api │ ├── ruby.lua │ └── snippets.lua │ ├── scite │ ├── decoder.lua │ ├── editing.lua │ ├── file_browser.lua │ ├── functions.lua │ ├── key_commands.lua │ ├── keys.lua │ ├── mlines.lua │ ├── scite.api │ ├── scite.lua │ └── snippets.lua │ ├── terminal │ ├── commands.lua │ └── terminal.lua │ └── utils │ ├── gen_ruby_api.rb │ ├── shell.rb │ └── test_snippets.lua ├── delbin.bat ├── delcvs.bat ├── doc ├── CommandValues.html ├── PrintHi.png ├── SciBreak2.jpg ├── SciTE.html ├── SciTEDirector.html ├── SciTEDoc.html ├── SciTEDownload.html ├── SciTEExtension.html ├── SciTEExternalLexer.html ├── SciTEExtras.html ├── SciTEFAQ.html ├── SciTEIco.png ├── SciTEImage.html ├── SciTELexer.html ├── SciTELua.html ├── SciTERegEx.html ├── SciTEWord.jpg ├── ScriptLexer.html ├── demo.png └── scite.1 ├── gtk ├── DirectorExtension.cxx ├── DirectorExtension.h ├── GTKMutex.cxx ├── GUIGTK.cxx ├── Sci48M.png ├── SciIcon.h ├── SciTE.desktop ├── SciTEGTK.cxx ├── deps.mak ├── lua.vers ├── makefile └── pixmapsGNOME.h ├── scripts ├── CheckMentioned.py ├── CheckPropsDoc.py ├── IFaceTableGen.py ├── ba ├── ba.bat ├── checkbuilds.bat ├── clearboth.bat ├── commandsdoc.py ├── makerpms.py ├── scite.spec └── tags2api.py ├── src ├── Embedded.properties ├── Exporters.cxx ├── Extender.h ├── FilePath.cxx ├── FilePath.h ├── GUI.h ├── IFaceTable.cxx ├── IFaceTable.h ├── JobQueue.cxx ├── JobQueue.h ├── LuaExtension.cxx ├── LuaExtension.h ├── MultiplexExtension.cxx ├── MultiplexExtension.h ├── Mutex.h ├── PropSetFile.cxx ├── PropSetFile.h ├── SString.h ├── SciTE.h ├── SciTE.properties ├── SciTEBase.cxx ├── SciTEBase.cxx.orig ├── SciTEBase.h ├── SciTEBuffers.cxx ├── SciTEGlobal.properties ├── SciTEIO.cxx ├── SciTEKeys.h ├── SciTEProps.cxx ├── StringList.cxx ├── StringList.h ├── StyleWriter.cxx ├── StyleWriter.h ├── Utf8_16.cxx ├── Utf8_16.h ├── abaqus.properties ├── abbrev.properties ├── ada.properties ├── asm.properties ├── asn1.properties ├── au3.properties ├── ave.properties ├── baan.properties ├── blitzbasic.properties ├── bullant.properties ├── caml.properties ├── cmake.properties ├── cobol.properties ├── conf.properties ├── cpp.properties ├── csound.properties ├── css.properties ├── d.properties ├── eiffel.properties ├── erlang.properties ├── escript.properties ├── flagship.properties ├── forth.properties ├── fortran.properties ├── freebasic.properties ├── gap.properties ├── html.properties ├── inno.properties ├── kix.properties ├── latex.properties ├── lisp.properties ├── lot.properties ├── lout.properties ├── lua.properties ├── matlab.properties ├── metapost.properties ├── mmixal.properties ├── nimrod.properties ├── nncrontab.properties ├── nsis.properties ├── opal.properties ├── others.properties ├── pascal.properties ├── perl.properties ├── pov.properties ├── powerpro.properties ├── powershell.properties ├── ps.properties ├── purebasic.properties ├── python.properties ├── r.properties ├── rebol.properties ├── ruby.properties ├── scriptol.properties ├── smalltalk.properties ├── sorcins.properties ├── specman.properties ├── spice.properties ├── sql.properties ├── tacl.properties ├── tal.properties ├── tcl.properties ├── tex.properties ├── vb.properties ├── verilog.properties ├── vhdl.properties └── yaml.properties ├── tgzgscite ├── tgzsrc ├── upxsc1.bat ├── vcbuild └── SciTE.dsp ├── win32 ├── DirectorExtension.cxx ├── DirectorExtension.h ├── DragDrop.cur ├── GUIWin.cxx ├── SciBall.ico ├── SciTE.exe.manifest ├── SciTERes.rc ├── SciTEWin.cxx ├── SciTEWin.h ├── SciTEWinBar.cxx ├── SciTEWinDlg.cxx ├── SingleThreadExtension.cxx ├── SingleThreadExtension.h ├── UniqueInstance.cxx ├── UniqueInstance.h ├── WinMutex.cxx ├── closefile.bmp ├── deps.mak ├── locale.properties ├── makefile └── scite.mak ├── zipsrc.bat ├── zipwscite.bat └── zipwscited.bat /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.a 3 | scite/bin/* 4 | -------------------------------------------------------------------------------- /scintilla/License.txt: -------------------------------------------------------------------------------- 1 | License for Scintilla and SciTE 2 | 3 | Copyright 1998-2003 by Neil Hodgson 4 | 5 | All Rights Reserved 6 | 7 | Permission to use, copy, modify, and distribute this software and its 8 | documentation for any purpose and without fee is hereby granted, 9 | provided that the above copyright notice appear in all copies and that 10 | both that copyright notice and this permission notice appear in 11 | supporting documentation. 12 | 13 | NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 14 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 15 | AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY 16 | SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 18 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE 20 | OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- /scintilla/bin/empty.txt: -------------------------------------------------------------------------------- 1 | This empty files ensures that the directory is created. -------------------------------------------------------------------------------- /scintilla/cocoa/InfoBar.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Scintilla source code edit control 4 | * InfoBar.h - Implements special info bar with zoom info, caret position etc. to be used with 5 | * ScintillaView. 6 | * 7 | * Mike Lischke 8 | * 9 | * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 10 | * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). 11 | */ 12 | 13 | #import 14 | #import "InfoBarCommunicator.h" 15 | 16 | /** 17 | * Extended text cell for vertically aligned text. 18 | */ 19 | @interface VerticallyCenteredTextFieldCell : NSTextFieldCell 20 | { 21 | BOOL mIsEditingOrSelecting; 22 | } 23 | 24 | @end 25 | 26 | @interface InfoBar : NSView 27 | { 28 | @private 29 | NSImage* mBackground; 30 | IBDisplay mDisplayMask; 31 | 32 | float mScaleFactor; 33 | NSPopUpButton* mZoomPopup; 34 | 35 | int mCurrentCaretX; 36 | int mCurrentCaretY; 37 | NSTextField* mCaretPositionLabel; 38 | NSTextField* mStatusTextLabel; 39 | 40 | id mCallback; 41 | } 42 | 43 | - (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location 44 | value: (float) value; 45 | - (void) setCallback: (id ) callback; 46 | 47 | - (void) createItems; 48 | - (void) layout; 49 | - (void) setDisplay: (IBDisplay) display; 50 | - (void) zoomItemAction: (id) sender; 51 | - (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag; 52 | - (void) setCaretPosition: (NSPoint) position; 53 | - (void) sizeToFit; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /scintilla/cocoa/InfoBarCommunicator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * InfoBarCommunicator.h - Definitions of a communication protocol and other data types used for 3 | * the info bar implementation. 4 | * 5 | * Mike Lischke 6 | * 7 | * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 8 | * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). 9 | */ 10 | 11 | enum IBDisplay { 12 | IBShowZoom = 0x01, 13 | IBShowCaretPosition = 0x02, 14 | IBShowStatusText = 0x04, 15 | IBShowAll = 0xFF 16 | }; 17 | 18 | /** 19 | * The info bar communicator protocol is used for communication between ScintillaView and its 20 | * information bar component. Using this protocol decouples any potential info target from the main 21 | * ScintillaView implementation. The protocol is used two-way. 22 | */ 23 | 24 | enum NotificationType { 25 | IBNZoomChanged, // The user selected another zoom value. 26 | IBNCaretChanged, // The caret in the editor changed. 27 | IBNStatusChanged, // The application set a new status message. 28 | }; 29 | 30 | @protocol InfoBarCommunicator 31 | - (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location 32 | value: (float) value; 33 | - (void) setCallback: (id ) callback; 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /scintilla/cocoa/ScintillaCallTip.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ScintillaMacOSX.h 3 | * tutorial 4 | * 5 | * Created by Evan Jones on Sun Sep 01 2002. 6 | * 7 | */ 8 | #ifndef SCINTILLA_CALLTIP_H 9 | #define SCINTILLA_CALLTIP_H 10 | 11 | #include "TView.h" 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include "Platform.h" 20 | #include "Scintilla.h" 21 | 22 | static const OSType scintillaCallTipType = 'Scct'; 23 | 24 | namespace Scintilla { 25 | 26 | class ScintillaCallTip : public TView 27 | { 28 | public: 29 | // Private so ScintillaCallTip objects can not be copied 30 | ScintillaCallTip(const ScintillaCallTip &) : TView( NULL ) {} 31 | ScintillaCallTip &operator=(const ScintillaCallTip &) { return * this; } 32 | ~ScintillaCallTip() {}; 33 | 34 | public: 35 | /** This is the class ID that we've assigned to Scintilla. */ 36 | static const CFStringRef kScintillaCallTipClassID; 37 | static const ControlKind kScintillaCallTipKind; 38 | 39 | ScintillaCallTip( void* windowid ); 40 | 41 | /** Returns the HIView object kind, needed to subclass TView. */ 42 | virtual ControlKind GetKind() { return kScintillaCallTipKind; } 43 | 44 | private: 45 | 46 | virtual ControlPartCode HitTest( const HIPoint& where ); 47 | virtual void Draw( RgnHandle rgn, CGContextRef gc ); 48 | virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount ); 49 | virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount ); 50 | virtual OSStatus MouseDragged( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount ); 51 | 52 | public: 53 | static HIViewRef Create(); 54 | private: 55 | static OSStatus Construct( HIViewRef inControl, TView** outView ); 56 | 57 | }; 58 | 59 | 60 | } 61 | 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /scintilla/cocoa/ScintillaFramework/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/cocoa/ScintillaFramework/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /scintilla/cocoa/ScintillaFramework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.sun.${PRODUCT_NAME:identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /scintilla/cocoa/ScintillaFramework/Scintilla_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Scintilla' target in the 'Scintilla' project. 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /scintilla/cocoa/ScintillaListBox.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * ScintillaMacOSX.h 4 | * tutorial 5 | * 6 | * Created by Evan Jones on Sun Sep 01 2002. 7 | * 8 | */ 9 | 10 | #ifndef SCINTILLA_LISTBOX_H 11 | #define SCINTILLA_LISTBOX_H 12 | 13 | #include "TView.h" 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #include "Platform.h" 22 | #include "Scintilla.h" 23 | 24 | static const OSType scintillaListBoxType = 'sclb'; 25 | 26 | namespace Scintilla { 27 | 28 | class ScintillaListBox : public TView 29 | { 30 | public: 31 | // Private so ScintillaListBox objects can not be copied 32 | ScintillaListBox(const ScintillaListBox &) : TView( NULL ) {} 33 | ScintillaListBox &operator=(const ScintillaListBox &) { return * this; } 34 | ~ScintillaListBox() {}; 35 | 36 | public: 37 | /** This is the class ID that we've assigned to Scintilla. */ 38 | static const CFStringRef kScintillaListBoxClassID; 39 | static const ControlKind kScintillaListBoxKind; 40 | 41 | ScintillaListBox( void* windowid ); 42 | 43 | /** Returns the HIView object kind, needed to subclass TView. */ 44 | virtual ControlKind GetKind() { return kScintillaListBoxKind; } 45 | 46 | private: 47 | 48 | virtual ControlPartCode HitTest( const HIPoint& where ); 49 | virtual void Draw( RgnHandle rgn, CGContextRef gc ); 50 | virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount ); 51 | virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount ); 52 | 53 | public: 54 | static HIViewRef Create(); 55 | private: 56 | static OSStatus Construct( HIViewRef inControl, TView** outView ); 57 | 58 | }; 59 | 60 | 61 | } 62 | 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /scintilla/cocoa/ScintillaTest/AppController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * AppController.h 3 | * SciTest 4 | * 5 | * Created by Mike Lischke on 01.04.09. 6 | * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 7 | * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). 8 | */ 9 | 10 | #import 11 | 12 | #import "ScintillaView.h" 13 | #import "InfoBar.h" 14 | 15 | @interface AppController : NSObject { 16 | IBOutlet NSBox *mEditHost; 17 | ScintillaView* mEditor; 18 | } 19 | 20 | - (void) awakeFromNib; 21 | - (void) setupEditor; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /scintilla/cocoa/ScintillaTest/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/cocoa/ScintillaTest/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /scintilla/cocoa/ScintillaTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.sun.${PRODUCT_NAME:identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /scintilla/cocoa/ScintillaTest/Scintilla-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.sun.${PRODUCT_NAME:identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /scintilla/cocoa/ScintillaTest/ScintillaTest_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ScintillaTest' target in the 'ScintillaTest' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /scintilla/cocoa/ScintillaTest/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * main.m 3 | * ScintillaTest 4 | * 5 | * Created by Mike Lischke on 02.04.09. 6 | * Copyright Sun Microsystems, Inc 2009. All rights reserved. 7 | * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). 8 | */ 9 | 10 | #import 11 | 12 | int main(int argc, char *argv[]) 13 | { 14 | return NSApplicationMain(argc, (const char **) argv); 15 | } 16 | -------------------------------------------------------------------------------- /scintilla/cocoa/res/info_bar_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/cocoa/res/info_bar_bg.png -------------------------------------------------------------------------------- /scintilla/cocoa/res/mac_cursor_busy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/cocoa/res/mac_cursor_busy.png -------------------------------------------------------------------------------- /scintilla/cocoa/res/mac_cursor_flipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/cocoa/res/mac_cursor_flipped.png -------------------------------------------------------------------------------- /scintilla/delbin.bat: -------------------------------------------------------------------------------- 1 | del /S /Q *.a *.aps *.bsc *.dll *.dsw *.exe *.idb *.ilc *.ild *.ilf *.ilk *.ils *.lib *.map *.ncb *.obj *.o *.opt *.pdb *.plg *.res *.sbr *.tds *.exp >NUL: 2 | -------------------------------------------------------------------------------- /scintilla/delcvs.bat: -------------------------------------------------------------------------------- 1 | del /S /Q .cvsignore 2 | -------------------------------------------------------------------------------- /scintilla/doc/Icons.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Scintilla icons 11 | 12 | 13 | 14 | 15 | 16 | 19 | 23 | 24 |
17 | Scintilla icon 18 | 20 | Scintilla 21 | and SciTE 22 |
25 |

26 | Icons 27 |

28 |

29 | These images may be used under the same license as Scintilla. 30 |

31 |

32 | Drawn by Iago Rubio, Philippe Lhoste, and Neil Hodgson. 33 |

34 |

35 | zip format (70K) 36 |

37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
For autocompletion listsFor margin markers
12x1216x1624x2432x32
55 | 56 | 57 | -------------------------------------------------------------------------------- /scintilla/doc/SciBreak.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/doc/SciBreak.jpg -------------------------------------------------------------------------------- /scintilla/doc/SciRest.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/doc/SciRest.jpg -------------------------------------------------------------------------------- /scintilla/doc/SciTEIco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/doc/SciTEIco.png -------------------------------------------------------------------------------- /scintilla/doc/SciWord.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/doc/SciWord.jpg -------------------------------------------------------------------------------- /scintilla/doc/annotations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/doc/annotations.png -------------------------------------------------------------------------------- /scintilla/doc/styledmargin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/doc/styledmargin.png -------------------------------------------------------------------------------- /scintilla/gtk/PlatGTK.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/gtk/PlatGTK.cxx -------------------------------------------------------------------------------- /scintilla/gtk/scintilla-marshal.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __scintilla_marshal_MARSHAL_H__ 3 | #define __scintilla_marshal_MARSHAL_H__ 4 | 5 | #include 6 | 7 | G_BEGIN_DECLS 8 | 9 | /* NONE:INT,POINTER (scintilla-marshal.list:1) */ 10 | extern void scintilla_marshal_VOID__INT_POINTER (GClosure *closure, 11 | GValue *return_value, 12 | guint n_param_values, 13 | const GValue *param_values, 14 | gpointer invocation_hint, 15 | gpointer marshal_data); 16 | #define scintilla_marshal_NONE__INT_POINTER scintilla_marshal_VOID__INT_POINTER 17 | 18 | G_END_DECLS 19 | 20 | #endif /* __scintilla_marshal_MARSHAL_H__ */ 21 | 22 | -------------------------------------------------------------------------------- /scintilla/gtk/scintilla-marshal.list: -------------------------------------------------------------------------------- 1 | NONE:INT,POINTER 2 | -------------------------------------------------------------------------------- /scintilla/include/PropSet.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file PropSet.h 3 | ** An interface to the methods needed for access to property sets inside lexers. 4 | **/ 5 | // Copyright 1998-2009 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef PROPSET_H 9 | #define PROPSET_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | class PropertyGet { 16 | public: 17 | virtual char *ToString() const=0; // Caller must delete[] the return value 18 | virtual int GetInt(const char *key, int defaultValue=0) const=0; 19 | virtual ~PropertyGet() {} 20 | }; 21 | 22 | #ifdef SCI_NAMESPACE 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /scintilla/include/SciLexer.h: -------------------------------------------------------------------------------- 1 | /* Scintilla source code edit control */ 2 | /** @file SciLexer.h 3 | ** Interface to the added lexer functions in the SciLexer version of the edit control. 4 | **/ 5 | /* Copyright 1998-2002 by Neil Hodgson 6 | * The License.txt file describes the conditions under which this software may be distributed. */ 7 | 8 | /* Most of this file is automatically generated from the Scintilla.iface interface definition 9 | * file which contains any comments about the definitions. HFacer.py does the generation. */ 10 | 11 | #ifndef SCILEXER_H 12 | #define SCILEXER_H 13 | 14 | /* SciLexer features - not in standard Scintilla */ 15 | 16 | // modified by Mitchell 17 | /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ 18 | #define SCLEX_CONTAINER 0 19 | #define SCLEX_NULL 1 20 | #define SCLEX_LPEG 2 21 | #define SCLEX_AUTOMATIC 1000 22 | /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ 23 | // end modified by Mitchell 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /scintilla/include/ScintillaWidget.h: -------------------------------------------------------------------------------- 1 | /* Scintilla source code edit control */ 2 | /** @file ScintillaWidget.h 3 | ** Definition of Scintilla widget for GTK+. 4 | ** Only needed by GTK+ code but is harmless on other platforms. 5 | **/ 6 | /* Copyright 1998-2001 by Neil Hodgson 7 | * The License.txt file describes the conditions under which this software may be distributed. */ 8 | 9 | #ifndef SCINTILLAWIDGET_H 10 | #define SCINTILLAWIDGET_H 11 | 12 | #if defined(GTK) 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) 19 | #define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass) 20 | #define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) 21 | 22 | typedef struct _ScintillaObject ScintillaObject; 23 | typedef struct _ScintillaClass ScintillaClass; 24 | 25 | struct _ScintillaObject { 26 | GtkContainer cont; 27 | void *pscin; 28 | }; 29 | 30 | struct _ScintillaClass { 31 | GtkContainerClass parent_class; 32 | 33 | void (* command) (ScintillaObject *ttt); 34 | void (* notify) (ScintillaObject *ttt); 35 | }; 36 | 37 | GType scintilla_get_type (void); 38 | GtkWidget* scintilla_new (void); 39 | void scintilla_set_id (ScintillaObject *sci, uptr_t id); 40 | sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam); 41 | void scintilla_release_resources(void); 42 | 43 | #define SCINTILLA_NOTIFY "sci-notify" 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /scintilla/include/WindowAccessor.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file WindowAccessor.h 3 | ** Implementation of BufferAccess and StylingAccess on a Scintilla 4 | ** rapid easy access to contents of a Scintilla. 5 | **/ 6 | // Copyright 1998-2001 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifdef SCI_NAMESPACE 10 | namespace Scintilla { 11 | #endif 12 | 13 | /** 14 | */ 15 | 16 | class WindowAccessor : public Accessor { 17 | // Private so WindowAccessor objects can not be copied 18 | WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {} 19 | WindowAccessor &operator=(const WindowAccessor &) { return *this; } 20 | protected: 21 | WindowID id; 22 | PropertyGet &props; 23 | int lenDoc; 24 | 25 | char styleBuf[bufferSize]; 26 | int validLen; 27 | char chFlags; 28 | char chWhile; 29 | unsigned int startSeg; 30 | 31 | bool InternalIsLeadByte(char ch); 32 | void Fill(int position); 33 | public: 34 | WindowAccessor(WindowID id_, PropertyGet &props_) : 35 | Accessor(), id(id_), props(props_), 36 | lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { 37 | } 38 | ~WindowAccessor(); 39 | bool Match(int pos, const char *s); 40 | char StyleAt(int position); 41 | int GetLine(int position); 42 | int LineStart(int line); 43 | int LevelAt(int line); 44 | int Length(); 45 | void Flush(); 46 | int GetLineState(int line); 47 | int SetLineState(int line, int state); 48 | int GetPropertyInt(const char *key, int defaultValue=0) { 49 | return props.GetInt(key, defaultValue); 50 | } 51 | char *GetProperties() { 52 | return props.ToString(); 53 | } 54 | 55 | void StartAt(unsigned int start, char chMask=31); 56 | void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; 57 | unsigned int GetStartSegment() { return startSeg; } 58 | void StartSegment(unsigned int pos); 59 | void ColourTo(unsigned int pos, int chAttr); 60 | void SetLevel(int line, int level); 61 | int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); 62 | void IndicatorFill(int start, int end, int indicator, int value); 63 | }; 64 | 65 | #ifdef SCI_NAMESPACE 66 | } 67 | #endif 68 | -------------------------------------------------------------------------------- /scintilla/macosx/ExtInput.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | 3 | Copyright (c) 2007 Adobe Systems Incorporated 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | ********************************************************************************/ 23 | 24 | #ifndef _ExtInput_h 25 | #define _ExtInput_h 26 | 27 | #include 28 | #include "Scintilla.h" 29 | 30 | namespace Scintilla 31 | { 32 | 33 | /** 34 | The ExtInput class provides TSM input services to Scintilla. 35 | It uses the indicators 0 and 1 (see SCI_INDICSETSTYLE) to apply 36 | underlines to partially converted text. 37 | */ 38 | 39 | class ExtInput 40 | { 41 | public: 42 | /** 43 | Attach extended input to a HIView with attached Scintilla. This installs the needed 44 | event handlers etc. 45 | */ 46 | static void attach (HIViewRef ref); 47 | /** 48 | Detach extended input from a HIViewwith attached Scintilla. 49 | */ 50 | static void detach (HIViewRef ref); 51 | /** 52 | Activate or deactivate extended input. This method should be called whenever 53 | the view gains or loses focus. 54 | */ 55 | static void activate (HIViewRef ref, bool on); 56 | /** 57 | Terminate extended input. 58 | */ 59 | static void stop (HIViewRef ref); 60 | }; 61 | 62 | } // end namespace 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /scintilla/macosx/SciTest/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/macosx/SciTest/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /scintilla/macosx/SciTest/English.lproj/main.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = (); 3 | IBVersion = 1; 4 | } 5 | -------------------------------------------------------------------------------- /scintilla/macosx/SciTest/English.lproj/main.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBFramework Version 6 | 345.0 7 | IBOldestOS 8 | 3 9 | IBOpenObjects 10 | 11 | 29 12 | 166 13 | 14 | IBSystem Version 15 | 7B44 16 | targetFramework 17 | IBCarbonFramework 18 | 19 | 20 | -------------------------------------------------------------------------------- /scintilla/macosx/SciTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | SciTest 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.apple.myCarbonApp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | APPL 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | CSResourcesFileMapped 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /scintilla/macosx/SciTest/SciTest_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SciTest' target in the 'SciTest' project. 3 | // 4 | 5 | #include 6 | -------------------------------------------------------------------------------- /scintilla/macosx/SciTest/version.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildVersion 6 | 92 7 | CFBundleVersion 8 | 1.0 9 | ProductBuildVersion 10 | 7K571 11 | ProjectName 12 | NibPBTemplates 13 | SourceVersion 14 | 1200000 15 | 16 | 17 | -------------------------------------------------------------------------------- /scintilla/macosx/ScintillaCallTip.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ScintillaMacOSX.h 3 | * tutorial 4 | * 5 | * Created by Evan Jones on Sun Sep 01 2002. 6 | * Copyright (c) 2002 __MyCompanyName__. All rights reserved. 7 | * 8 | */ 9 | #ifndef SCINTILLA_CALLTIP_H 10 | #define SCINTILLA_CALLTIP_H 11 | 12 | #include "TView.h" 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include "Platform.h" 21 | #include "Scintilla.h" 22 | 23 | static const OSType scintillaCallTipType = 'Scct'; 24 | 25 | namespace Scintilla { 26 | 27 | class ScintillaCallTip : public TView 28 | { 29 | public: 30 | // Private so ScintillaCallTip objects can not be copied 31 | ScintillaCallTip(const ScintillaCallTip &) : TView( NULL ) {} 32 | ScintillaCallTip &operator=(const ScintillaCallTip &) { return * this; } 33 | ~ScintillaCallTip() {}; 34 | 35 | public: 36 | /** This is the class ID that we've assigned to Scintilla. */ 37 | static const CFStringRef kScintillaCallTipClassID; 38 | static const ControlKind kScintillaCallTipKind; 39 | 40 | ScintillaCallTip( void* windowid ); 41 | 42 | /** Returns the HIView object kind, needed to subclass TView. */ 43 | virtual ControlKind GetKind() { return kScintillaCallTipKind; } 44 | 45 | private: 46 | 47 | virtual ControlPartCode HitTest( const HIPoint& where ); 48 | virtual void Draw( RgnHandle rgn, CGContextRef gc ); 49 | virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount ); 50 | virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount ); 51 | virtual OSStatus MouseDragged( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount ); 52 | 53 | public: 54 | static HIViewRef Create(); 55 | private: 56 | static OSStatus Construct( HIViewRef inControl, TView** outView ); 57 | 58 | }; 59 | 60 | 61 | } 62 | 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /scintilla/macosx/ScintillaListBox.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ScintillaMacOSX.h 3 | * tutorial 4 | * 5 | * Created by Evan Jones on Sun Sep 01 2002. 6 | * Copyright (c) 2002 __MyCompanyName__. All rights reserved. 7 | * 8 | */ 9 | #ifndef SCINTILLA_LISTBOX_H 10 | #define SCINTILLA_LISTBOX_H 11 | 12 | #include "TView.h" 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include "Platform.h" 21 | #include "Scintilla.h" 22 | 23 | static const OSType scintillaListBoxType = 'sclb'; 24 | 25 | namespace Scintilla { 26 | 27 | class ScintillaListBox : public TView 28 | { 29 | public: 30 | // Private so ScintillaListBox objects can not be copied 31 | ScintillaListBox(const ScintillaListBox &) : TView( NULL ) {} 32 | ScintillaListBox &operator=(const ScintillaListBox &) { return * this; } 33 | ~ScintillaListBox() {}; 34 | 35 | public: 36 | /** This is the class ID that we've assigned to Scintilla. */ 37 | static const CFStringRef kScintillaListBoxClassID; 38 | static const ControlKind kScintillaListBoxKind; 39 | 40 | ScintillaListBox( void* windowid ); 41 | 42 | /** Returns the HIView object kind, needed to subclass TView. */ 43 | virtual ControlKind GetKind() { return kScintillaListBoxKind; } 44 | 45 | private: 46 | 47 | virtual ControlPartCode HitTest( const HIPoint& where ); 48 | virtual void Draw( RgnHandle rgn, CGContextRef gc ); 49 | virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount ); 50 | virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount ); 51 | 52 | public: 53 | static HIViewRef Create(); 54 | private: 55 | static OSStatus Construct( HIViewRef inControl, TView** outView ); 56 | 57 | }; 58 | 59 | 60 | } 61 | 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /scintilla/macosx/TCarbonEvent.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/macosx/TCarbonEvent.cxx -------------------------------------------------------------------------------- /scintilla/macosx/TCarbonEvent.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/macosx/TCarbonEvent.h -------------------------------------------------------------------------------- /scintilla/macosx/TRect.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/macosx/TRect.h -------------------------------------------------------------------------------- /scintilla/macosx/TView.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/macosx/TView.cxx -------------------------------------------------------------------------------- /scintilla/macosx/TView.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/macosx/TView.h -------------------------------------------------------------------------------- /scintilla/src/AutoComplete.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file AutoComplete.h 3 | ** Defines the auto completion list box. 4 | **/ 5 | // Copyright 1998-2003 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef AUTOCOMPLETE_H 9 | #define AUTOCOMPLETE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | /** 16 | */ 17 | class AutoComplete { 18 | bool active; 19 | char stopChars[256]; 20 | char fillUpChars[256]; 21 | char separator; 22 | char typesep; // Type seperator 23 | 24 | public: 25 | bool ignoreCase; 26 | bool chooseSingle; 27 | ListBox *lb; 28 | int posStart; 29 | int startLen; 30 | /// Should autocompletion be canceled if editor's currentPos <= startPos? 31 | bool cancelAtStartPos; 32 | bool autoHide; 33 | bool dropRestOfWord; 34 | 35 | AutoComplete(); 36 | ~AutoComplete(); 37 | 38 | /// Is the auto completion list displayed? 39 | bool Active() const; 40 | 41 | /// Display the auto completion list positioned to be near a character position 42 | void Start(Window &parent, int ctrlID, int position, Point location, 43 | int startLen_, int lineHeight, bool unicodeMode); 44 | 45 | /// The stop chars are characters which, when typed, cause the auto completion list to disappear 46 | void SetStopChars(const char *stopChars_); 47 | bool IsStopChar(char ch); 48 | 49 | /// The fillup chars are characters which, when typed, fill up the selected word 50 | void SetFillUpChars(const char *fillUpChars_); 51 | bool IsFillUpChar(char ch); 52 | 53 | /// The separator character is used when interpreting the list in SetList 54 | void SetSeparator(char separator_); 55 | char GetSeparator() const; 56 | 57 | /// The typesep character is used for seperating the word from the type 58 | void SetTypesep(char separator_); 59 | char GetTypesep() const; 60 | 61 | /// The list string contains a sequence of words separated by the separator character 62 | void SetList(const char *list); 63 | 64 | void Show(bool show); 65 | void Cancel(); 66 | 67 | /// Move the current list element by delta, scrolling appropriately 68 | void Move(int delta); 69 | 70 | /// Select a list element that starts with word as the current element 71 | void Select(const char *word); 72 | }; 73 | 74 | #ifdef SCI_NAMESPACE 75 | } 76 | #endif 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /scintilla/src/CharClassify.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file CharClassify.cxx 3 | ** Character classifications used by Document and RESearch. 4 | **/ 5 | // Copyright 2006 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #include 9 | #include 10 | 11 | #include "CharClassify.h" 12 | 13 | // Shut up annoying Visual C++ warnings: 14 | #ifdef _MSC_VER 15 | #pragma warning(disable: 4514) 16 | #endif 17 | 18 | CharClassify::CharClassify() { 19 | SetDefaultCharClasses(true); 20 | } 21 | 22 | void CharClassify::SetDefaultCharClasses(bool includeWordClass) { 23 | // Initialize all char classes to default values 24 | for (int ch = 0; ch < 256; ch++) { 25 | if (ch == '\r' || ch == '\n') 26 | charClass[ch] = ccNewLine; 27 | else if (ch < 0x20 || ch == ' ') 28 | charClass[ch] = ccSpace; 29 | else if (includeWordClass && (ch >= 0x80 || isalnum(ch) || ch == '_')) 30 | charClass[ch] = ccWord; 31 | else 32 | charClass[ch] = ccPunctuation; 33 | } 34 | } 35 | 36 | void CharClassify::SetCharClasses(const unsigned char *chars, cc newCharClass) { 37 | // Apply the newCharClass to the specifed chars 38 | if (chars) { 39 | while (*chars) { 40 | charClass[*chars] = static_cast(newCharClass); 41 | chars++; 42 | } 43 | } 44 | } 45 | 46 | int CompareCaseInsensitive(const char *a, const char *b) { 47 | while (*a && *b) { 48 | if (*a != *b) { 49 | char upperA = MakeUpperCase(*a); 50 | char upperB = MakeUpperCase(*b); 51 | if (upperA != upperB) 52 | return upperA - upperB; 53 | } 54 | a++; 55 | b++; 56 | } 57 | // Either *a or *b is nul 58 | return *a - *b; 59 | } 60 | 61 | int CompareNCaseInsensitive(const char *a, const char *b, size_t len) { 62 | while (*a && *b && len) { 63 | if (*a != *b) { 64 | char upperA = MakeUpperCase(*a); 65 | char upperB = MakeUpperCase(*b); 66 | if (upperA != upperB) 67 | return upperA - upperB; 68 | } 69 | a++; 70 | b++; 71 | len--; 72 | } 73 | if (len == 0) 74 | return 0; 75 | else 76 | // Either *a or *b is nul 77 | return *a - *b; 78 | } 79 | -------------------------------------------------------------------------------- /scintilla/src/CharClassify.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file CharClassify.h 3 | ** Character classifications used by Document and RESearch. 4 | **/ 5 | // Copyright 2006-2009 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef CHARCLASSIFY_H 9 | #define CHARCLASSIFY_H 10 | 11 | class CharClassify { 12 | public: 13 | CharClassify(); 14 | 15 | enum cc { ccSpace, ccNewLine, ccWord, ccPunctuation }; 16 | void SetDefaultCharClasses(bool includeWordClass); 17 | void SetCharClasses(const unsigned char *chars, cc newCharClass); 18 | cc GetClass(unsigned char ch) const { return static_cast(charClass[ch]);} 19 | bool IsWord(unsigned char ch) const { return static_cast(charClass[ch]) == ccWord;} 20 | 21 | private: 22 | enum { maxChar=256 }; 23 | unsigned char charClass[maxChar]; // not type cc to save space 24 | }; 25 | 26 | // These functions are implemented because each platform calls them something different. 27 | int CompareCaseInsensitive(const char *a, const char *b); 28 | int CompareNCaseInsensitive(const char *a, const char *b, size_t len); 29 | 30 | inline char MakeUpperCase(char ch) { 31 | if (ch < 'a' || ch > 'z') 32 | return ch; 33 | else 34 | return static_cast(ch - 'a' + 'A'); 35 | } 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /scintilla/src/CharacterSet.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file CharacterSet.h 3 | ** Encapsulates a set of characters. Used to test if a character is within a set. 4 | **/ 5 | // Copyright 2007 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | class CharacterSet { 9 | int size; 10 | bool valueAfter; 11 | bool *bset; 12 | public: 13 | enum setBase { 14 | setNone=0, 15 | setLower=1, 16 | setUpper=2, 17 | setDigits=4, 18 | setAlpha=setLower|setUpper, 19 | setAlphaNum=setAlpha|setDigits 20 | }; 21 | CharacterSet(setBase base=setNone, const char *initialSet="", int size_=0x80, bool valueAfter_=false) { 22 | size = size_; 23 | valueAfter = valueAfter_; 24 | bset = new bool[size]; 25 | for (int i=0; i < size; i++) { 26 | bset[i] = false; 27 | } 28 | AddString(initialSet); 29 | if (base & setLower) 30 | AddString("abcdefghijklmnopqrstuvwxyz"); 31 | if (base & setUpper) 32 | AddString("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); 33 | if (base & setDigits) 34 | AddString("0123456789"); 35 | } 36 | ~CharacterSet() { 37 | delete []bset; 38 | bset = 0; 39 | size = 0; 40 | } 41 | void Add(int val) { 42 | PLATFORM_ASSERT(val >= 0); 43 | PLATFORM_ASSERT(val < size); 44 | bset[val] = true; 45 | } 46 | void AddString(const char *CharacterSet) { 47 | for (const char *cp=CharacterSet; *cp; cp++) { 48 | int val = static_cast(*cp); 49 | PLATFORM_ASSERT(val >= 0); 50 | PLATFORM_ASSERT(val < size); 51 | bset[val] = true; 52 | } 53 | } 54 | bool Contains(int val) const { 55 | PLATFORM_ASSERT(val >= 0); 56 | return (val < size) ? bset[val] : valueAfter; 57 | } 58 | }; 59 | -------------------------------------------------------------------------------- /scintilla/src/ContractionState.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file ContractionState.h 3 | ** Manages visibility of lines for folding and wrapping. 4 | **/ 5 | // Copyright 1998-2007 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef CONTRACTIONSTATE_H 9 | #define CONTRACTIONSTATE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | /** 16 | */ 17 | class ContractionState { 18 | // These contain 1 element for every document line. 19 | RunStyles *visible; 20 | RunStyles *expanded; 21 | RunStyles *heights; 22 | Partitioning *displayLines; 23 | int linesInDocument; 24 | 25 | void EnsureData(); 26 | 27 | bool OneToOne() const { 28 | // True when each document line is exactly one display line so need for 29 | // complex data structures. 30 | return visible == 0; 31 | } 32 | 33 | public: 34 | ContractionState(); 35 | virtual ~ContractionState(); 36 | 37 | void Clear(); 38 | 39 | int LinesInDoc() const; 40 | int LinesDisplayed() const; 41 | int DisplayFromDoc(int lineDoc) const; 42 | int DocFromDisplay(int lineDisplay) const; 43 | 44 | void InsertLine(int lineDoc); 45 | void InsertLines(int lineDoc, int lineCount); 46 | void DeleteLine(int lineDoc); 47 | void DeleteLines(int lineDoc, int lineCount); 48 | 49 | bool GetVisible(int lineDoc) const; 50 | bool SetVisible(int lineDocStart, int lineDocEnd, bool visible); 51 | 52 | bool GetExpanded(int lineDoc) const; 53 | bool SetExpanded(int lineDoc, bool expanded); 54 | 55 | int GetHeight(int lineDoc) const; 56 | bool SetHeight(int lineDoc, int height); 57 | 58 | void ShowAll(); 59 | void Check() const; 60 | }; 61 | 62 | #ifdef SCI_NAMESPACE 63 | } 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /scintilla/src/Decoration.h: -------------------------------------------------------------------------------- 1 | /** @file Decoration.h 2 | ** Visual elements added over text. 3 | **/ 4 | // Copyright 1998-2007 by Neil Hodgson 5 | // The License.txt file describes the conditions under which this software may be distributed. 6 | 7 | #ifndef DECORATION_H 8 | #define DECORATION_H 9 | 10 | #ifdef SCI_NAMESPACE 11 | namespace Scintilla { 12 | #endif 13 | 14 | class Decoration { 15 | public: 16 | Decoration *next; 17 | RunStyles rs; 18 | int indicator; 19 | 20 | Decoration(int indicator_); 21 | ~Decoration(); 22 | 23 | bool Empty(); 24 | }; 25 | 26 | class DecorationList { 27 | int currentIndicator; 28 | int currentValue; 29 | Decoration *current; 30 | int lengthDocument; 31 | Decoration *DecorationFromIndicator(int indicator); 32 | Decoration *Create(int indicator, int length); 33 | void Delete(int indicator); 34 | void DeleteAnyEmpty(); 35 | public: 36 | Decoration *root; 37 | bool clickNotified; 38 | 39 | DecorationList(); 40 | ~DecorationList(); 41 | 42 | void SetCurrentIndicator(int indicator); 43 | int GetCurrentIndicator() const { return currentIndicator; } 44 | 45 | void SetCurrentValue(int value); 46 | int GetCurrentValue() const { return currentValue; } 47 | 48 | // Returns true if some values may have changed 49 | bool FillRange(int &position, int value, int &fillLength); 50 | 51 | void InsertSpace(int position, int insertLength); 52 | void DeleteRange(int position, int deleteLength); 53 | 54 | int AllOnFor(int position); 55 | int ValueAt(int indicator, int position); 56 | int Start(int indicator, int position); 57 | int End(int indicator, int position); 58 | }; 59 | 60 | #ifdef SCI_NAMESPACE 61 | } 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /scintilla/src/FontQuality.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file FontQuality.h 3 | ** Definitions to control font anti-aliasing. 4 | **/ 5 | // Copyright 1998-2009 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #define SC_EFF_QUALITY_MASK 0xF 9 | #define SC_EFF_QUALITY_DEFAULT 0 10 | #define SC_EFF_QUALITY_NON_ANTIALIASED 1 11 | #define SC_EFF_QUALITY_ANTIALIASED 2 12 | #define SC_EFF_QUALITY_LCD_OPTIMIZED 3 13 | -------------------------------------------------------------------------------- /scintilla/src/Indicator.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Indicator.h 3 | ** Defines the style of indicators which are text decorations such as underlining. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef INDICATOR_H 9 | #define INDICATOR_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | /** 16 | */ 17 | class Indicator { 18 | public: 19 | int style; 20 | bool under; 21 | ColourPair fore; 22 | int fillAlpha; 23 | Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)), fillAlpha(30) { 24 | } 25 | void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine); 26 | }; 27 | 28 | #ifdef SCI_NAMESPACE 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /scintilla/src/KeyMap.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file KeyMap.h 3 | ** Defines a mapping between keystrokes and commands. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef KEYTOCOMMAND_H 9 | #define KEYTOCOMMAND_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | #define SCI_NORM 0 16 | #define SCI_SHIFT SCMOD_SHIFT 17 | #define SCI_CTRL SCMOD_CTRL 18 | #define SCI_ALT SCMOD_ALT 19 | #define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT) 20 | #define SCI_ASHIFT (SCI_ALT | SCI_SHIFT) 21 | 22 | /** 23 | */ 24 | class KeyToCommand { 25 | public: 26 | int key; 27 | int modifiers; 28 | unsigned int msg; 29 | }; 30 | 31 | /** 32 | */ 33 | class KeyMap { 34 | KeyToCommand *kmap; 35 | int len; 36 | int alloc; 37 | static const KeyToCommand MapDefault[]; 38 | 39 | public: 40 | KeyMap(); 41 | ~KeyMap(); 42 | void Clear(); 43 | void AssignCmdKey(int key, int modifiers, unsigned int msg); 44 | unsigned int Find(int key, int modifiers); // 0 returned on failure 45 | }; 46 | 47 | #ifdef SCI_NAMESPACE 48 | } 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /scintilla/src/LexCSS.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/src/LexCSS.cxx -------------------------------------------------------------------------------- /scintilla/src/LexErlang.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/src/LexErlang.cxx -------------------------------------------------------------------------------- /scintilla/src/LexMMIXAL.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/src/LexMMIXAL.cxx -------------------------------------------------------------------------------- /scintilla/src/LexMatlab.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/src/LexMatlab.cxx -------------------------------------------------------------------------------- /scintilla/src/LineMarker.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file LineMarker.h 3 | ** Defines the look of a line marker in the margin . 4 | **/ 5 | // Copyright 1998-2003 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef LINEMARKER_H 9 | #define LINEMARKER_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | /** 16 | */ 17 | class LineMarker { 18 | public: 19 | int markType; 20 | ColourPair fore; 21 | ColourPair back; 22 | int alpha; 23 | XPM *pxpm; 24 | LineMarker() { 25 | markType = SC_MARK_CIRCLE; 26 | fore = ColourDesired(0,0,0); 27 | back = ColourDesired(0xff,0xff,0xff); 28 | alpha = SC_ALPHA_NOALPHA; 29 | pxpm = NULL; 30 | } 31 | LineMarker(const LineMarker &) { 32 | // Defined to avoid pxpm being blindly copied, not as real copy constructor 33 | markType = SC_MARK_CIRCLE; 34 | fore = ColourDesired(0,0,0); 35 | back = ColourDesired(0xff,0xff,0xff); 36 | alpha = SC_ALPHA_NOALPHA; 37 | pxpm = NULL; 38 | } 39 | ~LineMarker() { 40 | delete pxpm; 41 | } 42 | LineMarker &operator=(const LineMarker &) { 43 | // Defined to avoid pxpm being blindly copied, not as real assignment operator 44 | markType = SC_MARK_CIRCLE; 45 | fore = ColourDesired(0,0,0); 46 | back = ColourDesired(0xff,0xff,0xff); 47 | alpha = SC_ALPHA_NOALPHA; 48 | delete pxpm; 49 | pxpm = NULL; 50 | return *this; 51 | } 52 | void RefreshColourPalette(Palette &pal, bool want); 53 | void SetXPM(const char *textForm); 54 | void SetXPM(const char * const *linesForm); 55 | void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter); 56 | }; 57 | 58 | #ifdef SCI_NAMESPACE 59 | } 60 | #endif 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /scintilla/src/PropSetSimple.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file PropSetSimple.h 3 | ** A basic string to string map. 4 | **/ 5 | // Copyright 1998-2009 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef PROPSETSIMPLE_H 9 | #define PROPSETSIMPLE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | class PropSetSimple : public PropertyGet { 16 | void *impl; 17 | void Set(const char *keyVal); 18 | public: 19 | PropSetSimple(); 20 | virtual ~PropSetSimple(); 21 | void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1); 22 | void SetMultiple(const char *); 23 | const char *Get(const char *key) const; 24 | char *Expanded(const char *key) const; 25 | char *ToString() const; 26 | int GetInt(const char *key, int defaultValue=0) const; 27 | }; 28 | 29 | #ifdef SCI_NAMESPACE 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /scintilla/src/RESearch.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file RESearch.h 3 | ** Interface to the regular expression search library. 4 | **/ 5 | // Written by Neil Hodgson 6 | // Based on the work of Ozan S. Yigit. 7 | // This file is in the public domain. 8 | 9 | #ifndef RESEARCH_H 10 | #define RESEARCH_H 11 | 12 | #ifdef SCI_NAMESPACE 13 | namespace Scintilla { 14 | #endif 15 | 16 | /* 17 | * The following defines are not meant to be changeable. 18 | * They are for readability only. 19 | */ 20 | #define MAXCHR 256 21 | #define CHRBIT 8 22 | #define BITBLK MAXCHR/CHRBIT 23 | 24 | class CharacterIndexer { 25 | public: 26 | virtual char CharAt(int index)=0; 27 | virtual ~CharacterIndexer() { 28 | } 29 | }; 30 | 31 | class RESearch { 32 | 33 | public: 34 | RESearch(CharClassify *charClassTable); 35 | ~RESearch(); 36 | bool GrabMatches(CharacterIndexer &ci); 37 | const char *Compile(const char *pattern, int length, bool caseSensitive, bool posix); 38 | int Execute(CharacterIndexer &ci, int lp, int endp); 39 | int Substitute(CharacterIndexer &ci, char *src, char *dst); 40 | 41 | enum { MAXTAG=10 }; 42 | enum { MAXNFA=2048 }; 43 | enum { NOTFOUND=-1 }; 44 | 45 | int bopat[MAXTAG]; 46 | int eopat[MAXTAG]; 47 | char *pat[MAXTAG]; 48 | 49 | private: 50 | void Init(); 51 | void Clear(); 52 | void ChSet(unsigned char c); 53 | void ChSetWithCase(unsigned char c, bool caseSensitive); 54 | int GetBackslashExpression(const char *pattern, int &incr); 55 | 56 | int PMatch(CharacterIndexer &ci, int lp, int endp, char *ap); 57 | 58 | int bol; 59 | int tagstk[MAXTAG]; /* subpat tag stack */ 60 | char nfa[MAXNFA]; /* automaton */ 61 | int sta; 62 | unsigned char bittab[BITBLK]; /* bit table for CCL pre-set bits */ 63 | int failure; 64 | CharClassify *charClass; 65 | bool iswordc(unsigned char x) { 66 | return charClass->IsWord(x); 67 | } 68 | }; 69 | 70 | #ifdef SCI_NAMESPACE 71 | } 72 | #endif 73 | 74 | #endif 75 | 76 | -------------------------------------------------------------------------------- /scintilla/src/RunStyles.h: -------------------------------------------------------------------------------- 1 | /** @file RunStyles.h 2 | ** Data structure used to store sparse styles. 3 | **/ 4 | // Copyright 1998-2007 by Neil Hodgson 5 | // The License.txt file describes the conditions under which this software may be distributed. 6 | 7 | /// Styling buffer using one element for each run rather than using 8 | /// a filled buffer. 9 | 10 | #ifndef RUNSTYLES_H 11 | #define RUNSTYLES_H 12 | 13 | #ifdef SCI_NAMESPACE 14 | namespace Scintilla { 15 | #endif 16 | 17 | class RunStyles { 18 | public: 19 | Partitioning *starts; 20 | SplitVector *styles; 21 | int RunFromPosition(int position); 22 | int SplitRun(int position); 23 | void RemoveRun(int run); 24 | void RemoveRunIfEmpty(int run); 25 | void RemoveRunIfSameAsPrevious(int run); 26 | public: 27 | RunStyles(); 28 | ~RunStyles(); 29 | int Length() const; 30 | int ValueAt(int position) const; 31 | int FindNextChange(int position, int end); 32 | int StartRun(int position); 33 | int EndRun(int position); 34 | // Returns true if some values may have changed 35 | bool FillRange(int &position, int value, int &fillLength); 36 | void SetValueAt(int position, int value); 37 | void InsertSpace(int position, int insertLength); 38 | void DeleteAll(); 39 | void DeleteRange(int position, int deleteLength); 40 | }; 41 | 42 | #ifdef SCI_NAMESPACE 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /scintilla/src/SciTE.properties: -------------------------------------------------------------------------------- 1 | # SciTE.properties is the per directory local options file and can be used to override 2 | # settings made in SciTEGlobal.properties 3 | command.build.directory.*.cxx=..\win32 4 | command.build.directory.*.h=..\win32 5 | command.build.*.cxx=nmake -f scintilla.mak QUIET=1 DEBUG=0 6 | command.build.*.h=nmake -f scintilla.mak QUIET=1 DEBUG=0 7 | -------------------------------------------------------------------------------- /scintilla/src/Style.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Style.h 3 | ** Defines the font and colour style for a class of text. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef STYLE_H 9 | #define STYLE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | /** 16 | */ 17 | class Style { 18 | public: 19 | ColourPair fore; 20 | ColourPair back; 21 | bool aliasOfDefaultFont; 22 | bool bold; 23 | bool italic; 24 | int size; 25 | const char *fontName; 26 | int characterSet; 27 | bool eolFilled; 28 | bool underline; 29 | enum ecaseForced {caseMixed, caseUpper, caseLower}; 30 | ecaseForced caseForce; 31 | bool visible; 32 | bool changeable; 33 | bool hotspot; 34 | 35 | Font font; 36 | int sizeZoomed; 37 | unsigned int lineHeight; 38 | unsigned int ascent; 39 | unsigned int descent; 40 | unsigned int externalLeading; 41 | unsigned int aveCharWidth; 42 | unsigned int spaceWidth; 43 | 44 | Style(); 45 | Style(const Style &source); 46 | ~Style(); 47 | Style &operator=(const Style &source); 48 | void Clear(ColourDesired fore_, ColourDesired back_, 49 | int size_, 50 | const char *fontName_, int characterSet_, 51 | bool bold_, bool italic_, bool eolFilled_, 52 | bool underline_, ecaseForced caseForce_, 53 | bool visible_, bool changeable_, bool hotspot_); 54 | void ClearTo(const Style &source); 55 | bool EquivalentFontTo(const Style *other) const; 56 | void Realise(Surface &surface, int zoomLevel, Style *defaultStyle = 0, int extraFontFlag = 0); 57 | bool IsProtected() const { return !(changeable && visible);}; 58 | }; 59 | 60 | #ifdef SCI_NAMESPACE 61 | } 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /scintilla/src/StyleContext.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file StyleContext.cxx 3 | ** Lexer infrastructure. 4 | **/ 5 | // Copyright 1998-2004 by Neil Hodgson 6 | // This file is in the public domain. 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include "Platform.h" 14 | 15 | #include "PropSet.h" 16 | #include "Accessor.h" 17 | #include "StyleContext.h" 18 | 19 | #ifdef SCI_NAMESPACE 20 | using namespace Scintilla; 21 | #endif 22 | 23 | static void getRange(unsigned int start, 24 | unsigned int end, 25 | Accessor &styler, 26 | char *s, 27 | unsigned int len) { 28 | unsigned int i = 0; 29 | while ((i < end - start + 1) && (i < len-1)) { 30 | s[i] = styler[start + i]; 31 | i++; 32 | } 33 | s[i] = '\0'; 34 | } 35 | 36 | void StyleContext::GetCurrent(char *s, unsigned int len) { 37 | getRange(styler.GetStartSegment(), currentPos - 1, styler, s, len); 38 | } 39 | 40 | static void getRangeLowered(unsigned int start, 41 | unsigned int end, 42 | Accessor &styler, 43 | char *s, 44 | unsigned int len) { 45 | unsigned int i = 0; 46 | while ((i < end - start + 1) && (i < len-1)) { 47 | s[i] = static_cast(tolower(styler[start + i])); 48 | i++; 49 | } 50 | s[i] = '\0'; 51 | } 52 | 53 | void StyleContext::GetCurrentLowered(char *s, unsigned int len) { 54 | getRangeLowered(styler.GetStartSegment(), currentPos - 1, styler, s, len); 55 | } 56 | -------------------------------------------------------------------------------- /scintilla/src/UniConversion.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file UniConversion.h 3 | ** Functions to handle UFT-8 and UCS-2 strings. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen); 9 | void UTF8FromUTF16(const wchar_t *uptr, unsigned int tlen, char *putf, unsigned int len); 10 | unsigned int UTF8CharLength(unsigned char ch); 11 | unsigned int UTF16Length(const char *s, unsigned int len); 12 | unsigned int UTF16FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen); 13 | 14 | -------------------------------------------------------------------------------- /scintilla/test/MessageNumbers.py: -------------------------------------------------------------------------------- 1 | # List many windows message numbers 2 | 3 | msgs = { 4 | "WM_ACTIVATE":6, 5 | "WM_ACTIVATEAPP":28, 6 | "WM_CAPTURECHANGED":533, 7 | "WM_CHAR":258, 8 | "WM_CLOSE":16, 9 | "WM_CREATE":1, 10 | "WM_COMMAND":273, 11 | "WM_DESTROY":2, 12 | "WM_ENTERSIZEMOVE":561, 13 | "WM_ERASEBKGND":20, 14 | "WM_EXITSIZEMOVE":562, 15 | "WM_GETMINMAXINFO":36, 16 | "WM_GETTEXT":13, 17 | "WM_IME_SETCONTEXT":0x0281, 18 | "WM_IME_NOTIFY":0x0282, 19 | "WM_KEYDOWN":256, 20 | "WM_KEYUP":257, 21 | "WM_KILLFOCUS":8, 22 | "WM_LBUTTONDOWN":513, 23 | "WM_LBUTTONUP":514, 24 | "WM_MBUTTONDOWN":519, 25 | "WM_MBUTTONUP":520, 26 | "WM_MBUTTONDBLCLK":521, 27 | "WM_MOUSEACTIVATE":33, 28 | "WM_MOUSEMOVE":512, 29 | "WM_MOVE":3, 30 | "WM_MOVING":534, 31 | "WM_NCACTIVATE":134, 32 | "WM_NCCALCSIZE":131, 33 | "WM_NCCREATE":129, 34 | "WM_NCDESTROY":130, 35 | "WM_NCHITTEST":132, 36 | "WM_NCLBUTTONDBLCLK":163, 37 | "WM_NCLBUTTONDOWN":161, 38 | "WM_NCLBUTTONUP":162, 39 | "WM_NCMOUSEMOVE":160, 40 | "WM_NCPAINT":133, 41 | "WM_PAINT":15, 42 | "WM_PARENTNOTIFY":528, 43 | "WM_SETCURSOR":32, 44 | "WM_SETFOCUS":7, 45 | "WM_SETFONT":48, 46 | "WM_SETTEXT":12, 47 | "WM_SHOWWINDOW":24, 48 | "WM_SIZE":5, 49 | "WM_SIZING":532, 50 | "WM_SYNCPAINT":136, 51 | "WM_SYSCOMMAND":274, 52 | "WM_SYSKEYDOWN":260, 53 | "WM_TIMER":275, 54 | "WM_USER":1024, 55 | "WM_USER+1":1025, 56 | "WM_WINDOWPOSCHANGED":71, 57 | "WM_WINDOWPOSCHANGING":70, 58 | } 59 | 60 | sgsm={} 61 | for k,v in msgs.items(): 62 | sgsm[v] = k 63 | 64 | -------------------------------------------------------------------------------- /scintilla/test/README: -------------------------------------------------------------------------------- 1 | The test directory contains some unit and performance tests for Scintilla. 2 | 3 | The tests can only be run on Windows using Python 3.x. Running on another platform 4 | would require writing a file similar to XiteWin.py for that platform. Python 3.x is required 5 | because its default string type is Unicode and earlier Python versions use byte strings 6 | and the interface to the platform assumes a particular string type. 7 | 8 | A test application is in xite.py and this can be run to experiment: 9 | pythonw xite.py 10 | 11 | To run the basic tests: 12 | pythonw simpleTests.py 13 | 14 | There are some lexing tests with simple input files in several languages in the examples 15 | subdirectory and their expected lexed states in *.styled where the start of each style 16 | is marked with {styleNumber}, for example: 17 | {15}<%@{16}language=javas{15}%>{0} 18 | 19 | To run the lexing tests: 20 | pythonw lexTests.py 21 | 22 | To check for performance regressions: 23 | pythonw performanceTests.py 24 | While each test run will be different and the timer has only limited granularity, some results 25 | from a 2 GHz Athlon with a DEBUG build are: 26 | 0.187 testAddLine 27 | . 0.203 testAddLineMiddle 28 | . 0.171 testHuge 29 | . 0.203 testHugeInserts 30 | . 0.312 testHugeReplace 31 | . 32 | -------------------------------------------------------------------------------- /scintilla/test/XiteMenu.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ Define the menu structure used by the Pentacle applications """ 4 | 5 | MenuStructure = [ 6 | ["&File", [ 7 | ["&New", "N"], 8 | ["&Open...", "O"], 9 | ["&Save", "S"], 10 | ["Save &As...", "S"], 11 | ["Test", ""], 12 | ["Exercised", ""], 13 | ["Uncalled", ""], 14 | ["-", ""], 15 | ["&Exit", ""]]], 16 | [ "&Edit", [ 17 | ["&Undo", "Z"], 18 | ["&Redo", "Y"], 19 | ["-", ""], 20 | ["Cu&t", "X"], 21 | ["&Copy", "C"], 22 | ["&Paste", "V"], 23 | ["&Delete", "Del"], 24 | ["Select &All", "A"], 25 | ]], 26 | ] 27 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.asp: -------------------------------------------------------------------------------- 1 | <%@language=javas%> 2 | <% 3 | #include 4 | function x() { 5 | } 6 | %> 7 | <%@language=vbscript%> 8 | <% 9 | sub x 'comment 10 | %> 11 | 12 | 13 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.asp.styled: -------------------------------------------------------------------------------- 1 | {15}<%@{16}language=javas{15}%>{0} 2 | {15}<%{56} 3 | #{61}include{56} 4 | {62}function{56} {61}x{65}(){56} {65}{{56} 5 | {65}}{56} 6 | {15}%>{0} 7 | {15}<%@{16}language=vbscript{15}%>{0} 8 | {15}<%{81} 9 | {84}sub{81} {86}x{81} {82}'comment {81} 10 | {15}%>{0} 11 | {1}{0} 12 | {1}{0} 13 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.cxx: -------------------------------------------------------------------------------- 1 | // A demonstration program 2 | int main() { 3 | printf("hello world %d\n", 9); 4 | } 5 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.cxx.styled: -------------------------------------------------------------------------------- 1 | {2}// A demonstration program 2 | {5}int{0} {11}main{10}(){0} {10}{{0} 3 | {11}printf{10}({6}"hello world %d\n"{10},{0} {4}9{10});{0} 4 | {10}}{0} 5 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.d: -------------------------------------------------------------------------------- 1 | $ 2 | // /++ +/ doccomments are not yet supported 3 | /* */ 4 | /** */ 5 | /// drdr 6 | /+ /+ +/ +/ 7 | //keyword test 8 | keyword1 9 | keyword2 10 | keyword4 11 | keyword5 12 | keyword6 13 | keyword7 14 | //unicode identifier test 15 | вапёasdÓΘΣαԷԸՑהכ拉麺とひシマイ단결을 16 | //strings test 17 | 's 18 | ' 19 | w's'w 20 | "multiline 21 | string"w 22 | e"zz"e 23 | r"asd\"e 24 | r"multiline 25 | string"c 26 | r`asd\`e 27 | `multiline 28 | string`d 29 | x"023 abc"e 30 | x"023 31 | abc"w 32 | //numbers test 33 | a[3..4]=3 34 | 2.stringof 35 | 2.0.stringof 36 | 2. 37 | 2.2e+2 38 | 2.2e-2 39 | .2e+2 40 | .2 41 | 2e+2 42 | 0x2e+2 43 | 0x2ep+10 44 | ,.2.stringof, 45 | 46 | end 47 | 48 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.d.styled: -------------------------------------------------------------------------------- 1 | {14}${0} 2 | {2}// /++ +/ doccomments are not yet supported 3 | {1}/* */{0} 4 | {3}/** */{0} 5 | {15}/// drdr 6 | {4}/+ /+ +/ +/{0} 7 | {2}//keyword test 8 | {6}keyword1{0} 9 | {7}keyword2{0} 10 | {9}keyword4{0} 11 | {20}keyword5{0} 12 | {21}keyword6{0} 13 | {22}keyword7{0} 14 | {2}//unicode identifier test 15 | {14}вапёasdÓΘΣαԷԸՑהכ拉麺とひシマイ단결을{0} 16 | {2}//strings test 17 | {11}'s 18 | ' 19 | {14}w{12}'s'{14}w{0} 20 | {10}"multiline 21 | string"w{0} 22 | {14}e{10}"zz"{14}e{0} 23 | {19}r"asd\"{14}e{0} 24 | {19}r"multiline 25 | string"c{0} 26 | {14}r{18}`asd\`{14}e{0} 27 | {18}`multiline 28 | string`d{0} 29 | {19}x"023 abc"{14}e{0} 30 | {19}x"023 31 | abc"w{0} 32 | {2}//numbers test 33 | {14}a{13}[{5}3{13}..{5}4{13}]={5}3{0} 34 | {5}2.stringof{0} 35 | {5}2.0{13}.{14}stringof{0} 36 | {5}2.{0} 37 | {5}2.2e+2{0} 38 | {5}2.2e-2{0} 39 | {5}.2e+2{0} 40 | {5}.2{0} 41 | {5}2e+2{0} 42 | {5}0x2e{13}+{5}2{0} 43 | {5}0x2ep+10{0} 44 | {13},{5}.2{13}.{14}stringof{13},{0} 45 | 46 | {14}end{0} 47 | 48 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SinkWorld - Portability 5 | SinkWorld - Portability 6 | 7 | 8 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.html.styled: -------------------------------------------------------------------------------- 1 | {1}{0} 2 | {1}{0} 3 | {1}{0} 4 | {1}{0}SinkWorld - Portability{1}{0} 5 | {2}{0}SinkWorld - Portability{2}{0} 6 | {1}{0} 7 | {1}{0} 8 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.php: -------------------------------------------------------------------------------- 1 | 2 | \n"; 4 | /* ?> */ 5 | ?> 6 | forif 7 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.php.styled: -------------------------------------------------------------------------------- 1 | {1}{0} {9}{0} 2 | {18}\n"{127};{118} 4 | {124}/* ?> */{118} 5 | {18}?>{0} 6 | {1}{0}for{1}{0}if{1}{0} 7 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.py: -------------------------------------------------------------------------------- 1 | # Convert all punctuation characters except '_', '*', and '.' into spaces. 2 | def depunctuate(s): 3 | '''A docstring''' 4 | """Docstring 2""" 5 | d = "" 6 | for ch in s: 7 | if ch in 'abcde': 8 | d = d + ch 9 | else: 10 | d = d + " " 11 | return d 12 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.py.styled: -------------------------------------------------------------------------------- 1 | {1}# Convert all punctuation characters except '_', '*', and '.' into spaces.{0} 2 | {5}def{0} {9}depunctuate{10}({11}s{10}):{0} 3 | {6}'''A docstring'''{0} 4 | {7}"""Docstring 2"""{0} 5 | {11}d{0} {10}={0} {3}""{0} 6 | {5}for{0} {11}ch{0} {5}in{0} {11}s{10}:{0} 7 | {5}if{0} {11}ch{0} {5}in{0} {4}'abcde'{10}:{0} 8 | {11}d{0} {10}={0} {11}d{0} {10}+{0} {11}ch{0} 9 | {5}else{10}:{0} 10 | {11}d{0} {10}={0} {11}d{0} {10}+{0} {3}" "{0} 11 | {5}return{0} {11}d{0} 12 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.vb: -------------------------------------------------------------------------------- 1 | ' String" 2 | Dim a As String = "hello, world" 3 | Dim b As String = "hello world" 4 | Dim c As String = "Joe said ""Hello"" to me" 5 | Dim d As String = "\\\\server\\share\\file.txt" 6 | ' Character 7 | ""C "c"C "cc"C 8 | ' Date 9 | d = #5/31/1993# or # 01/01/0001 12:00:00AM # 10 | -------------------------------------------------------------------------------- /scintilla/test/examples/x.vb.styled: -------------------------------------------------------------------------------- 1 | {1}' String" 2 | {3}Dim{0} {7}a{0} {3}As{0} {3}String{0} {6}={0} {4}"hello, world"{0} 3 | {3}Dim{0} {7}b{0} {3}As{0} {3}String{0} {6}={0} {4}"hello world"{0} 4 | {3}Dim{0} {7}c{0} {3}As{0} {3}String{0} {6}={0} {4}"Joe said ""Hello"" to me"{0} 5 | {3}Dim{0} {7}d{0} {3}As{0} {3}String{0} {6}={0} {4}"\\\\server\\share\\file.txt"{0} 6 | {1}' Character 7 | {4}""C{0} {4}"c"C{0} {4}"cc"C{0} 8 | {1}' Date 9 | {7}d{0} {6}={0} {8}#5/31/1993#{0} {3}or{0} {8}# 01/01/0001 12:00:00AM #{0} 10 | -------------------------------------------------------------------------------- /scintilla/test/xite.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import XiteWin 4 | 5 | if __name__ == "__main__": 6 | XiteWin.main("") 7 | -------------------------------------------------------------------------------- /scintilla/tgzsrc: -------------------------------------------------------------------------------- 1 | cd .. 2 | rm -f scintilla.tgz 3 | tar --create --exclude \*.o --exclude \*.obj --exclude \*.dll --exclude \*.exe --exclude \*.a scintilla/* \ 4 | | gzip -c >scintilla.tgz 5 | -------------------------------------------------------------------------------- /scintilla/version.txt: -------------------------------------------------------------------------------- 1 | 211 2 | -------------------------------------------------------------------------------- /scintilla/win32/.cvsignore: -------------------------------------------------------------------------------- 1 | .cvsignore 2 | *.obj 3 | ScintRes.res -------------------------------------------------------------------------------- /scintilla/win32/Margin.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scintilla/win32/Margin.cur -------------------------------------------------------------------------------- /scintilla/win32/PlatformRes.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file PlatformRes.h 3 | ** Defines IDs of resources used by Scintilla on Windows platform. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #define IDC_MARGIN 400 9 | -------------------------------------------------------------------------------- /scintilla/win32/SciTE.properties: -------------------------------------------------------------------------------- 1 | command.build.SConstruct=scons.bat . 2 | command.name.1.SConstruct=scons clean 3 | command.1.SConstruct=scons.bat --clean . 4 | 5 | command.build.*.mak=nmake -f $(FileNameExt) DEBUG=1 QUIET=1 6 | command.name.1.*.mak=nmake clean 7 | command.1.*.mak=nmake -f $(FileNameExt) clean 8 | command.name.2.*.mak=Borland Make 9 | command.2.*.mak=make -f $(FileNameExt) 10 | command.subsystem.2.*.mak=0 11 | command.name.3.*.mak=make clean 12 | command.3.*.mak=make -f $(FileNameExt) clean 13 | command.name.4.*.mak=make debug 14 | command.4.*.mak=make DEBUG=1 -f $(FileNameExt) 15 | command.name.5.*.mak=nmake debug 16 | command.5.*.mak=nmake DEBUG=1 -f $(FileNameExt) 17 | # SciTE.properties is the per directory local options file and can be used to override 18 | # settings made in SciTEGlobal.properties 19 | command.build.*.cxx=nmake -f scintilla.mak DEBUG=1 QUIET=1 20 | command.build.*.h=nmake -f scintilla.mak DEBUG=1 QUIET=1 21 | command.build.*.rc=nmake -f scintilla.mak DEBUG=1 QUIET=1 22 | -------------------------------------------------------------------------------- /scintilla/win32/ScintRes.rc: -------------------------------------------------------------------------------- 1 | // Resource file for Scintilla 2 | // Copyright 1998-2010 by Neil Hodgson 3 | // The License.txt file describes the conditions under which this software may be distributed. 4 | 5 | #ifndef __BORLANDC__ 6 | #include 7 | #endif 8 | 9 | #include "PlatformRes.h" 10 | 11 | VS_VERSION_INFO VERSIONINFO 12 | FILEVERSION 2, 1, 1, 0 13 | PRODUCTVERSION 2, 1, 1, 0 14 | FILEFLAGSMASK 0x3fL 15 | FILEFLAGS 0 16 | FILEOS VOS_NT_WINDOWS32 17 | FILETYPE VFT_APP 18 | FILESUBTYPE VFT2_UNKNOWN 19 | BEGIN 20 | BLOCK "VarFileInfo" 21 | BEGIN 22 | VALUE "Translation", 0x409, 1200 23 | END 24 | BLOCK "StringFileInfo" 25 | BEGIN 26 | BLOCK "040904b0" 27 | BEGIN 28 | VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0" 29 | VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component\0" 30 | VALUE "FileVersion", "2.11\0" 31 | VALUE "InternalName", "Scintilla\0" 32 | VALUE "LegalCopyright", "Copyright 1998-2010 by Neil Hodgson\0" 33 | VALUE "OriginalFilename", "Scintilla.DLL\0" 34 | VALUE "ProductName", "Scintilla\0" 35 | VALUE "ProductVersion", "2.11\0" 36 | END 37 | END 38 | END 39 | 40 | IDC_MARGIN CURSOR DISCARDABLE "Margin.cur" 41 | -------------------------------------------------------------------------------- /scintilla/win32/Scintilla.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | Scintilla_DirectFunction -------------------------------------------------------------------------------- /scintilla/zipsrc.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | del/q scintilla.zip 3 | zip scintilla.zip scintilla\*.* scintilla\*\*.* scintilla\*\*\*.* scintilla\*\*\*\*.* scintilla\*\*\*\*\*.* -x *.o -x *.obj -x *.dll -x *.lib -x *.res -x *.exp 4 | cd scintilla 5 | -------------------------------------------------------------------------------- /scintillua/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2007-2010 Mitchell Foral 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /scite/License.txt: -------------------------------------------------------------------------------- 1 | License for Scintilla and SciTE 2 | 3 | Copyright 1998-2003 by Neil Hodgson 4 | 5 | All Rights Reserved 6 | 7 | Permission to use, copy, modify, and distribute this software and its 8 | documentation for any purpose and without fee is hereby granted, 9 | provided that the above copyright notice appear in all copies and that 10 | both that copyright notice and this permission notice appear in 11 | supporting documentation. 12 | 13 | NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 14 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 15 | AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY 16 | SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 18 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE 20 | OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- /scite/bin/empty.txt: -------------------------------------------------------------------------------- 1 | This empty files ensures that the directory is created. -------------------------------------------------------------------------------- /scite/boundscheck/SciTE.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SciTE", "SciTE.vcproj", "{620BEA1D-631C-43F3-9C57-E3855682D13D}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Release = Release 10 | EndGlobalSection 11 | GlobalSection(ProjectConfiguration) = postSolution 12 | {620BEA1D-631C-43F3-9C57-E3855682D13D}.Debug.ActiveCfg = Debug|Win32 13 | {620BEA1D-631C-43F3-9C57-E3855682D13D}.Debug.Build.0 = Debug|Win32 14 | {620BEA1D-631C-43F3-9C57-E3855682D13D}.Release.ActiveCfg = Release|Win32 15 | {620BEA1D-631C-43F3-9C57-E3855682D13D}.Release.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(ExtensibilityGlobals) = postSolution 18 | DPBuild = 5 19 | EndGlobalSection 20 | GlobalSection(ExtensibilityAddIns) = postSolution 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /scite/custom/SciTEGlobal.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/SciTEGlobal.properties -------------------------------------------------------------------------------- /scite/custom/lexers/Io.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Io LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local line_comment = (P('#') + '//') * nonnewline^0 11 | local block_comment = '/*' * (any - '*/')^0 * P('*/')^-1 12 | local comment = token('comment', line_comment + block_comment) 13 | 14 | -- strings 15 | local sq_str = delimited_range("'", '\\', true) 16 | local dq_str = delimited_range('"', '\\', true) 17 | local tq_str = '"""' * (any - '"""')^0 * P('"""')^-1 18 | local string = token('string', sq_str + dq_str + tq_str) 19 | 20 | -- numbers 21 | local number = token('number', float + integer) 22 | 23 | -- keywords 24 | local keyword = token('keyword', word_match(word_list{ 25 | 'block', 'method', 'while', 'foreach', 'if', 'else', 'do', 'super', 'self', 26 | 'clone', 'proto', 'setSlot', 'hasSlot', 'type', 'write', 'print', 'forward' 27 | })) 28 | 29 | -- types 30 | local type = token('type', word_match(word_list{ 31 | 'Block', 'Buffer', 'CFunction', 'Date', 'Duration', 'File', 'Future', 'List', 32 | 'LinkedList', 'Map', 'Nop', 'Message', 'Nil', 'Number', 'Object', 'String', 33 | 'WeakLink' 34 | })) 35 | 36 | -- identifiers 37 | local identifier = token('identifier', word) 38 | 39 | -- operators 40 | local operator = token('operator', S('`~@$%^&*-+/=\\<>?.,:;()[]{}')) 41 | 42 | function LoadTokens() 43 | local io = Io 44 | add_token(io, 'whitespace', ws) 45 | add_token(io, 'keyword', keyword) 46 | add_token(io, 'type', type) 47 | add_token(io, 'identifier', identifier) 48 | add_token(io, 'string', string) 49 | add_token(io, 'comment', comment) 50 | add_token(io, 'number', number) 51 | add_token(io, 'operator', operator) 52 | add_token(io, 'any_char', any_char) 53 | end 54 | -------------------------------------------------------------------------------- /scite/custom/lexers/antlr.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- ANTLR LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local line_comment = '//' * nonnewline^0; 11 | local block_comment = '/*' * (any - '*/')^0 * P('*/')^-1 12 | local comment = token('comment', line_comment + block_comment) 13 | 14 | -- strings 15 | local string = token('string', delimited_range("'", '\\', true, false, '\n')) 16 | 17 | -- keywords 18 | local keyword = token('keyword', word_match(word_list{ 19 | 'abstract', 'break', 'case', 'catch', 'continue', 'default', 'do', 'else', 20 | 'extends', 'final', 'finally', 'for', 'if', 'implements', 'instanceof', 21 | 'native', 'new', 'private', 'protected', 'public', 'return', 'static', 22 | 'switch', 'synchronized', 'throw', 'throws', 'transient', 'try', 'volatile', 23 | 'while', 'package', 'import', 'header', 'options', 'tokens', 'strictfp', 24 | 'false', 'null', 'super', 'this', 'true' 25 | })) 26 | 27 | -- types 28 | local type = token('type', word_match(word_list{ 29 | 'boolean', 'byte', 'char', 'class', 'double', 'float', 'int', 'interface', 30 | 'long', 'short', 'void' 31 | })) 32 | 33 | -- functions 34 | local func = token('function', 'assert') 35 | 36 | -- identifiers 37 | local identifier = token('identifier', word) 38 | 39 | -- operators 40 | local operator = token('operator', S('$@:;|.=+*?~!^>-()[]{}')) 41 | 42 | function LoadTokens() 43 | local antlr = antlr 44 | add_token(antlr, 'whitespace', ws) 45 | add_token(antlr, 'keyword', keyword) 46 | add_token(antlr, 'type', type) 47 | add_token(antlr, 'function', func) 48 | add_token(antlr, 'identifier', identifier) 49 | add_token(antlr, 'string', string) 50 | add_token(antlr, 'comment', comment) 51 | add_token(antlr, 'operator', operator) 52 | add_token(antlr, 'any_char', any_char) 53 | end 54 | -------------------------------------------------------------------------------- /scite/custom/lexers/asp.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- ASP LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, S = lpeg.P, lpeg.S 6 | 7 | local html = require 'hypertext' 8 | local vb = require 'vb' 9 | 10 | function LoadTokens() 11 | html.LoadTokens() 12 | vb.LoadTokens() 13 | 14 | local start_token = token('asp_tag', '<%' * P('=')^-1) 15 | local end_token = token('asp_tag', '%>') 16 | vb.TokenPatterns.whitespace = token('vb_whitespace', space^1) 17 | vb.TokenPatterns.string = -P('%>') * vb.TokenPatterns.string 18 | vb.TokenPatterns.any_char = token('vb_default', any - end_token) 19 | make_embeddable(vb, html, start_token, end_token) 20 | embed_language(html, vb, true) 21 | 22 | -- TODO: modify HTML, CSS, and JS patterns accordingly 23 | 24 | UseOtherTokens = html.Tokens 25 | end 26 | 27 | function LoadStyles() 28 | html.LoadStyles() 29 | add_style('vb_whitespace', style_nothing) 30 | add_style('vb_default', style_nothing) 31 | add_style('asp_tag', style_embedded) 32 | end 33 | -------------------------------------------------------------------------------- /scite/custom/lexers/awk.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- AWK LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local comment = token('comment', '#' * nonnewline^0) 11 | 12 | -- strings 13 | local sq_str = delimited_range("'", '\\', true, false, '\n') 14 | local dq_str = delimited_range('"', '\\', true, false, '\n') 15 | local regex = delimited_range('//', '\\', false, false, '\n') 16 | local string = token('string', sq_str + dq_str + regex) 17 | 18 | -- numbers 19 | local number = token('number', float + integer) 20 | 21 | -- keywords 22 | local keyword = token('keyword', word_match(word_list{ 23 | 'break', 'continue', 'do', 'delete', 'else', 'exit', 'for', 'function', 24 | 'getline', 'if', 'next', 'nextfile', 'print', 'printf', 'return', 'while' 25 | })) 26 | 27 | -- functions 28 | local func = token('function', word_match(word_list{ 29 | 'atan2', 'cos', 'exp', 'gensub', 'getline', 'gsub', 'index', 'int', 'length', 30 | 'log', 'match', 'rand', 'sin', 'split', 'sprintf', 'sqrt', 'srand', 'sub', 31 | 'substr', 'system', 'tolower', 'toupper', 32 | })) 33 | 34 | -- constants 35 | local constant = token('constant', word_match(word_list{ 36 | 'BEGIN', 'END', 'ARGC', 'ARGIND', 'ARGV', 'CONVFMT', 'ENVIRON', 'ERRNO', 37 | 'FIELDSWIDTH', 'FILENAME', 'FNR', 'FS', 'IGNORECASE', 'NF', 'NR', 'OFMT', 38 | 'OFS', 'ORS', 'RLENGTH', 'RS', 'RSTART', 'RT', 'SUBSEP', 39 | })) 40 | 41 | -- identifiers 42 | local identifier = token('identifier', word) 43 | 44 | -- variables 45 | local variable = token('variable', '$' * digit^1) 46 | 47 | -- operators 48 | local operator = token('operator', S('=!<>+-/*%&|^~,:;()[]{}')) 49 | 50 | function LoadTokens() 51 | local awk = awk 52 | add_token(awk, 'whitespace', ws) 53 | add_token(awk, 'keyword', keyword) 54 | add_token(awk, 'function', func) 55 | add_token(awk, 'constant', constant) 56 | add_token(awk, 'identifier', identifier) 57 | add_token(awk, 'string', string) 58 | add_token(awk, 'comment', comment) 59 | add_token(awk, 'number', number) 60 | add_token(awk, 'variable', variable) 61 | add_token(awk, 'operator', operator) 62 | add_token(awk, 'any_char', any_char) 63 | end 64 | -------------------------------------------------------------------------------- /scite/custom/lexers/bash.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Shell LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local comment = token('comment', '#' * nonnewline^0) 11 | 12 | -- strings 13 | local sq_str = delimited_range("'", nil, true) 14 | local dq_str = delimited_range('"', '\\', true) 15 | local ex_str = delimited_range('`', '\\', true) 16 | local heredoc = '<<' * P(function(input, index) 17 | local s, e, _, delimiter = input:find('(["\']?)([%a_][%w_]*)%1[\n\r\f;]+', index) 18 | if s == index and delimiter then 19 | local _, e = input:find('[\n\r\f]+'..delimiter, e) 20 | return e and e + 1 or #input + 1 21 | end 22 | end) 23 | local string = token('string', sq_str + dq_str + ex_str + heredoc) 24 | 25 | -- numbers 26 | local number = token('number', float + integer) 27 | 28 | -- keywords 29 | local keyword = token('keyword', word_match(word_list{ 30 | 'if', 'then', 'elif', 'else', 'fi', 'case', 'in', 'esac', 'while', 'for', 31 | 'do', 'done', 'continue', 'local', 'return', 32 | -- operators 33 | '-a', '-b', '-c', '-d', '-e', '-f', '-g', '-h', '-k', '-p', '-r', '-s', '-t', 34 | '-u', '-w', '-x', '-O', '-G', '-L', '-S', '-N', '-nt', '-ot', '-ef', '-o', 35 | '-z', '-n', '-eq', '-ne', '-lt', '-le', '-gt', '-ge' 36 | }, '-')) 37 | 38 | -- identifiers 39 | local identifier = token('identifier', word) 40 | 41 | -- variables 42 | local variable = token('variable', '$' * (S('!#?*@$') + 43 | delimited_range('()', nil, true, false, '\n') + 44 | delimited_range('[]', nil, true, false, '\n') + 45 | delimited_range('{}', nil, true, false, '\n') + 46 | delimited_range('`', nil, true, false, '\n') + 47 | digit^1 + 48 | word)) 49 | 50 | -- operators 51 | local operator = token('operator', S('=!<>+-/*^~.,:;?()[]{}')) 52 | 53 | function LoadTokens() 54 | local shell = bash 55 | add_token(shell, 'whitespace', ws) 56 | add_token(shell, 'keyword', keyword) 57 | add_token(shell, 'identifier', identifier) 58 | add_token(shell, 'string', string) 59 | add_token(shell, 'comment', comment) 60 | add_token(shell, 'number', number) 61 | add_token(shell, 'variable', variable) 62 | add_token(shell, 'operator', operator) 63 | add_token(shell, 'any_char', any_char) 64 | end 65 | -------------------------------------------------------------------------------- /scite/custom/lexers/batch.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Batch LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local rem = (P('REM') + 'rem') * space 11 | local comment = token('comment', (rem + ':') * nonnewline^0) 12 | 13 | -- strings 14 | local string = token('string', delimited_range('"', '\\', true, false, '\n')) 15 | 16 | -- keywords 17 | local keyword = token('keyword', word_match(word_list{ 18 | 'cd', 'chdir', 'md', 'mkdir', 'cls', 'for', 'if', 'echo', 'echo.', 'move', 19 | 'copy', 'move', 'ren', 'del', 'set', 'call', 'exit', 'setlocal', 'shift', 20 | 'endlocal', 'pause', 'defined', 'exist', 'errorlevel', 'else', 'in', 'do', 21 | 'NUL', 'AUX', 'PRN', 'not', 'goto', 22 | }, nil, true)) 23 | 24 | -- functions 25 | local func = token('function', word_match(word_list{ 26 | 'APPEND', 'ATTRIB', 'CHKDSK', 'CHOICE', 'DEBUG', 'DEFRAG', 'DELTREE', 27 | 'DISKCOMP', 'DISKCOPY', 'DOSKEY', 'DRVSPACE', 'EMM386', 'EXPAND', 'FASTOPEN', 28 | 'FC', 'FDISK', 'FIND', 'FORMAT', 'GRAPHICS', 'KEYB', 'LABEL', 'LOADFIX', 29 | 'MEM', 'MODE', 'MORE', 'MOVE', 'MSCDEX', 'NLSFUNC', 'POWER', 'PRINT', 'RD', 30 | 'REPLACE', 'RESTORE', 'SETVER', 'SHARE', 'SORT', 'SUBST', 'SYS', 'TREE', 31 | 'UNDELETE', 'UNFORMAT', 'VSAFE', 'XCOPY', 32 | }, nil, true)) 33 | 34 | -- identifiers 35 | local identifier = token('identifier', word) 36 | 37 | -- variables 38 | local variable = token('variable', '%' * (digit + '%' * alpha) + 39 | delimited_range('%', nil, false, false, '\n')) 40 | 41 | -- labels 42 | local label = token('label', ':' * word) 43 | 44 | -- operators 45 | local operator = token('operator', S('+|&!<>=')) 46 | 47 | function LoadTokens() 48 | local batch = batch 49 | add_token(batch, 'whitespace', ws) 50 | add_token(batch, 'keyword', keyword) 51 | add_token(batch, 'function', func) 52 | add_token(batch, 'comment', comment) 53 | add_token(batch, 'identifier', identifier) 54 | add_token(batch, 'string', string) 55 | add_token(batch, 'variable', variable) 56 | add_token(batch, 'label', label) 57 | add_token(batch, 'operator', operator) 58 | add_token(batch, 'any_char', any_char) 59 | end 60 | 61 | function LoadStyles() 62 | add_style('label', style_constant) 63 | end 64 | 65 | -- line by line lexer 66 | LexByLine = true 67 | -------------------------------------------------------------------------------- /scite/custom/lexers/container.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Container LPeg lexer 3 | 4 | module(..., package.seeall) 5 | 6 | function Lex(input) return {} end 7 | -------------------------------------------------------------------------------- /scite/custom/lexers/diff.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Diff LPeg Lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- If the pattern matches the start of a line, match the entire line. 10 | local function line_match(pattern) 11 | return P(function(input, idx) 12 | if input:match(pattern, idx) then return #input end 13 | end) 14 | end 15 | 16 | -- text, separators, file headers 17 | local text = token('comment', line_match('^Index: .*$')) 18 | local separator = token('separator', ('---' + P('*')^4 + P('=')^1)) * ws^0 * P(-1) 19 | local header_file = token('header_file', (P('*** ') + '--- ' + '+++ ') * any^1) 20 | 21 | -- positions 22 | local number_range = digit^1 * (',' * digit^1)^-1 23 | local normal_pos = number_range * S('adc') * number_range 24 | local context_pos = '*** ' * number_range * ' ****' + 25 | '--- ' * number_range * ' ----' 26 | local unified_pos = P('@@ ') * '-' * number_range * ' +' * number_range * ' @@' 27 | local position = token('position', normal_pos + context_pos + unified_pos) * any^0 * P(-1) 28 | 29 | -- additions, deletions, changes 30 | local addition = token('addition', line_match('^[>+].*$')) 31 | local deletion = token('deletion', line_match('^[<-].*$')) 32 | local change = token('change', line_match('^! .*$')) 33 | 34 | function LoadTokens() 35 | add_token(diff, 'whitespace', ws) 36 | add_token(diff, 'text', text) 37 | add_token(diff, 'separator', separator) 38 | add_token(diff, 'header_file', header_file) 39 | add_token(diff, 'position', position) 40 | add_token(diff, 'addition', addition) 41 | add_token(diff, 'deletion', deletion) 42 | add_token(diff, 'change', change) 43 | add_token(diff, 'any_line', token('default', any^1)) 44 | end 45 | 46 | function LoadStyles() 47 | add_style('separator', style_comment) 48 | add_style('header_file', style_nothing..{ bold = true }) 49 | add_style('position', style_number) 50 | add_style('addition', style_nothing..{ back = colors.green, eolfilled = true }) 51 | add_style('deletion', style_nothing..{ back = colors.red, eolfilled = true }) 52 | add_style('change', style_nothing..{ back = colors.yellow, eolfilled = true }) 53 | end 54 | 55 | LexByLine = true 56 | -------------------------------------------------------------------------------- /scite/custom/lexers/eiffel.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Eiffel LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local comment = token('comment', '--' * nonnewline^0) 11 | 12 | -- strings 13 | local sq_str = delimited_range("'", '\\', true, false, '\n') 14 | local dq_str = delimited_range('"', '\\', true, false, '\n') 15 | local string = token('string', sq_str + dq_str) 16 | 17 | -- numbers 18 | local number = token('number', float + integer) 19 | 20 | -- keywords 21 | local keyword = token('keyword', word_match(word_list{ 22 | 'alias', 'all', 'and', 'as', 'check', 'class', 'creation', 'debug', 23 | 'deferred', 'do', 'else', 'elseif', 'end', 'ensure', 'expanded', 'export', 24 | 'external', 'feature', 'from', 'frozen', 'if', 'implies', 'indexing', 'infix', 25 | 'inherit', 'inspect', 'invariant', 'is', 'like', 'local', 'loop', 'not', 26 | 'obsolete', 'old', 'once', 'or', 'prefix', 'redefine', 'rename', 'require', 27 | 'rescue', 'retry', 'select', 'separate', 'then', 'undefine', 'until', 28 | 'variant', 'when', 'xor', 29 | 'current', 'false', 'precursor', 'result', 'strip', 'true', 'unique', 'void' 30 | })) 31 | 32 | -- types 33 | local type = token('type', word_match(word_list{ 34 | 'character', 'string', 'bit', 'boolean', 'integer', 'real', 'none', 'any' 35 | })) 36 | 37 | -- identifiers 38 | local identifier = token('identifier', word) 39 | 40 | -- operators 41 | local operator = token('operator', S('=!<>+-/*%&|^~.,:;?()[]{}')) 42 | 43 | function LoadTokens() 44 | local eiffel = eiffel 45 | add_token(eiffel, 'whitespace', ws) 46 | add_token(eiffel, 'keyword', keyword) 47 | add_token(eiffel, 'type', type) 48 | add_token(eiffel, 'identifier', identifier) 49 | add_token(eiffel, 'string', string) 50 | add_token(eiffel, 'comment', comment) 51 | add_token(eiffel, 'number', number) 52 | add_token(eiffel, 'operator', operator) 53 | add_token(eiffel, 'any_char', any_char) 54 | end 55 | -------------------------------------------------------------------------------- /scite/custom/lexers/errorlist.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Errorlist LPeg Lexer 3 | 4 | module(..., package.seeall) 5 | local P, S = lpeg.P, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | local function line_match(pattern) 10 | return P(function(input, idx) 11 | if input:find(pattern) then return idx + #input end 12 | end) 13 | end 14 | 15 | -- command or return status 16 | local cmd = token('command', line_match('^>.*$')) 17 | 18 | -- :: 19 | local generic = token('generic_error', line_match('^.-:%d+:.*$')) 20 | 21 | function LoadTokens() 22 | add_token(errorlist, 'whitespace', ws) 23 | add_token(errorlist, 'command', cmd) 24 | add_token(errorlist, 'generic_error', generic) 25 | add_token(errorlist, 'any_line', P(1)^1) 26 | end 27 | 28 | function LoadStyles() 29 | add_style('command', style_nothing) 30 | add_style('generic_error', style_error) 31 | end 32 | 33 | LexByLine = true 34 | -------------------------------------------------------------------------------- /scite/custom/lexers/forth.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Forth LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local line_comment = S('|\\') * nonnewline^0 11 | local block_comment = '(*' * (any - '*)')^0 * P('*)')^-1 12 | local comment = token('comment', line_comment + block_comment) 13 | 14 | -- strings 15 | local s_str = 's' * delimited_range('"', nil, true, false, '\n') 16 | local dot_str = '.' * delimited_range('"', nil, true, false, '\n') 17 | local f_str = 'f' * delimited_range('"', nil, true, false, '\n') 18 | local dq_str = delimited_range('"', nil, true, false, '\n') 19 | local string = token('string', s_str + dot_str + f_str + dq_str) 20 | 21 | -- numbers 22 | local number = token('number', P('-')^-1 * digit^1 * (S('./') * digit^1)^-1) 23 | 24 | -- keywords 25 | local keyword = token('keyword', word_match(word_list{ 26 | 'swap', 'drop', 'dup', 'nip', 'over', 'rot', '-rot', '2dup', '2drop', '2over', 27 | '2swap', '>r', 'r>', 28 | 'and', 'or', 'xor', '>>', '<<', 'not', 'negate', 'mod', '/mod', '1+', '1-', 29 | 'base', 'hex', 'decimal', 'binary', 'octal', 30 | '@', '!', 'c@', 'c!', '+!', 'cell+', 'cells', 'char+', 'chars', 31 | 'create', 'does>', 'variable', 'variable,', 'literal', 'last', '1,', '2,', 32 | '3,', ',', 'here', 'allot', 'parse', 'find', 'compile', 33 | -- operators 34 | 'if', '=if', 'if', '<>if', 'then', 'repeat', 'until', 'forth', 'macro' 35 | }, '2><1-@!+3,=')) 36 | 37 | -- identifiers 38 | local word = (alnum + S('+-*=<>.?/\'%,_$'))^1 39 | local identifier = token('identifier', word) 40 | 41 | -- operators 42 | local operator = token('operator', S(':;<>+*-/()[]')) 43 | 44 | function LoadTokens() 45 | local forth = forth 46 | add_token(forth, 'whitespace', ws) 47 | add_token(forth, 'keyword', keyword) 48 | add_token(forth, 'string', string) 49 | add_token(forth, 'identifier', identifier) 50 | add_token(forth, 'comment', comment) 51 | add_token(forth, 'number', number) 52 | add_token(forth, 'operator', operator) 53 | add_token(forth, 'any_char', any_char) 54 | end 55 | -------------------------------------------------------------------------------- /scite/custom/lexers/gap.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Gap LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local comment = token('comment', '#' * nonnewline^0) 11 | 12 | -- strings 13 | local sq_str = delimited_range("'", '\\', true, false, '\n') 14 | local dq_str = delimited_range('"', '\\', true, false, '\n') 15 | local string = token('string', sq_str + dq_str) 16 | 17 | -- numbers 18 | local number = token('number', digit^1 * -alpha) 19 | 20 | -- keywords 21 | local keyword = token('keyword', word_match(word_list{ 22 | 'and', 'break', 'continue', 'do', 'elif', 'else', 'end', 'fail', 'false', 23 | 'fi', 'for', 'function', 'if', 'in', 'infinity', 'local', 'not', 'od', 'or', 24 | 'rec', 'repeat', 'return', 'then', 'true', 'until', 'while' 25 | })) 26 | 27 | -- identifiers 28 | local identifier = token('identifier', word) 29 | 30 | -- operators 31 | local operator = token('operator', S('*+-,./:;<=>~^#()[]{}')) 32 | 33 | function LoadTokens() 34 | local gap = gap 35 | add_token(gap, 'whitespace', ws) 36 | add_token(gap, 'keyword', keyword) 37 | add_token(gap, 'identifier', identifier) 38 | add_token(gap, 'string', string) 39 | add_token(gap, 'comment', comment) 40 | add_token(gap, 'number', number) 41 | add_token(gap, 'operator', operator) 42 | add_token(gap, 'any_char', any_char) 43 | end 44 | -------------------------------------------------------------------------------- /scite/custom/lexers/gettext.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Gettext LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local comment = token('comment', '#' * S(': .~') * nonnewline^0) 11 | 12 | -- strings 13 | local string = token('string', delimited_range('"', '\\', true, false, '\n')) 14 | 15 | -- keywords 16 | local keyword = token('keyword', word_match(word_list{ 17 | 'msgid', 'msgid_plural', 'msgstr', 'fuzzy', 'c-format', 'no-c-format' 18 | }, '-', true)) 19 | 20 | -- identifiers 21 | local identifier = token('identifier', word) 22 | 23 | -- variables 24 | local variable = token('variable', S('%$@') * word) 25 | 26 | function LoadTokens() 27 | local gettext = gettext 28 | add_token(gettext, 'whitespace', ws) 29 | add_token(gettext, 'comment', comment) 30 | add_token(gettext, 'string', string) 31 | add_token(gettext, 'keyword', keyword) 32 | add_token(gettext, 'identifier', identifier) 33 | add_token(gettext, 'variable', variable) 34 | add_token(gettext, 'any_char', any_char) 35 | end 36 | -------------------------------------------------------------------------------- /scite/custom/lexers/haskell.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Haskell LPeg Lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local line_comment = '--' * nonnewline_esc^0 11 | local block_comment = '{-' * (any - '-}')^0 * P('-}')^-1 12 | local comment = token('comment', line_comment + block_comment) 13 | 14 | -- strings 15 | local sq_str = delimited_range("'", nil, true, false, '\n') 16 | local dq_str = delimited_range('"', '\\', true) 17 | local string = token('string', sq_str + dq_str) 18 | 19 | -- numbers 20 | local number = token('number', float + integer) 21 | 22 | -- keywords 23 | local keyword = token('keyword', word_match(word_list{ 24 | 'case', 'class', 'data', 'default', 'deriving', 'do', 'else', 'if', 'import', 25 | 'in', 'infix', 'infixl', 'infixr', 'instance', 'let', 'module', 'newtype', 26 | 'of', 'then', 'type', 'where', '_', 'as', 'qualified', 'hiding', 27 | 'EQ', 'False', 'GT', 'Just', 'LT', 'Left', 'Nothing', 'Right', 'True', 28 | -- operators 29 | 'quot', 'rem', 'div', 'mod', 'elem', 'notElem', 'seq' 30 | })) 31 | 32 | -- types 33 | local type = token('type', word_match(word_list{ 34 | 'Addr', 'Bool', 'Bounded', 'Char', 'Double', 'Either', 'Enum', 'Eq', 35 | 'FilePath', 'Float', 'Floating', 'Fractional', 'Functor', 'IO', 'IOError', 36 | 'IOResult', 'Int', 'Integer', 'Integral', 'Ix', 'Maybe', 'Monad', 'Num', 37 | 'Ord', 'Ordering', 'Ratio', 'Rational', 'Read', 'ReadS', 'Real', 'RealFloat', 38 | 'RealFrac', 'Show', 'ShowS', 'String' 39 | })) 40 | 41 | -- identifiers 42 | local word = (alpha + '_') * (alnum + S("._'#"))^0 43 | local identifier = token('identifier', word) 44 | 45 | -- operators 46 | local operator = token('operator', S('.&:<>+-*/%^=|@~!$()[]{}')) 47 | 48 | function LoadTokens() 49 | local haskell = haskell 50 | add_token(haskell, 'whitespace', ws) 51 | add_token(haskell, 'keyword', keyword) 52 | add_token(haskell, 'type', type) 53 | add_token(haskell, 'identifier', identifier) 54 | add_token(haskell, 'string', string) 55 | add_token(haskell, 'comment', comment) 56 | add_token(haskell, 'number', number) 57 | add_token(haskell, 'operator', operator) 58 | add_token(haskell, 'any_char', any_char) 59 | end 60 | -------------------------------------------------------------------------------- /scite/custom/lexers/idl.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- IDL LPeg Lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local line_comment = '//' * nonnewline_esc^0 11 | local block_comment = '/*' * (any - '*/')^0 * P('*/')^-1 12 | local comment = token('comment', line_comment + block_comment) 13 | 14 | -- strings 15 | local sq_str = delimited_range("'", '\\', true, false, '\n') 16 | local dq_str = delimited_range('"', '\\', true, false, '\n') 17 | local string = token('string', sq_str + dq_str) 18 | 19 | -- numbers 20 | local number = token('number', float + integer) 21 | 22 | -- preprocessor 23 | local preproc_word = word_match(word_list{ 24 | 'define', 'undef', 'ifdef', 'ifndef', 'if', 'elif', 'else', 'endif', 25 | 'include', 'warning', 'pragma' 26 | }) 27 | local preproc = 28 | token('preprocessor', #P('#') * starts_line('#' * preproc_word) * nonnewline^0) 29 | 30 | -- keywords 31 | local keyword = token('keyword', word_match(word_list{ 32 | 'abstract', 'attribute', 'case', 'const', 'context', 'custom', 'default', 33 | 'exception', 'enum', 'factory', 'FALSE', 'in', 'inout', 'interface', 'local', 34 | 'module', 'native', 'oneway', 'out', 'private', 'public', 'raises', 35 | 'readonly', 'struct', 'support', 'switch', 'TRUE', 'truncatable', 'typedef', 36 | 'union', 'valuetype' 37 | })) 38 | 39 | -- types 40 | local type = token('type', word_match(word_list{ 41 | 'any', 'boolean', 'char', 'double', 'fixed', 'float', 'long', 'Object', 42 | 'octet', 'sequence', 'short', 'string', 'unsigned', 'ValueBase', 'void', 43 | 'wchar', 'wstring' 44 | })) 45 | 46 | -- identifiers 47 | local identifier = token('identifier', word) 48 | 49 | -- operators 50 | local operator = token('operator', S('!<>=+-/*%&|^~.,:;?()[]{}')) 51 | 52 | function LoadTokens() 53 | local idl = idl 54 | add_token(idl, 'whitespace', ws) 55 | add_token(idl, 'keyword', keyword) 56 | add_token(idl, 'type', type) 57 | add_token(idl, 'identifier', identifier) 58 | add_token(idl, 'string', string) 59 | add_token(idl, 'comment', comment) 60 | add_token(idl, 'number', number) 61 | add_token(idl, 'preprocessor', preproc) 62 | add_token(idl, 'operator', operator) 63 | add_token(idl, 'any_char', any_char) 64 | end 65 | -------------------------------------------------------------------------------- /scite/custom/lexers/ini.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Ini LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local comment = token('comment', #S(';#') * starts_line(S(';#') * nonnewline^0)) 11 | 12 | -- strings 13 | local sq_str = delimited_range("'", '\\', true) 14 | local dq_str = delimited_range('"', '\\', true) 15 | local label = delimited_range('[]', nil, true, false, '\n') 16 | local string = token('string', sq_str + dq_str + label) 17 | 18 | -- numbers 19 | local dec = digit^1 * ('_' * digit^1)^0 20 | local oct_num = '0' * S('01234567_')^1 21 | local integer = S('+-')^-1 * (hex_num + oct_num + dec) 22 | local number = token('number', (float + integer)) 23 | 24 | -- keywords 25 | local keyword = token('keyword', word_match(word_list{ 26 | 'true', 'false', 'on', 'off', 'yes', 'no' 27 | })) 28 | 29 | -- identifiers 30 | local word = (alpha + '_') * (alnum + S('_.'))^0 31 | local identifier = token('identifier', word) 32 | 33 | -- operators 34 | local operator = token('operator', '=') 35 | 36 | function LoadTokens() 37 | local ini = ini 38 | add_token(ini, 'whitespace', ws) 39 | add_token(ini, 'keyword', keyword) 40 | add_token(ini, 'identifier', identifier) 41 | add_token(ini, 'string', string) 42 | add_token(ini, 'comment', comment) 43 | add_token(ini, 'number', number) 44 | add_token(ini, 'operator', operator) 45 | add_token(ini, 'any_char', any_char) 46 | end 47 | 48 | -- line by line lexer 49 | LexByLine = true 50 | -------------------------------------------------------------------------------- /scite/custom/lexers/java.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Java LPeg Lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local line_comment = '//' * nonnewline_esc^0 11 | local block_comment = '/*' * (any - '*/')^0 * P('*/')^-1 12 | local comment = token('comment', line_comment + block_comment) 13 | 14 | -- strings 15 | local sq_str = delimited_range("'", '\\', true, false, '\n') 16 | local dq_str = delimited_range('"', '\\', true, false, '\n') 17 | local string = token('string', sq_str + dq_str) 18 | 19 | -- numbers 20 | local number = token('number', (float + integer) * S('LlFfDd')^-1) 21 | 22 | -- keywords 23 | local keyword = token('keyword', word_match(word_list{ 24 | 'abstract', 'assert', 'break', 'case', 'catch', 'class', 'const', 'continue', 25 | 'default', 'do', 'else', 'extends', 'final', 'finally', 'for', 'future', 26 | 'generic', 'goto', 'if', 'implements', 'import', 'inner', 'instanceof', 27 | 'interface', 'native', 'new', 'null', 'outer', 'package', 'private', 28 | 'protected', 'public', 'rest', 'return', 'static', 'super', 'switch', 29 | 'synchronized', 'this', 'throw', 'throws', 'transient', 'try', 'var', 'while', 30 | 'volatile', 31 | 'true', 'false' 32 | })) 33 | 34 | -- types 35 | local type = token('type', word_match(word_list{ 36 | 'boolean', 'byte', 'char', 'double', 'float', 'int', 'long', 'short', 'void' 37 | })) 38 | 39 | -- identifiers 40 | local identifier = token('identifier', word) 41 | 42 | -- operators 43 | local operator = token('operator', S('+-/*%<>!=^&|?~:;.()[]{}')) 44 | 45 | function LoadTokens() 46 | local java = java 47 | add_token(java, 'whitespace', ws) 48 | add_token(java, 'keyword', keyword) 49 | add_token(java, 'type', type) 50 | add_token(java, 'identifier', identifier) 51 | add_token(java, 'string', string) 52 | add_token(java, 'comment', comment) 53 | add_token(java, 'number', number) 54 | add_token(java, 'operator', operator) 55 | add_token(java, 'any_char', any_char) 56 | end 57 | -------------------------------------------------------------------------------- /scite/custom/lexers/makefile.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Makefile LPeg Lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | local assign = token('operator', P(':')^-1 * '=') 10 | local colon = token('operator', ':') * -P('=') 11 | 12 | -- comments 13 | local comment = token('comment', '#' * nonnewline^0) 14 | 15 | -- preprocessor 16 | local preproc = token('preprocessor', '!' * nonnewline^0) 17 | 18 | -- targets 19 | local target = token('target', (any - ':')^1) * colon * (ws * nonnewline^0)^-1 20 | 21 | -- commands 22 | local command = #P('\t') * token('command', nonnewline^1) 23 | 24 | -- lines 25 | local var_char = any - space - S(':#=') 26 | local identifier = token('identifier', var_char^1) * ws^0 * assign 27 | local macro = token('macro', '$' * (delimited_range('()', nil, nil, true) + S('<@'))) 28 | local regular_line = ws + identifier + macro + comment + any_char 29 | 30 | function LoadTokens() 31 | local makefile = makefile 32 | add_token(makefile, 'comment', comment) 33 | add_token(makefile, 'preprocessor', preproc) 34 | add_token(makefile, 'target', target) 35 | add_token(makefile, 'command', command) 36 | add_token(makefile, 'whitespace', ws) 37 | add_token(makefile, 'line', regular_line) 38 | end 39 | 40 | function LoadStyles() 41 | add_style('target', style_definition) 42 | add_style('command', style_string) 43 | add_style('identifier', style_nothing..{ bold = true }) 44 | add_style('macro', style_keyword) 45 | end 46 | 47 | LexByLine = true 48 | -------------------------------------------------------------------------------- /scite/custom/lexers/maxima.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Maxima LPeg Lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', whitespace^1) 8 | 9 | function LoadTokens() 10 | local maxima = maxima 11 | add_token(maxima, 'whitespace', ws) 12 | end 13 | -------------------------------------------------------------------------------- /scite/custom/lexers/null.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Null LPeg lexer 3 | 4 | module(..., package.seeall) 5 | 6 | function Lex(input) return {} end 7 | -------------------------------------------------------------------------------- /scite/custom/lexers/pike.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Pike LPeg Lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local line_comment = '//' * nonnewline_esc^0 11 | local nested_comment = nested_pair('/*', '*/', true) 12 | local comment = token('comment', line_comment + nested_comment) 13 | 14 | -- strings 15 | local sq_str = delimited_range("'", '\\', true, false, '\n') 16 | local dq_str = delimited_range('"', '\\', true, false, '\n') 17 | local lit_str = '#' * delimited_range('"', '\\', true) 18 | local string = token('string', sq_str + dq_str + lit_str) 19 | 20 | -- numbers 21 | local number = token('number', (float + integer) * S('lLdDfF')^-1) 22 | 23 | -- preprocessors 24 | local preproc = token('preprocessor', #P('#') * starts_line('#' * nonnewline^0)) 25 | 26 | -- keywords 27 | local keyword = token('keyword', word_match(word_list{ 28 | 'break', 'case', 'catch', 'continue', 'default', 'do', 'else', 'for', 29 | 'foreach', 'gauge', 'if', 'lambda', 'return', 'sscanf', 'switch', 'while', 30 | 'import', 'inherit', 31 | -- type modifiers 32 | 'constant', 'extern', 'final', 'inline', 'local', 'nomask', 'optional', 33 | 'private', 'protected', 'public', 'static', 'variant' 34 | })) 35 | 36 | -- types 37 | local type = token('type', word_match(word_list{ 38 | 'array', 'class', 'float', 'function', 'int', 'mapping', 'mixed', 'multiset', 39 | 'object', 'program', 'string', 'void' 40 | })) 41 | 42 | -- identifiers 43 | local identifier = token('identifier', word) 44 | 45 | -- operators 46 | local operator = token('operator', S('<>=!+-/*%&|^~@`.,:;()[]{}')) 47 | 48 | function LoadTokens() 49 | local pike = pike 50 | add_token(pike, 'whitespace', ws) 51 | add_token(pike, 'keyword', keyword) 52 | add_token(pike, 'type', type) 53 | add_token(pike, 'identifier', identifier) 54 | add_token(pike, 'string', string) 55 | add_token(pike, 'comment', comment) 56 | add_token(pike, 'number', number) 57 | add_token(pike, 'preproc', preproc) 58 | add_token(pike, 'operator', operator) 59 | add_token(pike, 'any_char', any_char) 60 | end 61 | 62 | function LoadStyles() 63 | add_style('annotation', style_preproc) 64 | end 65 | -------------------------------------------------------------------------------- /scite/custom/lexers/postscript.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Postscript LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local comment = token('comment', '%' * nonnewline^0) 11 | 12 | -- strings 13 | local arrow_string = delimited_range('<>', '\\', true) 14 | local nested_string = delimited_range('()', '\\', true, true) 15 | local string = token('string', arrow_string + nested_string) 16 | 17 | -- numbers 18 | local number = token('number', float + integer) 19 | 20 | -- keywords 21 | local keyword = token('keyword', word_match(word_list{ 22 | 'pop', 'exch', 'dup', 'copy', 'roll', 'clear', 'count', 'mark', 'cleartomark', 23 | 'counttomark', 'exec', 'if', 'ifelse', 'for', 'repeat', 'loop', 'exit', 24 | 'stop', 'stopped', 'countexecstack', 'execstack', 'quit', 'start', 25 | 'true', 'false', 'NULL' 26 | })) 27 | 28 | -- functions 29 | local func = token('function', word_match(word_list{ 30 | 'add', 'div', 'idiv', 'mod', 'mul', 'sub', 'abs', 'ned', 'ceiling', 'floor', 31 | 'round', 'truncate', 'sqrt', 'atan', 'cos', 'sin', 'exp', 'ln', 'log', 'rand', 32 | 'srand', 'rrand' 33 | })) 34 | 35 | -- identifiers 36 | local word = (alpha + '-') * (alnum + '-')^0 37 | local identifier = token('identifier', word) 38 | 39 | -- labels 40 | local label = token('label', '/' * word) 41 | 42 | -- operators 43 | local operator = token('operator', S('[]{}')) 44 | 45 | function LoadTokens() 46 | local ps = postscript 47 | add_token(ps, 'whitespace', ws) 48 | add_token(ps, 'keyword', keyword) 49 | add_token(ps, 'function', func) 50 | add_token(ps, 'identifier', identifier) 51 | add_token(ps, 'string', string) 52 | add_token(ps, 'comment', comment) 53 | add_token(ps, 'number', number) 54 | add_token(ps, 'label', label) 55 | add_token(ps, 'operator', operator) 56 | add_token(ps, 'any_char', any_char) 57 | end 58 | 59 | function LoadStyles() 60 | add_style('label', style_variable) 61 | end 62 | -------------------------------------------------------------------------------- /scite/custom/lexers/props.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Props LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local comment = token('comment', #P('#') * starts_line('#' * nonnewline^0)) 11 | 12 | -- equals 13 | local equals = token('operator', '=') 14 | 15 | -- strings 16 | local sq_str = delimited_range("'", '\\', true) 17 | local dq_str = delimited_range('"', '\\', true) 18 | local string = token('string', sq_str + dq_str) 19 | 20 | -- variables 21 | local variable = token('variable', '$(' * (any - ')')^1 * ')') 22 | 23 | -- colors 24 | local color = token('color', '#' * xdigit * xdigit * xdigit * xdigit * xdigit * xdigit) 25 | 26 | function LoadTokens() 27 | local props = props 28 | add_token(props, 'whitespace', ws) 29 | add_token(props, 'comment', comment) 30 | add_token(props, 'equals', equals) 31 | add_token(props, 'string', string) 32 | add_token(props, 'variable', variable) 33 | add_token(props, 'color', color) 34 | add_token(props, 'any_char', any_char) 35 | end 36 | 37 | function LoadStyles() 38 | add_style('variable', style_keyword) 39 | add_style('color', style_number) 40 | end 41 | 42 | -- line by line lexer 43 | LexByLine = true 44 | -------------------------------------------------------------------------------- /scite/custom/lexers/r.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- R LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local comment = token('comment', '#' * nonnewline^0) 11 | 12 | -- strings 13 | local sq_str = delimited_range("'", '\\', true, false, '\n') 14 | local dq_str = delimited_range('"', '\\', true, false, '\n') 15 | local string = token('string', sq_str + dq_str) 16 | 17 | -- numbers 18 | local number = token('number', (float + integer) * P('i')^-1) 19 | 20 | -- keywords 21 | local keyword = token('keyword', word_match(word_list{ 22 | 'break', 'else', 'for', 'if', 'in', 'next', 'repeat', 'return', 'switch', 23 | 'try', 'while', 'Inf', 'NA', 'NaN', 'NULL', 'FALSE', 'TRUE' 24 | })) 25 | 26 | -- types 27 | local type = token('type', word_match(word_list{ 28 | 'array', 'character', 'complex', 'data.frame', 'double', 'factor', 'function', 29 | 'integer', 'list', 'logical', 'matrix', 'numeric', 'vector' 30 | })) 31 | 32 | -- identifiers 33 | local identifier = token('identifier', word) 34 | 35 | -- operators 36 | local operator = token('operator', S('<->+*/^=.,:;|$()[]{}')) 37 | 38 | function LoadTokens() 39 | local r = r 40 | add_token(r, 'whitespace', ws) 41 | add_token(r, 'keyword', keyword) 42 | add_token(r, 'type', type) 43 | add_token(r, 'identifier', identifier) 44 | add_token(r, 'string', string) 45 | add_token(r, 'comment', comment) 46 | add_token(r, 'number', number) 47 | add_token(r, 'operator', operator) 48 | add_token(r, 'any_char', any_char) 49 | end 50 | -------------------------------------------------------------------------------- /scite/custom/lexers/rhtml.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- RHTML LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, S = lpeg.P, lpeg.S 6 | 7 | local html = require 'hypertext' 8 | local ruby = require 'ruby' 9 | 10 | function LoadTokens() 11 | html.LoadTokens() 12 | ruby.LoadTokens() 13 | 14 | local start_token = token('rhtml_tag', '<%' * P('=')^-1) 15 | local end_token = token('rhtml_tag', '%>') 16 | ruby.TokenPatterns.whitespace = token('rhtml_whitespace', space^1) 17 | ruby.TokenPatterns.string = -P('%>') * ruby.TokenPatterns.string 18 | ruby.TokenPatterns.operator = token('operator', S('!^&*()[]{}-=+/|:;.,?<>~') + 19 | '%' * -P('>')) 20 | ruby.TokenPatterns.any_char = token('rhtml_default', any - end_token) 21 | make_embeddable(ruby, html, start_token, end_token) 22 | embed_language(html, ruby, true) 23 | 24 | -- TODO: modify HTML, CSS, and JS patterns accordingly 25 | 26 | UseOtherTokens = html.Tokens 27 | 28 | -- Since Ruby is being embedded in the HTML lexer, html.EmbeddedIn is a table 29 | -- and LexLPeg would recognize it as a multi-language lexer. However, RHTML is 30 | -- the lexer in use and it has no EmbeddedIn table so it would be recognized 31 | -- as a single language lexer and styling would be very flaky. Fix this by 32 | -- adding EmbeddedIn explicitly. 33 | EmbeddedIn = {} 34 | end 35 | 36 | function LoadStyles() 37 | html.LoadStyles() 38 | ruby.LoadStyles() 39 | add_style('rhtml_whitespace', style_nothing) 40 | add_style('rhtml_default', style_nothing) 41 | add_style('rhtml_tag', style_embedded) 42 | end 43 | -------------------------------------------------------------------------------- /scite/custom/lexers/smalltalk.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- Smalltalk LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local comment = token('comment', delimited_range('"', nil, true)) 11 | 12 | -- strings 13 | local sq_str = delimited_range("'", '\\', true) 14 | local literal = '$' * word 15 | local string = token('string', sq_str + literal) 16 | 17 | -- numbers 18 | local number = token('number', float + integer) 19 | 20 | -- keywords 21 | local keyword = token('keyword', word_match(word_list{ 22 | 'true', 'false', 'nil', 'self', 'super', 'isNil', 'not', 'Smalltalk', 23 | 'Transcript' 24 | })) 25 | 26 | -- types 27 | local type = token('type', word_match(word_list{ 28 | 'Date', 'Time', 'Boolean', 'True', 'False', 'Character', 'String', 'Array', 29 | 'Symbol', 'Integer', 'Object' 30 | })) 31 | 32 | -- identifiers 33 | local identifier = token('identifier', word) 34 | 35 | -- labels 36 | local label = token('label', '#' * word) 37 | 38 | -- operators 39 | local operator = token('operator', S(':=_<>+-/*!()[]')) 40 | 41 | function LoadTokens() 42 | local smalltalk = smalltalk 43 | add_token(smalltalk, 'whitespace', ws) 44 | add_token(smalltalk, 'keyword', keyword) 45 | add_token(smalltalk, 'type', type) 46 | add_token(smalltalk, 'identifier', identifier) 47 | add_token(smalltalk, 'string', string) 48 | add_token(smalltalk, 'comment', comment) 49 | add_token(smalltalk, 'number', number) 50 | add_token(smalltalk, 'label', label) 51 | add_token(smalltalk, 'operator', operator) 52 | add_token(smalltalk, 'any_char', any_char) 53 | end 54 | 55 | function LoadStyle() 56 | add_style('label', style_variable) 57 | end 58 | -------------------------------------------------------------------------------- /scite/custom/lexers/tcl.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2010 Mitchell Foral mitchellcaladbolg.net. See LICENSE. 2 | -- TCL LPeg lexer 3 | 4 | module(..., package.seeall) 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local ws = token('whitespace', space^1) 8 | 9 | -- comments 10 | local comment = token('comment', '#' * nonnewline^0) 11 | 12 | -- strings 13 | local sq_str = delimited_range("'", '\\', true, false, '\n') 14 | local dq_str = delimited_range('"', '\\', true, false, '\n') 15 | local regex = delimited_range('/', '\\', false, false, '\n') 16 | local string = token('string', sq_str + dq_str + regex) 17 | 18 | -- numbers 19 | local number = token('number', float + integer) 20 | 21 | -- keywords 22 | local keyword = token('keyword', word_match(word_list{ 23 | 'string', 'subst', 'regexp', 'regsub', 'scan', 'format', 'binary', 'list', 24 | 'split', 'join', 'concat', 'llength', 'lrange', 'lsearch', 'lreplace', 25 | 'lindex', 'lsort', 'linsert', 'lrepeat', 'dict', 'if', 'else', 'elseif', 26 | 'then', 'for', 'foreach', 'switch', 'case', 'while', 'continue', 'return', 27 | 'break', 'catch', 'error', 'eval', 'uplevel', 'after', 'update', 'vwait', 28 | 'proc', 'rename', 'set', 'lset', 'lassign', 'unset', 'namespace', 'variable', 29 | 'upvar', 'global', 'trace', 'array', 'incr', 'append', 'lappend', 'expr', 30 | 'file', 'open', 'close', 'socket', 'fconfigure', 'puts', 'gets', 'read', 31 | 'seek', 'tell', 'eof', 'flush', 'fblocked', 'fcopy', 'fileevent', 'source', 32 | 'load', 'unload', 'package', 'info', 'interp', 'history', 'bgerror', 33 | 'unknown', 'memory', 'cd', 'pwd', 'clock', 'time', 'exec', 'glob', 'pid', 34 | 'exit' 35 | })) 36 | 37 | -- identifiers 38 | local identifier = token('identifier', word) 39 | 40 | -- variables 41 | local variable = token('variable', S('$@$') * P('$')^-1 * word) 42 | 43 | -- operators 44 | local operator = token('operator', S('<>=+-*/!@|&.,:;?()[]{}')) 45 | 46 | function LoadTokens() 47 | local tcl = tcl 48 | add_token(tcl, 'whitespace', ws) 49 | add_token(tcl, 'keyword', keyword) 50 | add_token(tcl, 'identifier', identifier) 51 | add_token(tcl, 'string', string) 52 | add_token(tcl, 'comment', comment) 53 | add_token(tcl, 'number', number) 54 | add_token(tcl, 'variable', variable) 55 | add_token(tcl, 'operator', operator) 56 | add_token(tcl, 'any_char', any_char) 57 | end 58 | -------------------------------------------------------------------------------- /scite/custom/lexers/template.txt: -------------------------------------------------------------------------------- 1 | -- ? LPeg lexer 2 | 3 | module(..., package.seeall) 4 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 5 | 6 | Token = any_char 7 | Tokens = lpeg.Ct(Token^0) 8 | 9 | function LoadStyles() 10 | -- add_style('id', style_table) 11 | end 12 | -------------------------------------------------------------------------------- /scite/custom/lexers/tex.lua: -------------------------------------------------------------------------------- 1 | latex.lua -------------------------------------------------------------------------------- /scite/custom/lexers/vbscript.lua: -------------------------------------------------------------------------------- 1 | vb.lua -------------------------------------------------------------------------------- /scite/custom/scite-debug/SciTE.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/SciTE.lib -------------------------------------------------------------------------------- /scite/custom/scite-debug/SciTEIco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/SciTEIco.png -------------------------------------------------------------------------------- /scite/custom/scite-debug/cpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/cpp.png -------------------------------------------------------------------------------- /scite/custom/scite-debug/extman.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/extman.lua -------------------------------------------------------------------------------- /scite/custom/scite-debug/lua_clidebugger/clidebug.lua: -------------------------------------------------------------------------------- 1 | -- utility package loaded before the program to be debugged. 2 | require"debugger" 3 | -- Windows requires this for us to immediately see all output! 4 | io.stdout:setvbuf("no") 5 | pause('debug') 6 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/lua_clidebugger/dbgl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/lua_clidebugger/dbgl.dll -------------------------------------------------------------------------------- /scite/custom/scite-debug/lua_clidebugger/dbgl.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/lua_clidebugger/dbgl.so -------------------------------------------------------------------------------- /scite/custom/scite-debug/makefile: -------------------------------------------------------------------------------- 1 | CONFIGFLAGS=$(shell pkg-config --cflags gtk+-2.0) 2 | 3 | all: unix-spawner-ex.so 4 | 5 | unix-spawner-ex.so: unix-spawner-ex.c 6 | gcc -I/usr/include/lua5.1 -g $(CONFIGFLAGS) -shared -fPIC -o unix-spawner-ex.so unix-spawner-ex.c -lutil 7 | 8 | 9 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/makefile.win32: -------------------------------------------------------------------------------- 1 | spawner-ex.dll: win32-spawner-ex.c 2 | gcc -shared -o spawner-ex.dll -I..\..\lua\include win32-spawner-ex.c scite.la 3 | 4 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/remDebug/remdebug.lua: -------------------------------------------------------------------------------- 1 | -- utility package loaded before the program to be debugged. 2 | require"remdebug.engine" 3 | -- Windows requires this for us to immediately see all output! 4 | io.stdout:setvbuf("no") 5 | remdebug.engine.start() 6 | 7 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite-debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/scite-debug.png -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite.la: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/scite.la -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite_lua/_examples/borland.lua: -------------------------------------------------------------------------------- 1 | -- demonstrates how to capture multiple key sequences, like 'ctrl-k 1', with extman. 2 | -- This is used to implement Borland-style markers. 3 | scite_Command { 4 | 'ctrl-k|do_ctrl_command k|Ctrl+K', 5 | 'ctrl-q|do_ctrl_command q|Ctrl+Q', 6 | } 7 | 8 | local gMarksMap = {} 9 | local gMarks = {} 10 | 11 | scite_OnOpen(function(f) 12 | gMarksMap[f] = {} 13 | end) 14 | 15 | scite_OnSwitchFile(function(f) 16 | gMarks = gMarksMap[f] 17 | end) 18 | 19 | function current_line() 20 | return editor:LineFromPosition(editor.CurrentPos)+1 21 | end 22 | 23 | local markers_defined = false 24 | local base = 9 25 | 26 | function define_markers() 27 | local zero = string.byte('0') 28 | for i = 1,9 do 29 | editor:MarkerDefine(i+base,SC_MARK_CHARACTER + zero + i) 30 | end 31 | markers_defined = true 32 | end 33 | 34 | function do_ctrl_command(key) 35 | editor:BeginUndoAction() 36 | scite_OnChar('once',function (ch) 37 | editor:EndUndoAction() 38 | editor:Undo() 39 | local num = tonumber(ch) 40 | local mark = num and gMarks[num] 41 | local line = current_line() 42 | if key == 'k' and num then 43 | if not markers_defined then define_markers() end 44 | if mark then -- clear mark 45 | gMarks[num] = nil 46 | editor:MarkerDelete(line-1,num+base) 47 | else 48 | gMarks[num] = line 49 | editor:MarkerAdd(line-1,num+base) 50 | print 'mark' 51 | end 52 | elseif key == 'q' and mark then 53 | editor:GotoLine(mark-1) 54 | if ctags_center_pos then ctags_center_pos(mark-1) end 55 | end 56 | return true 57 | end) 58 | end 59 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite_lua/_examples/macro.lua: -------------------------------------------------------------------------------- 1 | -- macro.lua 2 | -- simple SciTE macros 3 | -- note the standard (tho undocumented) macro key bindings 4 | -- Start Recording Ctrl+F9 5 | -- End Recording Shift+Ctrl+F9 6 | -- Play Macro F9 7 | 8 | scite_Command("Test it|do_hicky|*.lua;*.txt;*.c|Ctrl+M") 9 | 10 | function do_hicky() 11 | print 'hicky!' 12 | end 13 | 14 | local append = table.insert 15 | local state,mac 16 | -- you need to add $(status.msg) to the end of your statusbar.text.1 definition 17 | -- to see these messages on the status bar 18 | local function set_state(s) 19 | state = s 20 | props['status.msg'] = state 21 | scite.UpdateStatusBar() 22 | end 23 | 24 | function OnMacro(line) 25 | local idx = line:find('|') 26 | local cmd = line:sub(1,idx-1) 27 | local arg = line:sub(idx+1) 28 | if cmd == 'macro:record' then 29 | if state ~= 'recording' then 30 | set_state 'recording' 31 | mac = {} 32 | end 33 | local _,_,msg,wparam,isstr,str = arg:find('(%d+);(%d+);(%d+);(.*)') 34 | if isstr == '0' then str = '' end 35 | append(mac,{MSG=msg,WPARAM=wparam,STR=str}) 36 | elseif cmd == 'macro:stoprecord' then 37 | set_state '' 38 | elseif cmd == 'macro:run' then 39 | for i,m in ipairs(mac) do 40 | if m.STR ~= '' then 41 | scite.SendEditor(m.MSG,m.STR) 42 | else 43 | scite.SendEditor(m.MSG,m.wparam) 44 | end 45 | end 46 | end 47 | end 48 | 49 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite_lua/_examples/scrunch.lua: -------------------------------------------------------------------------------- 1 | -- scrunch.lua simplifies G++ error messages 2 | 3 | function processLine(line) 4 | if line:find('`') and not line:find("'") then 5 | old_line = gsub(line,'%s+$','') 6 | else 7 | if old_line then 8 | line = line:gsub('^%s+','') 9 | line = old_line..line 10 | old_line = nil 11 | end 12 | line = line:gsub('%,%s*std::allocator%b<>','') 13 | line = line:gsub('class ','') 14 | line = line:gsub('struct ','') 15 | line = line:gsub('std::','') 16 | trace(line) 17 | end 18 | end 19 | 20 | -- this is called with each chunk of output as it becomes available; it may have 21 | -- multiple lines on Windows. 22 | function _gcc_processChunk(s) 23 | local i1 = 1 24 | local i2 = s:find('\n',i1) 25 | while i2 do 26 | local line = s:sub(i1,i2) 27 | processLine(line) 28 | i1 = i2 + 1 29 | i2 = s:find('\n',i1) 30 | end 31 | if i1 <= #s then 32 | local line = s:sub(i1) 33 | processLine(line) 34 | end 35 | end 36 | 37 | -- a good place to put any post-build actions 38 | function _gcc_processResult(res) 39 | print('result was '..res) 40 | end 41 | 42 | function buildx(cmdline) 43 | print('build: '..cmdline) 44 | spawner_obj = spawner.new(cmdline) 45 | -- good practice to mangle these function names since they are global! 46 | spawner_obj:set_output('_gcc_processChunk') 47 | spawner_obj:set_result('_gcc_processResult') 48 | spawner_obj:run() 49 | end 50 | 51 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite_lua/_examples/select_block.lua: -------------------------------------------------------------------------------- 1 | -- this experimental script makes it easy to select blocks with a single click. 2 | -- The usual behaviour is to select the whole line, and if that line happens to be a fold line 3 | -- then select the rest of that block. 4 | 5 | scite_require 'bit.luax' 6 | 7 | --scite_Command("Testit|gone|Escape") 8 | 9 | local line = 0 10 | local pos = 0 11 | local last_line, last_pos 12 | 13 | function line_selected() 14 | -- if not scite_GetProp('fold') then return end 15 | local s1 = editor.SelectionStart 16 | local s2 = editor.SelectionEnd 17 | pos = editor.CurrentPos 18 | line = editor:LineFromPosition(pos) 19 | if s2 > s1 then -- non-trivial selection 20 | local line = editor:LineFromPosition(s1) 21 | if editor:PositionFromLine(line) > s1 then 22 | return -- because selection didn't start at begining of line 23 | end 24 | if s2 == editor:PositionFromLine(line+1) then -- whole line selected! 25 | local lev = editor.FoldLevel[line] 26 | if bit.band(lev,SC_FOLDLEVELHEADERFLAG) then -- a fold line 27 | if math.abs(line - last_line) ~= 1 then 28 | --print(line,pos,last_line,last_pos) 29 | local lastl = editor:GetLastChild(line,-1) 30 | s2 = editor:PositionFromLine(lastl+1) 31 | editor:SetSel(s1,s2) 32 | end 33 | end 34 | end 35 | end 36 | last_line = line 37 | last_pos = pos 38 | end 39 | 40 | scite_OnUpdateUI(line_selected) 41 | 42 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite_lua/_unused/other.lua: -------------------------------------------------------------------------------- 1 | -- other.lua 2 | scite_Command 'Move to Other|move_to_other|Ctrl+Alt+M' 3 | 4 | if scite_GetProp('PLAT_GTK') then 5 | local pipes 6 | 7 | function scan_other() 8 | pipes = scite_Files '/tmp/SciTE.*.in' 9 | local our_pipe = props['ipc.scite.name'] 10 | for i,p in ipairs(pipes) do 11 | if p == our_pipe then 12 | table.remove(pipes,i) 13 | break 14 | end 15 | end 16 | table.insert(pipes,1,our_pipe) 17 | return #pipes 18 | end 19 | 20 | spawner.perform = function (cmd,target) 21 | if not pipes then scan_other() end 22 | target = target or 1 23 | local f = io.open(pipes[target+1],"w") 24 | --~ print('cmd',cmd,target+1) 25 | f:write(cmd,'\n') 26 | f:close() 27 | end 28 | 29 | end 30 | 31 | function perform (cmd,arg,target) 32 | target = target or 1 33 | if spawner.perform then 34 | cmd = cmd..':'..tostring(arg):gsub('\\','\\\\') 35 | local res,err spawner.perform(cmd,target) 36 | if err then 37 | print('perform error: '..err) 38 | end 39 | return res 40 | end 41 | end 42 | 43 | function menucommand (id,target) 44 | return perform('menucommand',id,target) 45 | end 46 | 47 | function open_other(file,line) 48 | perform('open',file,1) 49 | if line then 50 | perform('goto',line,1) 51 | end 52 | end 53 | 54 | function move_to_other () 55 | local file = props['FilePath'] 56 | local line = editor:LineFromPosition(editor.CurrentPos) 57 | if file ~= '' then 58 | scite.MenuCommand(IDM_CLOSE) 59 | open_other(file,line) 60 | end 61 | end 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite_lua/_unused/select_string.lua: -------------------------------------------------------------------------------- 1 | -- this extends the usual double-click behaviour; any group of chars with the same style 2 | -- (such as a string or a comment) will be extended. It is called immediately after the 3 | -- default behaviour, which selects words. If a word was selected, then the cursor will 4 | -- be at the end, and we ignore this case. 5 | 6 | function expand_same_style() 7 | local pos = editor.CurrentPos 8 | local style = editor.StyleAt[pos] 9 | if style == 0 or not editor.Focus then return end 10 | local p = pos 11 | while p > -1 and editor.StyleAt[p] == style do 12 | p = p - 1 13 | end 14 | local pstart = p+1 15 | if pstart == pos then return end -- we're at the end! 16 | p = pos 17 | local sz = editor.Length-1 18 | while p < sz and editor.StyleAt[p] == style do 19 | p = p + 1 20 | end 21 | editor:SetSel(pstart,p) 22 | end 23 | 24 | scite_OnDoubleClick(expand_same_style) 25 | 26 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite_lua/_unused/switch_buffers.lua: -------------------------------------------------------------------------------- 1 | --switch_buffers.lua 2 | --drops down a list of buffers, in recently-used order 3 | 4 | scite_Command 'Switch Buffer|do_buffer_list|Alt+F12' 5 | scite_Command 'Last Buffer|last_buffer|Ctrl+F12' 6 | 7 | local buffers = {} 8 | local remove = table.remove 9 | local insert = table.insert 10 | 11 | scite_OnOpenSwitch(function(f) 12 | --- swop the new current buffer with the last one! 13 | local idx 14 | for i,file in ipairs(buffers) do 15 | if file == f then idx = i; break end 16 | end 17 | if idx then 18 | remove(buffers,idx) 19 | insert(buffers,1,f) 20 | else 21 | insert(buffers,1,f) 22 | end 23 | end) 24 | 25 | function last_buffer() 26 | if #buffers > 1 then 27 | scite.Open(buffers[2]) 28 | end 29 | end 30 | 31 | function do_buffer_list() 32 | if not scite_GetPropBool('buffer.switch.fullpath',false) then 33 | local files = {} 34 | for i = 1,#buffers do 35 | files[i] = basename(buffers[i]) 36 | end 37 | scite_UserListShow(files,2,function(s) 38 | for i = 1,#files do 39 | if s == files[i] then 40 | scite.Open(buffers[i]) 41 | end 42 | end 43 | end) 44 | else 45 | scite_UserListShow(buffers,2,scite.Open) 46 | end 47 | end 48 | 49 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite_lua/_unused/tie.lua: -------------------------------------------------------------------------------- 1 | require 'socket' 2 | local udp = socket.udp() 3 | udp:setoption('broadcast',true) 4 | 5 | local function log(...) 6 | local n,p = select('#', ...), {...} 7 | for i=1,n do p[i] = tostring(p[i]) end 8 | local s = table.concat(p, '\t') 9 | local ok, err = udp:sendto(s, '255.255.255.255', 5555) 10 | if not ok then print(err) end 11 | end 12 | 13 | scite_OnChar(function(c) 14 | local pos = editor.CurrentPos 15 | log(c, pos) 16 | end) -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite_lua/code.lua: -------------------------------------------------------------------------------- 1 | scite_Command 'Surrond with code|do_code|Ctrl+Shift+J' 2 | scite_Command 'Exec Lua|*dofile $(FileNameExt)|Shift+Ctrl+E' 3 | 4 | function do_code() 5 | local txt = editor:GetSelText() 6 | if txt then 7 | editor:ReplaceSel(''..txt..'') 8 | end 9 | end 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite_lua/debug/clidebug.cmd: -------------------------------------------------------------------------------- 1 | rootpath /home/miky/projects/scite-debug/scite_lua/debug 2 | run 3 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/scite_lua/switch_headers.lua: -------------------------------------------------------------------------------- 1 | -- toggles between C++ source files and corresponding header files 2 | scite_Command('Switch Source/Header|switch_source_header|*.c;*.cpp;*.cxx|Shift+Ctrl+H') 3 | local cpp_exts = {'cpp','cxx','c++','c'} 4 | local hpp_exts = {'h','hpp'} 5 | 6 | local function within(list,val) 7 | for i,v in ipairs(list) do 8 | if val == v then return true end 9 | end 10 | return false 11 | end 12 | 13 | local function does_exist(basename,extensions) 14 | for i,ext in ipairs(extensions) do 15 | local f = basename..'.'..ext 16 | if scite_FileExists(f) then return f end 17 | end 18 | return nil 19 | end 20 | 21 | function switch_source_header() 22 | local file = props['FilePath'] 23 | local ext = props['FileExt'] 24 | local basename = props['FileDir']..'/'..props['FileName'] 25 | if within(cpp_exts,ext) then 26 | other = does_exist(basename,hpp_exts) 27 | elseif within(hpp_exts,ext) then 28 | other = does_exist(basename,cpp_exts) 29 | else 30 | print('not a C++ file',file); return 31 | end 32 | if not other then 33 | print('source/header does not exist',file) 34 | else 35 | scite.Open(other) 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/spawner-ex.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/spawner-ex.dll -------------------------------------------------------------------------------- /scite/custom/scite-debug/stubby.c: -------------------------------------------------------------------------------- 1 | int answer(void) 2 | { 3 | return 42; 4 | } 5 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/stubby.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/stubby.dll -------------------------------------------------------------------------------- /scite/custom/scite-debug/stubby.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/stubby.so -------------------------------------------------------------------------------- /scite/custom/scite-debug/tests/lfs.def: -------------------------------------------------------------------------------- 1 | LIBRARY lfs.dll 2 | DESCRIPTION "LuaFileSystem" 3 | VERSION 1.2.1 4 | EXPORTS 5 | luaopen_lfs 6 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/tests/lfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** LuaFileSystem 3 | ** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/luafilesystem) 4 | ** 5 | ** $Id: lfs.h,v 1.3 2006/03/10 23:37:32 carregal Exp $ 6 | */ 7 | 8 | /* Define 'chdir' for systems that do not implement it */ 9 | #ifdef NO_CHDIR 10 | #define chdir(p) (-1) 11 | #define chdir_error "Function 'chdir' not provided by system" 12 | #else 13 | #define chdir_error strerror(errno) 14 | #endif 15 | 16 | int luaopen_lfs (lua_State *L); 17 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/tests/test1.cpp: -------------------------------------------------------------------------------- 1 | // build@ g++ -g test1.cpp -o test1 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | struct Pair { 7 | string first; 8 | string second; 9 | 10 | Pair(string s1, string s2) 11 | : first(s1), second(s2) 12 | {} 13 | }; 14 | 15 | void one(string s1, string s2) 16 | { 17 | int *pi = NULL; 18 | //~ *pi = 0; 19 | string s = s1 + s2; 20 | Pair pp(s1,s2); 21 | cout << s << endl; 22 | } 23 | 24 | void two(string s) 25 | { 26 | string t = "help"; 27 | one(s,t); 28 | } 29 | 30 | int main(int argc, char **argv) 31 | { 32 | for(int i = 0; i < argc; i++) 33 | cout << argv[i] << endl; 34 | two("hello"); 35 | //~ char ch; 36 | //~ cin >> ch; 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/tests/test1.py: -------------------------------------------------------------------------------- 1 | def one(x): 2 | print x 3 | 4 | def two(x,y): 5 | one(x) 6 | one(y) 7 | 8 | two(10,20) 9 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/tests/test2.lua: -------------------------------------------------------------------------------- 1 | -- test2.lua 2 | print 'hello' 3 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/tests/test3.c: -------------------------------------------------------------------------------- 1 | // build@ gcc -g test3.c -o test3 2 | #include 3 | #include 4 | 5 | typedef struct { 6 | int a,b; 7 | } A; 8 | 9 | typedef struct { 10 | float x; 11 | A* y; 12 | } B; 13 | 14 | 15 | void three(int i) 16 | { 17 | printf("three %d\n",i); 18 | } 19 | 20 | void two(int i) 21 | { 22 | A a = {10,20}; 23 | B b; 24 | b.x = 2.3f; 25 | b.y = &a; 26 | int val = b.y->a; 27 | three(i); 28 | printf("i = %d\n",i); 29 | } 30 | 31 | void one(int i) 32 | { 33 | int k,j; 34 | two(i); 35 | switch(i) { 36 | case 1: k = 10; break; 37 | case 2: k = 44; break; 38 | case 3: k = 55; break; 39 | default: k = 10; 40 | } 41 | j = 1; 42 | j = 2; 43 | j = 3; 44 | } 45 | 46 | int main(int argc, char** argv) 47 | { 48 | one(2); 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/tests/test3.lua: -------------------------------------------------------------------------------- 1 | local tab = { 2 | foo = {x = 1}, 3 | bar = 2 4 | } 5 | 6 | for i,v in ipairs(arg) do 7 | print(i,v) 8 | end 9 | 10 | dofile 'testdir/assert.lua' 11 | 12 | local k 13 | local p = 0 14 | local tt 15 | 16 | print("Start") 17 | 18 | function bar(x) 19 | print("In bar",x) 20 | p = p + 1 21 | end 22 | 23 | for i = 1, 3 do 24 | k = 2*i 25 | io.write 'go ' 26 | bar(i) 27 | tab.foo.x = tab.foo.x * 2 28 | -- a.x = 2 29 | end 30 | 31 | print("End of test3") 32 | 33 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/tests/test4.lua: -------------------------------------------------------------------------------- 1 | sum = 0 2 | for i = 1,100000 do 3 | sum = sum + i 4 | end 5 | res = sum -------------------------------------------------------------------------------- /scite/custom/scite-debug/tests/testdir/assert.lua: -------------------------------------------------------------------------------- 1 | alpha = 1 2 | --assert (0 == 1) 3 | 4 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/tests/testlfs.lua: -------------------------------------------------------------------------------- 1 | require 'lfs' 2 | --require 'dbgl' 3 | print 'hey' 4 | for i = 1,3 do 5 | print(lfs.currentdir()) 6 | print 'here' 7 | print 'hello' 8 | lfs.chdir('testdir') 9 | end 10 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/tests/testlua.lua: -------------------------------------------------------------------------------- 1 | -- go@ dofile * 2 | l = editor:LineFromPosition(editor.CurrentPos) 3 | print(l) 4 | line = scite_Line(editor,l) 5 | indent = line:match('(%s+)') 6 | print(indent..'gotcha',#indent) 7 | 8 | 9 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/trace.lua: -------------------------------------------------------------------------------- 1 | trace('I'm alive!') 2 | -------------------------------------------------------------------------------- /scite/custom/scite-debug/unix-spawner-ex.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/custom/scite-debug/unix-spawner-ex.so -------------------------------------------------------------------------------- /scite/custom/scite-debug/xpdb.py: -------------------------------------------------------------------------------- 1 | # A modified main pdb debugger loop (see pdb.py in the Python library!) 2 | from pdb import * 3 | import sys,os,traceback 4 | 5 | def main(): 6 | mainpyfile = sys.argv[1] # Get script filename 7 | if not os.path.exists(mainpyfile): 8 | print 'Error:', mainpyfile, 'does not exist' 9 | sys.exit(1) 10 | 11 | del sys.argv[0] # Hide "pdb.py" from argument list 12 | # Replace pdb's dir with script's dir in front of module search path. 13 | sys.path[0] = os.path.dirname(mainpyfile) 14 | 15 | pdb = Pdb() 16 | # 1st customization: prompt w/ a line feed! 17 | pdb.prompt = '(PDB)\n' 18 | # 2nd customization: not an infinite loop! 19 | try: 20 | pdb._runscript(mainpyfile) 21 | if pdb._user_requested_quit: 22 | return 23 | print "The program finished and will not be restarted" 24 | except SystemExit: 25 | # In most cases SystemExit does not warrant a post-mortem session. 26 | print "The program exited via sys.exit(). Exit status: ", 27 | print sys.exc_info()[1] 28 | except: 29 | traceback.print_exc() 30 | print "Uncaught exception. Entering post mortem debugging" 31 | t = sys.exc_info()[2] 32 | while t.tb_next is not None: 33 | t = t.tb_next 34 | pdb.interaction(t.tb_frame,t) 35 | 36 | 37 | # When invoked as main program, invoke the debugger on a script 38 | if __name__=='__main__': 39 | main() 40 | # under Windows, we need to run Python w/ the -i flag; this ensures that we die! 41 | sys.exit(0) 42 | 43 | -------------------------------------------------------------------------------- /scite/custom/scripts/README.txt: -------------------------------------------------------------------------------- 1 | THESE BUNDLES MAY ONLY BE USED BY THE SCITE-ST BRANCH (DYNAMIC 2 | LEXXING) OF THE SCITE-TOOLS PROJECT. THEY WILL NOT WORK WITH THE 3 | DEFAULT SCITE-TOOLS. 4 | -------------------------------------------------------------------------------- /scite/custom/scripts/html/html.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Mitchell's html.lua 3 | Copyright (c) 2006-2008 Mitchell Foral. All rights reserved. 4 | 5 | SciTE-tools homepage: http://caladbolg.net/scite.php 6 | Send email to: mitchellcaladbolgnet 7 | 8 | Permission to use, copy, modify, and distribute this file 9 | is granted, provided credit is given to Mitchell. 10 | ]]-- 11 | 12 | --- 13 | -- The html module. 14 | -- It provides utilities for editing HTML. 15 | module('modules.html', package.seeall) 16 | 17 | if type(_G.snippets) == 'table' then 18 | --- 19 | -- Container for HTML-specific snippets. 20 | -- @class table 21 | -- @name snippets.html 22 | _G.snippets.html = {} 23 | end 24 | 25 | if type(_G.keys) == 'table' then 26 | --- 27 | -- Container for HTML-specific key commands. 28 | -- @class table 29 | -- @name keys.html 30 | _G.keys.html = {} 31 | end 32 | 33 | require 'html/snippets' 34 | require 'html/commands' 35 | -------------------------------------------------------------------------------- /scite/custom/scripts/lua/lua.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Mitchell's lua.lua 3 | Copyright (c) 2006-2008 Mitchell Foral. All rights reserved. 4 | 5 | SciTE-tools homepage: http://caladbolg.net/scite.php 6 | Send email to: mitchellcaladbolgnet 7 | 8 | Permission to use, copy, modify, and distribute this file 9 | is granted, provided credit is given to Mitchell. 10 | ]]-- 11 | 12 | --- 13 | -- The lua module. 14 | -- It provides utilities for editing Lua code. 15 | module('modules.lua', package.seeall) 16 | 17 | if type(_G.snippets) == 'table' then 18 | --- 19 | -- Container for Lua-specific snippets. 20 | -- @class table 21 | -- @name snippets.lua 22 | _G.snippets.lua = {} 23 | end 24 | 25 | if type(_G.keys) == 'table' then 26 | --- 27 | -- Container for Lua-specific key commands. 28 | -- @class table 29 | -- @name keys.lua 30 | _G.keys.lua = {} 31 | end 32 | 33 | require 'lua/snippets' 34 | require 'lua/commands' 35 | -------------------------------------------------------------------------------- /scite/custom/scripts/php/php.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Mitchell's php.lua 3 | Copyright (c) 2006-2008 Mitchell Foral. All rights reserved. 4 | 5 | SciTE-tools homepage: http://caladbolg.net/scite.php 6 | Send email to: mitchellcaladbolgnet 7 | 8 | Permission to use, copy, modify, and distribute this file 9 | is granted, provided credit is given to Mitchell. 10 | ]]-- 11 | 12 | --- 13 | -- The php module. 14 | -- It provides utilities for editing PHP code. 15 | module('modules.php', package.seeall) 16 | 17 | if type(_G.snippets) == 'table' then 18 | --- 19 | -- Container for PHP-specific key commands. 20 | -- @class table 21 | -- @name snippets.php 22 | _G.snippets.php = {} 23 | end 24 | 25 | if type(_G.keys) == 'table' then 26 | --- 27 | -- Container for PHP-specific key commands. 28 | -- @class table 29 | -- @name keys.php 30 | _G.keys.php = {} 31 | end 32 | 33 | require 'php/snippets' 34 | require 'php/commands' 35 | -------------------------------------------------------------------------------- /scite/custom/scripts/php/snippets.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Mitchell's php/snippets.lua 3 | Copyright (c) 2006-2008 Mitchell Foral. All rights reserved. 4 | 5 | SciTE-tools homepage: http://caladbolg.net/scite.php 6 | Send email to: mitchellcaladbolgnet 7 | 8 | Permission to use, copy, modify, and distribute this file 9 | is granted, provided credit is given to Mitchell. 10 | ]]-- 11 | 12 | --- 13 | -- Snippets for the php module. 14 | module('modules.php.snippets', package.seeall) 15 | 16 | -- Load HTML snippets and commands too. 17 | require 'html/html' 18 | 19 | local snippets = _G.snippets 20 | 21 | if type(snippets) == 'table' then 22 | snippets.html = "" 23 | snippets.php = { 24 | t = "$this->${0}", 25 | p = "$_POST['${1:item}']${0}", 26 | g = "$_GET['${1:item}']${0}", 27 | c = "$_COOKIE['${1:item}']${0}", 28 | f = "function ${1:name}(${2:args}) {\n ${0}\n }" 29 | } 30 | end 31 | -------------------------------------------------------------------------------- /scite/custom/scripts/pm/file_browser.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Mitchell's pm/file_browser.lua 3 | Copyright (c) 2006-2007 Mitchell Foral. All rights reserved. 4 | 5 | SciTE-tools homepage: http://caladbolg.net/scite.php 6 | Send email to: mitchellcaladbolgnet 7 | 8 | Permission to use, copy, modify, and distribute this file 9 | is granted, provided credit is given to Mitchell. 10 | ]]-- 11 | 12 | --- 13 | -- File Browser for the SciTE project manager. 14 | -- It is enabled by typing the absolute path to a directory into 15 | -- the project manager entry field. 16 | module('browsers.file', package.seeall) 17 | 18 | function Matches(entry_text) 19 | return entry_text:sub(1, 1) == '/' 20 | end 21 | 22 | function GetContentsForTreeView(directory) 23 | local out = io.popen('ls -1p "'..directory..'"'):read('*all') 24 | if #out == 0 then 25 | show_error('No such directory: '..directory) 26 | return {} 27 | end 28 | local dir = {} 29 | for entry in out:gmatch('[^\n]+') do 30 | if entry:sub(-1, -1) == '/' then 31 | local name = entry:sub(1, -2) 32 | dir[name] = { 33 | parent = true, 34 | display_text = name, 35 | pixbuf = 'gtk-directory' 36 | } 37 | else 38 | dir[entry] = { display_text = entry } 39 | end 40 | end 41 | return dir 42 | end 43 | 44 | function PerformAction(selected_item) 45 | Open(selected_item) 46 | end 47 | 48 | function GetContextMenu(selected_item) 49 | return { '_Change Directory', 'File _Details' } 50 | end 51 | 52 | function PerformMenuAction(menu_item, selected_item) 53 | if menu_item == 'Change Directory' then 54 | SetEntryText(selected_item) 55 | ActivateEntry() 56 | elseif menu_item == 'File Details' then 57 | local out = io.popen('ls -dhl "'..selected_item..'"'):read('*all') 58 | local perms, num_dirs, owner, group, size, mod_date = 59 | out:match('^(%S+) (%S+) (%S+) (%S+) (%S+) (%S+ %S)') 60 | out = 'File details for:\n'..selected_item..'\n'.. 61 | 'Perms:\t'..perms..'\n'.. 62 | '#Dirs:\t'..num_dirs..'\n'.. 63 | 'Owner:\t'..owner..'\n'.. 64 | 'Group:\t'..group..'\n'.. 65 | 'Size:\t'..size..'\n'.. 66 | 'Date:\t'..mod_date 67 | text_input(out, nil, false, 250, 250) 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /scite/custom/scripts/ruby/ruby.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Mitchell's ruby.lua 3 | Copyright (c) 2006-2008 Mitchell Foral. All rights reserved. 4 | 5 | SciTE-tools homepage: http://caladbolg.net/scite.php 6 | Send email to: mitchellcaladbolgnet 7 | 8 | Permission to use, copy, modify, and distribute this file 9 | is granted, provided credit is given to Mitchell. 10 | ]]-- 11 | 12 | --- 13 | -- The ruby module. 14 | -- It provides utilities for editing Ruby code. 15 | module('modules.ruby', package.seeall) 16 | 17 | --- 18 | -- [Local table] Character matching. 19 | -- @class table 20 | -- @name char_matches 21 | local char_matches = { 22 | ['('] = ')', ['['] = ']', ['{'] = '}', 23 | ["'"] = "'", ['"'] = '"', ['|'] = '|' 24 | } 25 | 26 | --- 27 | -- SciTE OnChar Lua extension function. 28 | -- Matches characters specified in char_matches if the editor pane has focus. 29 | -- This overrides modules.scite.editing's OnChar function. 30 | function _G.OnChar(c) 31 | if char_matches[c] and editor.Focus then 32 | editor:InsertText( editor.CurrentPos, char_matches[c] ) 33 | end 34 | end 35 | 36 | if type(_G.snippets) == 'table' then 37 | --- 38 | -- Container for Ruby-specific snippets. 39 | -- @class table 40 | -- @name snippets.ruby 41 | _G.snippets.ruby = {} 42 | end 43 | 44 | if type(_G.keys) == 'table' then 45 | --- 46 | -- Container for Ruby-specific key commands. 47 | -- @class table 48 | -- @name keys.ruby 49 | _G.keys.ruby = {} 50 | end 51 | 52 | require 'ruby/snippets' 53 | require 'ruby/commands' 54 | -------------------------------------------------------------------------------- /scite/custom/scripts/scite/decoder.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Mitchell's decoder.lua 3 | Copyright (c) 2006-2008 Mitchell Foral. All rights reserved. 4 | 5 | SciTE-tools homepage: http://caladbolg.net/scite.php 6 | Send email to: mitchellcaladbolgnet 7 | 8 | Permission to use, copy, modify, and distribute this file 9 | is granted, provided credit is given to Mitchell. 10 | ]]-- 11 | 12 | --- 13 | -- Parses the line in the SciTE output pane double-clicked. 14 | -- Called by SciTE to parse the line. 15 | -- @param cdoc The line text to parse. 16 | -- @param format The integer style of the line to parse. 17 | -- @return filename, row, and column. If row and column data isn't 18 | -- available, return them as -1. All three return parameters are 19 | -- expected or an error will occur. 20 | function DecodeMessage(cdoc, format) 21 | if format < 11 then return "", -1, -1 end -- not an error 22 | if format == 11 then -- generic error 23 | local filename, line = cdoc:match('^(.-):(%d+):.-$') 24 | return filename, line - 1, -1 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /scite/custom/scripts/scite/scite.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Mitchell's scite.lua 3 | Copyright (c) 2006-2008 Mitchell Foral. All rights reserved. 4 | 5 | SciTE-tools homepage: http://caladbolg.net/scite.php 6 | Send email to: mitchellcaladbolgnet 7 | 8 | Permission to use, copy, modify, and distribute this file 9 | is granted, provided credit is given to Mitchell. 10 | ]]-- 11 | 12 | --- 13 | -- The scite module. 14 | -- It provides utilities for editing text in SciTE. 15 | module('modules.scite', package.seeall) 16 | 17 | require 'scite/editing' 18 | require 'scite/file_browser' 19 | require 'scite/functions' 20 | require 'scite/mlines' 21 | require 'scite/snippets' 22 | require 'scite/keys' -- important to load last 23 | 24 | --- 25 | -- Opens specified module in SciTE. 26 | -- @param name The name of the module. 27 | function open_module(name) 28 | scite.Open( props['SciteDefaultHome']..'/scripts/'..name ) 29 | end 30 | -------------------------------------------------------------------------------- /scite/custom/scripts/terminal/terminal.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Mitchell's terminal.lua 3 | Copyright (c) 2006-2008 Mitchell Foral. All rights reserved. 4 | 5 | SciTE-tools homepage: http://caladbolg.net/scite.php 6 | Send email to: mitchellcaladbolgnet 7 | 8 | Permission to use, copy, modify, and distribute this file 9 | is granted, provided credit is given to Mitchell. 10 | ]]-- 11 | 12 | --- 13 | -- (Linux only) The terminal module. 14 | -- It enables a Linux terminal to be run inside a SciTE buffer. 15 | -- This module requires LuaSocket, utils/shell.rb, and Ara T. Howard's 16 | -- 'session' library for Ruby. 17 | -- The terminal server can be started and stopped with the Ctrl+G and Ctrl+Q 18 | -- key combinations respectively. Pressing Shift+Enter executes the current 19 | -- selection or the contents of the current line in the shell. Pressing Enter 20 | -- by itself behaves as it does normally in SciTE. 21 | module('modules.terminal', package.seeall) 22 | 23 | require 'socket' 24 | require 'terminal/commands' 25 | 26 | --- 27 | -- SciTE OnClear Lua extension function. 28 | -- Checks to see whether a terminal session is currently open. If so, close it 29 | -- because the Lua environment gets cleared and re-initialized everytime 30 | -- buffers are switched. OnClear is called to give scripts a chance to clean up 31 | -- after themselves. 32 | function _G.OnClear() 33 | if modules.terminal.server then 34 | print('Closing running Terminal process') 35 | modules.terminal.commands.close() 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /scite/custom/scripts/utils/shell.rb: -------------------------------------------------------------------------------- 1 | require 'rubygems' 2 | require 'socket' 3 | require 'session' # Ara T. Howard's session library 4 | 5 | client = TCPSocket.new('localhost', 3003) 6 | 7 | bash = Session::Bash.new 8 | 9 | bash.outproc = lambda { |out| client.print out } 10 | bash.errproc = lambda { |err| client.print err } 11 | 12 | while input = client.gets 13 | if input =~ /\s*exit\s*$/ then 14 | client.close 15 | exit 16 | end 17 | bash.execute(input) 18 | end 19 | -------------------------------------------------------------------------------- /scite/delbin.bat: -------------------------------------------------------------------------------- 1 | del /S /Q *.a *.aps *.bsc *.dll *.dsw *.exe *.idb *.ilc *.ild *.ilf *.ilk *.ils *.lib *.map *.ncb *.obj *.o *.opt *.pdb *.plg *.res *.sbr *.tds *.exp >NUL: 2 | -------------------------------------------------------------------------------- /scite/delcvs.bat: -------------------------------------------------------------------------------- 1 | del /S /Q .cvsignore 2 | -------------------------------------------------------------------------------- /scite/doc/PrintHi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/doc/PrintHi.png -------------------------------------------------------------------------------- /scite/doc/SciBreak2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/doc/SciBreak2.jpg -------------------------------------------------------------------------------- /scite/doc/SciTEIco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/doc/SciTEIco.png -------------------------------------------------------------------------------- /scite/doc/SciTEImage.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Scintilla and SciTE 11 | 12 | 13 | 14 | 15 | 16 | 19 | 23 | 24 |
17 | Scintilla icon 18 | 20 | Scintilla 21 | and SciTE 22 |
25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /scite/doc/SciTEWord.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/doc/SciTEWord.jpg -------------------------------------------------------------------------------- /scite/doc/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/doc/demo.png -------------------------------------------------------------------------------- /scite/doc/scite.1: -------------------------------------------------------------------------------- 1 | .TH SCITE 1 "2001 February 26" 2 | .SH NAME 3 | SciTE \- a programmers text editor 4 | .SH SYNOPSIS 5 | .br 6 | .B SciTE 7 | [file ..] 8 | .SH DESCRIPTION 9 | .B SciTE 10 | is a graphical GTK+ based editor. It has support 11 | for indenting, highlighting, and shortcuts in a myriad 12 | of languages and can be extended by editing object-oriented 13 | configuration files. 14 | .PP 15 | Support is included for Java, C, C++, C#, Shell, Apache. 16 | .SH ON-LINE HELP 17 | Type Alt-H or Click the Help Pulldown menu. 18 | .SH AUTHOR 19 | Most of 20 | .B SciTE 21 | was made by Neil Hodgson, with a lot of help from others. 22 | See Help 23 | .br 24 | .SH BUGS 25 | Probably. 26 | -------------------------------------------------------------------------------- /scite/gtk/DirectorExtension.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file DirectorExtension.h 3 | ** Extension for communicating with a director program. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | class DirectorExtension : public Extension { 9 | private: 10 | DirectorExtension() : inputWatcher(-1) {} // Singleton 11 | DirectorExtension(const DirectorExtension &); // Disable copy ctor 12 | void operator=(const DirectorExtension &); // Disable operator= 13 | 14 | public: 15 | static DirectorExtension &Instance(); 16 | 17 | // Implement the Extension interface 18 | virtual bool Initialise(ExtensionAPI *host_); 19 | virtual bool Finalise(); 20 | virtual bool Clear(); 21 | virtual bool Load(const char *filename); 22 | 23 | virtual bool OnOpen(const char *path); 24 | virtual bool OnSwitchFile(const char *path); 25 | virtual bool OnSave(const char *path); 26 | virtual bool OnChar(char ch); 27 | virtual bool OnExecute(const char *s); 28 | virtual bool OnSavePointReached(); 29 | virtual bool OnSavePointLeft(); 30 | virtual bool OnStyle(unsigned int startPos, int lengthDoc, int initStyle, StyleWriter *styler); 31 | virtual bool OnDoubleClick(); 32 | virtual bool OnUpdateUI(); 33 | virtual bool OnMarginClick(); 34 | virtual bool OnMacro(const char *command, const char *params); 35 | 36 | virtual bool SendProperty(const char *prop); 37 | virtual bool OnClose(const char *path); 38 | 39 | // Allow messages through to extension 40 | void HandleStringMessage(const char *message); 41 | 42 | void CreatePipe(bool forceNew = false); 43 | private: 44 | int inputWatcher; 45 | }; 46 | 47 | -------------------------------------------------------------------------------- /scite/gtk/GTKMutex.cxx: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file GTKMutex.cxx 3 | ** Define mutex 4 | **/ 5 | // SciTE & Scintilla copyright 1998-2003 by Neil Hodgson 6 | // Copyright 2007 by Neil Hodgson , from April White 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | // http://www.microsoft.com/msj/0797/win320797.aspx 10 | 11 | #include "Mutex.h" 12 | 13 | class GTKMutex : public Mutex { 14 | private: 15 | virtual void Lock() {} 16 | virtual void Unlock() {} 17 | GTKMutex() {} 18 | virtual ~GTKMutex() {} 19 | friend class Mutex; 20 | }; 21 | 22 | Mutex *Mutex::Create() { 23 | return new GTKMutex(); 24 | } 25 | -------------------------------------------------------------------------------- /scite/gtk/Sci48M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/gtk/Sci48M.png -------------------------------------------------------------------------------- /scite/gtk/SciIcon.h: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * SciIcon_xpm[] = { 3 | "16 16 17 1", 4 | " c None", 5 | ". c #666666", 6 | "+ c #424242", 7 | "@ c #4D4D4D", 8 | "# c #777777", 9 | "$ c #555555", 10 | "% c #868686", 11 | "& c #333333", 12 | "* c #292929", 13 | "= c #A0A0A4", 14 | "- c #808080", 15 | "; c #C0C0C0", 16 | "> c #999999", 17 | ", c #E3E3E3", 18 | "' c #161616", 19 | ") c #B2B2B2", 20 | "! c #D7D7D7", 21 | " .+@@+# ", 22 | " $+$$@+@+@$ ", 23 | " $@+%&.@@@++@ ", 24 | " $@*=@-@-&.+&&@ ", 25 | " #+@;*>#&>&@+*+ ", 26 | ".$*;*,*=='..'++&", 27 | "+&.%#.,*$;&*.&*&", 28 | "*@)*,$+,@&=.'&.'", 29 | "*$&;*,$*!=*+%$''", 30 | "**@$)*;%*.;$***'", 31 | "*&&&&$*#-&*@+&''", 32 | " **&@*$**@+*''' ", 33 | " &*&+.'++*'*&** ", 34 | " **&*+&*&&*'' ", 35 | " ********'' ", 36 | " *''''' "}; 37 | -------------------------------------------------------------------------------- /scite/gtk/SciTE.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Version=1.0 4 | Name=SciTE Text Editor 5 | Name[es]=Editor de textos SciTE 6 | Name[fr]=Éditeur de texte SciTE 7 | Comment=Edit your source files 8 | Comment[es]=Edita especializado para programación 9 | Comment[fr]=Éditer des fichiers sources 10 | GenericName=Text Editor 11 | Type=Application 12 | Exec=SciTE %F 13 | Icon=Sci48M.png 14 | Terminal=false 15 | StartupNotify=true 16 | Categories=TextEditor;Development;GTK;Application; 17 | -------------------------------------------------------------------------------- /scite/scripts/CheckMentioned.py: -------------------------------------------------------------------------------- 1 | # CheckMentioned.py 2 | # Find all the symbols in scintilla/include/Scintilla.h and check if they 3 | # are mentioned in scintilla/doc/ScintillaDoc.html. 4 | 5 | import string 6 | 7 | uninteresting = {"SCINTILLA_H", "SCI_START", "SCI_LEXER_START", "SCI_OPTIONAL_START"} 8 | srcRoot = "../.." 9 | incFileName = srcRoot + "/scintilla/include/Scintilla.h" 10 | docFileName = srcRoot + "/scintilla/doc/ScintillaDoc.html" 11 | try: # Old Python 12 | identCharacters = "_" + string.letters + string.digits 13 | except AttributeError: # Python 3.x 14 | identCharacters = "_" + string.ascii_letters + string.digits 15 | 16 | # Convert all punctuation characters except '_' into spaces. 17 | def depunctuate(s): 18 | d = "" 19 | for ch in s: 20 | if ch in identCharacters: 21 | d = d + ch 22 | else: 23 | d = d + " " 24 | return d 25 | 26 | symbols = {} 27 | incFile = open(incFileName, "rt") 28 | for line in incFile.readlines(): 29 | if line.startswith("#define"): 30 | identifier = line.split()[1] 31 | symbols[identifier] = 0 32 | incFile.close() 33 | 34 | docFile = open(docFileName, "rt") 35 | for line in docFile.readlines(): 36 | for word in depunctuate(line).split(): 37 | if word in symbols.keys(): 38 | symbols[word] = 1 39 | docFile.close() 40 | 41 | identifiersSorted = list(symbols.keys()) 42 | identifiersSorted.sort() 43 | for identifier in identifiersSorted: 44 | if not symbols[identifier] and identifier not in uninteresting: 45 | print(identifier) 46 | -------------------------------------------------------------------------------- /scite/scripts/ba: -------------------------------------------------------------------------------- 1 | sci_base=`pwd` 2 | cd $sci_base/scintilla/gtk 3 | make $* 4 | cd $sci_base/scite/gtk 5 | make $* 6 | #make install $* 7 | cd $sci_base/scintilla 8 | sh tgzsrc 9 | cd $sci_base/scite 10 | sh tgzsrc 11 | cd $sci_base/scite 12 | sh tgzgscite 13 | 14 | -------------------------------------------------------------------------------- /scite/scripts/ba.bat: -------------------------------------------------------------------------------- 1 | rem ba.bat - download and build all of scintilla and scite 2 | rd /s/q scintilla scite 3 | cvs export -D NOW scintilla scite 4 | cd scintilla 5 | call delbin 6 | del/q bin\*.a 7 | call delcvs 8 | call zipsrc 9 | cd win32 10 | nmake -f scintilla.mak 11 | cd .. 12 | del/q bin\*.pdb 13 | cd .. 14 | cd scite 15 | del/q bin\*.properties 16 | del/q bin\SciTE 17 | call delbin 18 | call delcvs 19 | call zipsrc 20 | cd win32 21 | nmake -f scite.mak 22 | cd .. 23 | call upxsc1 24 | call zipwscite 25 | call delbin 26 | cd .. 27 | cd scintilla 28 | call delbin 29 | cd .. 30 | -------------------------------------------------------------------------------- /scite/scripts/clearboth.bat: -------------------------------------------------------------------------------- 1 | @rem clearboth.bat - script to clear both scintilla and scite 2 | @rem directory trees of all compiler output files. 3 | @rem Current directory must be parent of scintilla and scite before running. 4 | @cd scintilla 5 | @call delbin 6 | @cd .. 7 | @cd scite 8 | @call delbin 9 | @cd .. 10 | -------------------------------------------------------------------------------- /scite/scripts/makerpms.py: -------------------------------------------------------------------------------- 1 | # makerpms.py 2 | # Copy files all over the place build RPMs and copy to top level directory 3 | 4 | import os 5 | import shutil 6 | srcRoot = "../../" 7 | rpmRoot = "/usr/src/redhat/SOURCES/" 8 | rpmBin = "/usr/src/redhat/RPMS/i386/" 9 | rpmSource = "/usr/src/redhat/SRPMS/" 10 | 11 | verFileName = srcRoot + "scintilla/version.txt" 12 | vers = open(verFileName) 13 | #139 14 | vFull = vers.read().strip() 15 | vers.close() 16 | 17 | #1.39 18 | vPoint = vFull[0] + "." + vFull[1:] 19 | 20 | #1, 3, 9, 0 21 | vComma = vFull[0] + ", " + vFull[1] + ", " + vFull[2] + ", 0" 22 | 23 | print("[ %s | %s | %s ]" % (vFull, vPoint, vComma)) 24 | 25 | tgzV = "scite" + vFull + ".tgz" 26 | tgzFileName = srcRoot + "scite.tgz" 27 | tgzVFileName = srcRoot + tgzV 28 | 29 | print("[ %s | %s ]" % (tgzFileName, tgzVFileName)) 30 | 31 | if not os.access(tgzFileName, os.F_OK): 32 | print("Base file '" + tgzFileName + "' does not exist.") 33 | else: 34 | shutil.copyfile(tgzFileName, tgzVFileName) 35 | os.unlink(tgzFileName) 36 | 37 | rpmVFileName = rpmRoot + tgzV 38 | 39 | shutil.copyfile(tgzVFileName, rpmVFileName) 40 | 41 | # Run the rpm build command 42 | os.system("rpm -ba scite.spec") 43 | 44 | rpmB = "scite-" + vPoint + "-1.i386.rpm" 45 | shutil.copyfile(rpmBin + rpmB, srcRoot + rpmB) 46 | rpmS = "scite-" + vPoint + "-1.src.rpm" 47 | shutil.copyfile(rpmSource + rpmS, srcRoot + rpmS) 48 | 49 | -------------------------------------------------------------------------------- /scite/src/Embedded.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/src/Embedded.properties -------------------------------------------------------------------------------- /scite/src/Exporters.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/src/Exporters.cxx -------------------------------------------------------------------------------- /scite/src/JobQueue.cxx: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file JobQueue.cxx 3 | ** Define job queue 4 | **/ 5 | // SciTE & Scintilla copyright 1998-2003 by Neil Hodgson 6 | // Copyright 2007 by Neil Hodgson , from April White 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | 19 | #include "Scintilla.h" 20 | 21 | #include "GUI.h" 22 | 23 | #include "SString.h" 24 | #include "FilePath.h" 25 | 26 | #include "SciTE.h" 27 | 28 | #include "Mutex.h" 29 | #include "JobQueue.h" 30 | 31 | -------------------------------------------------------------------------------- /scite/src/LuaExtension.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | // LuaExtension.h - Lua scripting extension 3 | // Copyright 1998-2000 by Neil Hodgson 4 | // The License.txt file describes the conditions under which this software may be distributed. 5 | 6 | class LuaExtension : public Extension { 7 | private: 8 | LuaExtension(); // Singleton 9 | LuaExtension(const LuaExtension &); // Disable copy ctor 10 | void operator=(const LuaExtension &); // Disable operator= 11 | 12 | public: 13 | static LuaExtension &Instance(); 14 | 15 | virtual ~LuaExtension(); 16 | 17 | virtual bool Initialise(ExtensionAPI *host_); 18 | virtual bool Finalise(); 19 | virtual bool Clear(); 20 | virtual bool Load(const char *filename); 21 | 22 | virtual bool InitBuffer(int); 23 | virtual bool ActivateBuffer(int); 24 | virtual bool RemoveBuffer(int); 25 | 26 | virtual bool OnOpen(const char *filename); 27 | virtual bool OnSwitchFile(const char *filename); 28 | virtual bool OnBeforeSave(const char *filename); 29 | virtual bool OnSave(const char *filename); 30 | virtual bool OnChar(char ch); 31 | virtual bool OnExecute(const char *s); 32 | virtual bool OnSavePointReached(); 33 | virtual bool OnSavePointLeft(); 34 | virtual bool OnStyle(unsigned int startPos, int lengthDoc, int initStyle, StyleWriter *styler); 35 | virtual bool OnDoubleClick(); 36 | virtual bool OnUpdateUI(); 37 | virtual bool OnMarginClick(); 38 | virtual bool OnUserListSelection(int listType, const char *selection); 39 | virtual bool OnKey(int keyval, int modifiers); 40 | virtual bool OnDwellStart(int pos, const char *word); 41 | virtual bool OnClose(const char *filename); 42 | }; 43 | -------------------------------------------------------------------------------- /scite/src/Mutex.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file Mutex.h 3 | ** Define mutex 4 | **/ 5 | // SciTE & Scintilla copyright 1998-2003 by Neil Hodgson 6 | // Copyright 2007 by Neil Hodgson , from April White 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | // TODO: see http://www.codeproject.com/threads/cppsyncstm.asp 10 | 11 | #ifndef MUTEX_H 12 | #define MUTEX_H 13 | 14 | class Mutex { 15 | public: 16 | virtual void Lock() = 0; 17 | virtual void Unlock() = 0; 18 | virtual ~Mutex() {} 19 | static Mutex *Create(); 20 | }; 21 | 22 | class Lock { 23 | Mutex *mute; 24 | public: 25 | Lock(Mutex *mute_) : mute(mute_) { 26 | mute->Lock(); 27 | } 28 | ~Lock() { 29 | mute->Unlock(); 30 | } 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /scite/src/PropSetFile.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file PropSetFile.h 3 | ** Definition of platform independent base class of editor. 4 | **/ 5 | // Copyright 1998-2009 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | /** 9 | */ 10 | 11 | typedef std::map mapss; 12 | 13 | class PropSetFile { 14 | bool lowerKeys; 15 | SString GetWildUsingStart(const PropSetFile &psStart, const char *keybase, const char *filename); 16 | static bool caseSensitiveFilenames; 17 | mapss props; 18 | std::string enumnext; 19 | public: 20 | PropSetFile *superPS; 21 | PropSetFile(bool lowerKeys_=false); 22 | virtual ~PropSetFile(); 23 | void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1); 24 | void Set(const char *keyVal); 25 | void Unset(const char *key, int lenKey=-1); 26 | void SetMultiple(const char *s); 27 | SString Get(const char *key) const; 28 | SString GetExpanded(const char *key) const; 29 | SString Expand(const char *withVars, int maxExpands=100) const; 30 | int GetInt(const char *key, int defaultValue=0) const; 31 | void Clear(); 32 | char *ToString() const; // Caller must delete[] the return value 33 | 34 | bool ReadLine(const char *data, bool ifIsTrue, FilePath directoryForImports, FilePath imports[] = 0, int sizeImports = 0); 35 | void ReadFromMemory(const char *data, int len, FilePath directoryForImports, FilePath imports[] = 0, int sizeImports = 0); 36 | bool Read(FilePath filename, FilePath directoryForImports, FilePath imports[] = 0, int sizeImports = 0); 37 | void SetInteger(const char *key, int i); 38 | SString GetWild(const char *keybase, const char *filename); 39 | SString GetNewExpand(const char *keybase, const char *filename=""); 40 | bool GetFirst(const char *&key, const char *&val); 41 | bool GetNext(const char *&key, const char *&val); 42 | static void SetCaseSensitiveFilenames(bool caseSensitiveFilenames_) { 43 | caseSensitiveFilenames = caseSensitiveFilenames_; 44 | } 45 | 46 | private: 47 | // copy-value semantics not implemented 48 | PropSetFile(const PropSetFile ©); 49 | void operator=(const PropSetFile &assign); 50 | }; 51 | -------------------------------------------------------------------------------- /scite/src/SciTE.properties: -------------------------------------------------------------------------------- 1 | # SciTE.properties is the per directory local options file and can be used to 2 | # override settings made in SciTEGlobal.properties, SciTEUser.properties and 3 | # SciTEDirectory.properties. 4 | command.build.directory.*.cxx=..\win32 5 | command.build.directory.*.h=..\win32 6 | command.build.*.cxx=nmake -f scite.mak DEBUG=1 QUIET=1 7 | command.build.*.h=nmake -f scite.mak DEBUG=1 QUIET=1 8 | command.go.*.cxx=..\bin\SciTE 9 | command.go.*.h=..\bin\SciTE 10 | command.go.needs.*.cxx=cmd /c cd ..\win32 && nmake -f scite.mak DEBUG=1 QUIET=1 11 | -------------------------------------------------------------------------------- /scite/src/SciTEGlobal.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/src/SciTEGlobal.properties -------------------------------------------------------------------------------- /scite/src/SciTEKeys.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file SciTEKeys.h 3 | ** SciTE keyboard shortcut facilities. 4 | **/ 5 | // Copyright 1998-2004 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef SCITEKEYS_H 9 | #define SCITEKEYS_H 10 | 11 | class SciTEKeys { 12 | public: 13 | static long ParseKeyCode(const char *mnemonic); 14 | static bool MatchKeyCode(long parsedKeyCode, int key, int modifiers); 15 | }; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /scite/src/StringList.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file StringList.h 3 | ** Definition of class holding a list of strings. 4 | **/ 5 | // Copyright 1998-2005 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | class StringList { 9 | public: 10 | // Each word contains at least one character - a empty word acts as sentinel at the end. 11 | char **words; 12 | char **wordsNoCase; 13 | char *list; 14 | int len; 15 | bool onlyLineEnds; ///< Delimited by any white space or only line ends 16 | bool sorted; 17 | bool sortedNoCase; 18 | int starts[256]; 19 | StringList(bool onlyLineEnds_ = false) : 20 | words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), 21 | sorted(false), sortedNoCase(false) {} 22 | ~StringList() { Clear(); } 23 | operator bool() const { return len ? true : false; } 24 | char *operator[](int ind) { return words[ind]; } 25 | void Clear(); 26 | void Set(const char *s); 27 | char *Allocate(int size); 28 | void SetFromAllocated(); 29 | bool InList(const char *s); 30 | //bool InListAbbreviated(const char *s, const char marker); 31 | const char *GetNearestWord(const char *wordStart, int searchLen, 32 | bool ignoreCase = false, SString wordCharacters="", int wordIndex = -1); 33 | char *GetNearestWords(const char *wordStart, int searchLen, 34 | bool ignoreCase=false, char otherSeparator='\0', bool exactLen=false); 35 | }; 36 | 37 | -------------------------------------------------------------------------------- /scite/src/abbrev.properties: -------------------------------------------------------------------------------- 1 | # Global abbreviations file for SciTE 2 | # Place this file in your home directory, that is, the same directory 3 | # as the user options file. 4 | # Contains a list of entries of the form abbreviation=expansion 5 | # Type the abbreviation and press Ctrl+B to insert the expansion 6 | # The '|' marks the position the caret will be after expansion. 7 | 8 | #main=int main(int argc, char *argv[]) {\n|\n} 9 | #i=if (|) {\n\n} 10 | -------------------------------------------------------------------------------- /scite/src/ada.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Ada files. 2 | 3 | filter.ada=Ada (ads adb)|*.ads;*.adb| 4 | 5 | file.patterns.ada=*.ads;*.adb 6 | 7 | lexer.$(file.patterns.ada)=ada 8 | 9 | #indent.size.$(file.patterns.ada)=3 10 | #use.tabs.$(file.patterns.ada)=0 11 | 12 | # Keyword except of operator keywords 13 | keywordclass.ada.main=abort abstract accept access aliased all array at begin body \ 14 | case constant declare delay delta digits do else elsif end entry exception exit for \ 15 | function generic goto if in is limited loop new null of others out package pragma \ 16 | private procedure protected raise range record renames requeue return reverse \ 17 | select separate subtype tagged task terminate then type until use when while with 18 | # Keywords for operators 19 | keywordclass.ada.operators=abs and mod not or rem xor 20 | 21 | keywordclass.ada=$(keywordclass.ada.main) $(keywordclass.ada.operators) 22 | 23 | keywords.$(file.patterns.ada)=$(keywordclass.ada) 24 | 25 | # Ada styles 26 | # Default 27 | style.ada.0=fore:#808080 28 | # Keyword 29 | style.ada.1=$(colour.keyword),bold 30 | # Identifiers 31 | style.ada.2= 32 | # Number 33 | style.ada.3=$(colour.number) 34 | # Operators (delimiters) 35 | style.ada.4=$(colour.operator),bold 36 | # Character 37 | style.ada.5=$(colour.char) 38 | # End of line where character is not closed 39 | style.ada.6=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 40 | # String 41 | style.ada.7=$(colour.string) 42 | # End of line where string is not closed 43 | style.ada.8=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 44 | # Label 45 | style.ada.9=fore:#7F0000 46 | # Comment 47 | style.ada.10=$(colour.code.comment.line),$(font.code.comment.line) 48 | # Illegal token 49 | style.ada.11=fore:#FF0000 50 | 51 | # Comments 52 | comment.block.ada=--~ 53 | 54 | braces.ada.style=4 55 | 56 | statement.indent.$(file.patterns.ada)=5 begin declare else elsif exception for if is loop while 57 | statement.lookback.$(file.patterns.ada)=20 58 | block.start.$(file.patterns.ada)=10 then is 59 | block.end.$(file.patterns.ada)=10 end 60 | 61 | calltip.ada.word.characters=._$(chars.alpha) 62 | 63 | adagcc=gcc -c $(FileNameExt) 64 | 65 | command.compile.*.ads=$(adagcc) 66 | command.build.*.ads=gnatmake 67 | command.go.*.ads=$(FileName) 68 | 69 | command.compile.*.adb=$(adagcc) 70 | command.build.*.adb=gnatmake 71 | command.go.*.adb=$(FileName) 72 | -------------------------------------------------------------------------------- /scite/src/asn1.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for ASN.1 MIB definition files. 2 | 3 | filter.asn1=ASN.1 (asn1)|*.mib| 4 | 5 | file.patterns.asn1=*.mib 6 | 7 | lexer.$(file.patterns.asn1)=asn1 8 | 9 | # ASN.1 styles 10 | # Default 11 | style.asn1.0=fore:#000000 12 | # Comment 13 | style.asn1.1=fore:#007F00,$(font.comment) 14 | # Identifiers 15 | style.asn1.2=fore:#000000,bold 16 | # Double quoted string 17 | style.asn1.3=fore:#7F007F 18 | # Numeric OID definition 19 | style.asn1.4=fore:#007F7F,bold 20 | # Non OID numbers 21 | style.asn1.5=fore:#7F0000 22 | # Keywords 23 | style.asn1.6=fore:#00007F 24 | # Attributes 25 | style.asn1.7=fore:#F07800 26 | # Descriptors 27 | style.asn1.8=fore:#00007F 28 | # Types 29 | style.asn1.9=fore:#00007F 30 | # Operators 31 | style.asn1.10=fore:#222222 32 | 33 | # Keywords 34 | keywords.$(file.patterns.asn1)=\ 35 | ACCESS AGENT AUGMENTS \ 36 | BEGIN BITS \ 37 | CAPABILITIES CHOICE COMPLIANCE CONTACT CONVENTION \ 38 | DEFINITIONS DEFVAL DESCRIPTION DISPLAY \ 39 | END ENTERPRISE EXPORTS \ 40 | FALSE FROM \ 41 | GROUP GROUPS \ 42 | HINT \ 43 | IDENTITY IMPLIED IMPORTS INCLUDES INDEX INFO \ 44 | LAST \ 45 | MANDATORY MAX MIN MODULE \ 46 | NOTATION NOTIFICATION NULL \ 47 | OBJECTS OBJECT-TYPE OF ORGANIZATION \ 48 | PRODUCT \ 49 | RELEASE REFERENCE REQUIRES REVISION \ 50 | SEQUENCE SIZE STATUS SUPPORTS SYNTAX \ 51 | TEXTUAL TRAP TYPE TRAP-TYPE \ 52 | UPDATED \ 53 | VALUE VARIABLES VARIATION \ 54 | WRITE 55 | 56 | # Attributes 57 | keywords2.$(file.patterns.asn1)=\ 58 | accessible \ 59 | create current \ 60 | deprecated \ 61 | for \ 62 | mandatory \ 63 | not notify not-accessible \ 64 | obsolete only optional \ 65 | read read-only read-write \ 66 | write 67 | 68 | # Descriptors 69 | keywords3.$(file.patterns.asn1)=\ 70 | ABSENT ANY APPLICATION \ 71 | BIT BOOLEAN BY \ 72 | COMPONENT COMPONENTS \ 73 | DEFAULT DEFINED \ 74 | ENUMERATED EXPLICIT EXTERNAL \ 75 | IMPLICIT INIFINITY \ 76 | MAX MIN MINUS \ 77 | OPTIONAL \ 78 | PRESENT PRIVATE \ 79 | REAL \ 80 | SET \ 81 | TAGS TRUE 82 | 83 | # Types 84 | keywords4.$(file.patterns.asn1)=\ 85 | Counter Counter32 Counter64 \ 86 | DisplayString \ 87 | Gauge Gauge32 \ 88 | IDENTIFIER INTEGER Integer32 IpAddress \ 89 | NetworkAddress NsapAddress \ 90 | OBJECT OCTET Opaque \ 91 | PhysAddress \ 92 | STRING \ 93 | TimeTicks \ 94 | UInteger32 UNITS Unsigned32 95 | 96 | -------------------------------------------------------------------------------- /scite/src/bullant.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Bullant files. 2 | 3 | filter.bullant=Bullant (.ant)|*.ant| 4 | 5 | file.patterns.bullant=*.ant 6 | 7 | lexer.$(file.patterns.bullant)=bullant 8 | 9 | keywordclass.bullant=abstract all ancestor and application \ 10 | assert attributes author \ 11 | begin \ 12 | callback class concrete config constants construct continue \ 13 | depends description downcast driver \ 14 | elif else ensures error exception exposure extension \ 15 | false fatal final function \ 16 | generics glyph \ 17 | help hidden host \ 18 | immutable in inherits is \ 19 | kernel \ 20 | label leave library locals \ 21 | mutable \ 22 | none not null \ 23 | obsolete options or other \ 24 | parameters peer private public \ 25 | raise reason restricted retry return \ 26 | returns rollback route \ 27 | security self settings severity step \ 28 | task test transaction true \ 29 | unknown \ 30 | varying \ 31 | warning when \ 32 | method end if until while trap case debug for foreach lock \ 33 | boolean \ 34 | character character$ \ 35 | date date$ datetime datetime$ \ 36 | float \ 37 | hex$ \ 38 | identifier identifier$ integer interval interval$ \ 39 | money money$ \ 40 | raw raw$ \ 41 | string \ 42 | tick tick$ time time$ \ 43 | version version$ 44 | 45 | 46 | keywords.$(file.patterns.bullant)=$(keywordclass.bullant) 47 | 48 | # Bullant styles 49 | # White space 50 | style.bullant.0=fore:#000000,$(font.monospace) 51 | # Comment 52 | style.bullant.1=fore:#007F00,$(font.monospace) 53 | # Line Comment 54 | style.bullant.2=fore:#007F00,$(font.monospace) 55 | # Doc comment 56 | style.bullant.3=fore:#7F7F7F 57 | # Number 58 | style.bullant.4=fore:#007F7F 59 | 60 | 61 | # Keyword 62 | style.bullant.5=fore:#00007F,bold 63 | # Double quoted string 64 | style.bullant.6=fore:#7F007F,$(font.monospace) 65 | # Single quoted string 66 | style.bullant.7=fore:#7F007F,$(font.monospace) 67 | # Symbols 68 | style.bullant.8=fore:#007F7F 69 | # Preprocessor 70 | style.bullant.9=fore:#7F7F00 71 | 72 | # compile 73 | command.compile.*.ant= 74 | 75 | # normal execute 76 | command.go.*.ant= 77 | command.go.subsystem.*.ant= 78 | 79 | #build=compile ... 80 | command.build.*.ant= 81 | command.build.subsystem.*.ant= 82 | 83 | -------------------------------------------------------------------------------- /scite/src/css.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/src/css.properties -------------------------------------------------------------------------------- /scite/src/gap.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for GAP files. 2 | 3 | file.patterns.gap=*.g;*.gd;*.gi 4 | 5 | # GAP files 6 | filter.gap=Gap (g gi gd)|$(file.patterns.gap)| 7 | 8 | lexer.$(file.patterns.gap)=gap 9 | 10 | keywords.$(file.patterns.gap)=and break continue do elif else end fi for function \ 11 | if in local mod not od or quit rec repeat return then until while QUIT 12 | 13 | keywords2.$(file.patterns.gap)=false true IsBound Unbind TryNextMethod \ 14 | Info Assert SaveWorkspace fail 15 | 16 | #keywords3.$(file.patterns.gap) 17 | 18 | comment.block.gap=#~ 19 | 20 | # GAP styles 21 | # White space 22 | style.gap.0=fore:#808080 23 | # Identifiers 24 | style.gap.1= 25 | # Keywords 26 | style.gap.2=$(colour.keyword),bold 27 | # Keywords 2 28 | style.gap.3=$(colour.keyword) 29 | # Keywords 3 30 | style.gap.4=$(colour.keyword) 31 | # Keywords 4 32 | style.gap.5=$(colour.keyword) 33 | # Strings 34 | style.gap.6=$(colour.string) 35 | # Characters 36 | style.gap.7=$(colour.char) 37 | # Operators 38 | style.gap.8=$(colour.operator),bold 39 | # Comment 40 | style.gap.9=$(colour.code.comment.line) 41 | # Numbers 42 | style.gap.10=$(colour.number) 43 | # End of line where string is not closed 44 | style.gap.11=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled 45 | 46 | # Braces are only matched in operator style 47 | braces.gap.style=8 -------------------------------------------------------------------------------- /scite/src/latex.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for LaTeX files. 2 | 3 | file.patterns.latex=*.tex;*.sty 4 | 5 | filter.latex=LaTeX (tex sty)|$(file.patterns.latex)| 6 | 7 | lexer.$(file.patterns.latex)=latex 8 | 9 | # LaTeX styles 10 | # White space 11 | style.latex.0=fore:#000000 12 | # Command 13 | style.latex.1=fore:#AA0000,bold 14 | # Tag 15 | style.latex.2=fore:#880088,bold 16 | # Math 17 | style.latex.3=fore:#0000FF 18 | # Comment 19 | style.latex.4=fore:#00AA00 20 | 21 | command.compile.*.tex=latex $(FileNameExt) 22 | command.build.*.tex=dvips -f $(FileName).dvi > $(FileName).ps 23 | command.go.*.tex=dvips $(FileName).dvi 24 | 25 | command.name.0.*.tex=View 26 | command.0.*.tex=xdvi $(FileName).dvi 27 | command.name.1.*.tex=View PS 28 | command.1.*.tex=gv $(FileName).ps 29 | -------------------------------------------------------------------------------- /scite/src/lot.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for lot files. 2 | file.patterns.lot=*.lot 3 | 4 | filter.lot=Lot (lot)|$(file.patterns.lot)| 5 | 6 | lexer.$(file.patterns.lot)=lot 7 | 8 | word.characters.$(file.patterns.lot)=$(chars.alpha)$(chars.numeric) 9 | 10 | # LOT FileStyles 11 | # Default 12 | style.lot.0=fore:#000000 13 | # header 14 | style.lot.1=back:#00F0FF,eolfilled 15 | # break 16 | style.lot.2=back:#FFFF00,eolfilled 17 | # set 18 | style.lot.3=fore:#FFFFFF,back:#0000FF,bold,eolfilled 19 | # pass 20 | style.lot.4=back:#00FF00,eolfilled 21 | # fail 22 | style.lot.5=back:#FF0000,eolfilled,bold 23 | # abort 24 | style.lot.6=back:#0000FF,bold,eolfilled 25 | -------------------------------------------------------------------------------- /scite/src/purebasic.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for PureBasic files. 2 | 3 | file.patterns.purebasic=*.pb 4 | 5 | filter.purebasic=PureBasic (pb)|$(file.patterns.purebasic)| 6 | 7 | lexer.$(file.patterns.purebasic)=purebasic 8 | 9 | # keywords must be all lowercase 10 | 11 | #Language 12 | keywords.$(file.patterns.purebasic)=and break case continue data \ 13 | datasection declare declarecdll declaredll default deftype dim else \ 14 | elseif end enddatasection endenumeration endif endinterface endprocedure \ 15 | endselect endstructure endstructureunion enumeration extends fakereturn \ 16 | for foreach forever global gosub goto if includebinary includefile \ 17 | includepath interface newlist next or procedure procedurecdll \ 18 | proceduredll procedurereturn protected read repeat restore return select \ 19 | shared static step structure structureunion to until wend while xincludefile 20 | 21 | #preprocessor 22 | keywords2.$(file.patterns.purebasic)=compilercase compilerdefault \ 23 | compilerelse compilerendif compilerendselect compilerif compilerselect 24 | 25 | # PB styles 26 | # Default 27 | style.purebasic.0=fore:#000000 28 | # Comment 29 | style.purebasic.1=$(colour.code.comment.line),$(font.code.comment.line) 30 | # Number 31 | style.purebasic.2=$(colour.number) 32 | # Keyword1 33 | style.purebasic.3=$(colour.keyword) 34 | # String 35 | style.purebasic.4=$(colour.string) 36 | # Preprocessor 37 | # style.purebasic.5=$(colour.error) 38 | # Operator 39 | style.purebasic.6=$(colour.operator) 40 | # Identifier 41 | style.purebasic.7=$(style.purebasic.0) 42 | # Date 43 | # style.purebasic.8=$(colour.error) 44 | # StringEOL 45 | # style.purebasic.9=$(colour.error) 46 | # Keyword2 47 | style.purebasic.10=$(colour.preproc) 48 | # Keyword3 49 | style.purebasic.11=$(colour.keyword) 50 | # Keyword4 51 | style.purebasic.12=$(colour.keyword) 52 | # Constant 53 | style.purebasic.13=$(colour.number) 54 | # Asm 55 | # style.purebasic.14=$(colour.error) 56 | # Label 57 | style.purebasic.15=$(colour.preproc) 58 | # Error 59 | style.purebasic.16=$(colour.error) 60 | # HexNumber 61 | style.purebasic.17=$(colour.number) 62 | # BinNumber 63 | style.purebasic.18=$(colour.number) 64 | 65 | -------------------------------------------------------------------------------- /scite/src/rebol.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/src/rebol.properties -------------------------------------------------------------------------------- /scite/src/smalltalk.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for Smalltalk files. 2 | 3 | file.patterns.smalltalk=*.st 4 | 5 | filter.smalltalk=Smalltalk (.st)|$(file.patterns.smalltalk)| 6 | 7 | lexer.$(file.patterns.smalltalk)=smalltalk 8 | 9 | keywords.$(file.patterns.smalltalk)=\ 10 | ifTrue: ifFalse: whileTrue: whileFalse: ifNil: ifNotNil: whileTrue whileFalse repeat isNil notNil 11 | 12 | # Styles 13 | 14 | # Default 15 | style.smalltalk.0= 16 | # String 17 | style.smalltalk.1=$(colour.string),eolfilled 18 | # Number 19 | style.smalltalk.2=$(colour.number) 20 | # Comment 21 | style.smalltalk.3=$(colour.code.comment.box) 22 | # Symbol 23 | style.smalltalk.4=fore:#800080 24 | # Binary 25 | style.smalltalk.5=$(colour.operator) 26 | # Boolean 27 | style.smalltalk.6=$(colour.keyword),bold 28 | # self 29 | style.smalltalk.7=$(colour.keyword),bold 30 | # super 31 | style.smalltalk.8=$(colour.keyword),bold 32 | # nil 33 | style.smalltalk.9=$(colour.keyword),bold 34 | # Global 35 | style.smalltalk.10=bold 36 | # Return 37 | style.smalltalk.11=fore:#A00000,bold 38 | # Special 39 | style.smalltalk.12=bold 40 | # KwSend 41 | style.smalltalk.13=fore:#008000 42 | # Assignment 43 | style.smalltalk.14=bold 44 | # Character 45 | style.smalltalk.15=$(colour.char) 46 | # Special selector 47 | style.smalltalk.16=$(colour.keyword),bold -------------------------------------------------------------------------------- /scite/src/sorcins.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for SORCUS Installation Files 2 | # Originally by Christoph Baumann cb@sorcus.com 3 | 4 | # SORCUS Installation files end with .ins 5 | file.patterns.sorcins=*.ins 6 | filter.sorcins=SORCUS Installation File|$(file.patterns.sorcins)| 7 | 8 | lexer.$(file.patterns.sorcins)=sorcins 9 | 10 | commands=ARGUSCONNECTCHANNELS \ 11 | M2DEVICE M2INST M2PAR M2PROC M2FUNC M2CMD M2LOADMODUL \ 12 | M6DEVICE M6INST M6PAR M6PROC M6FUNC M6CMD M6LOADMODUL \ 13 | M7DEVICE M7INST M7PAR M7PROC M7FUNC M7CMD M7LOADMODUL \ 14 | M8DEVICE M8INST M8PAR M8PROC M8FUNC M8CMD M8LOADMODUL \ 15 | MAXRESET MAXCONNECTCPU MAXLOADOSX MAXINST MAXPROC \ 16 | MAXFUNC MAXPAR MAXLOADMDD MAXFLASHFILE 17 | 18 | parameter=board slot layer osx file no usage task tasktype level irq flags \ 19 | datasize func para start progno name count index TIMEOUT RESET 20 | 21 | constants=MAX_NI_TASK MAX_TI_TASK MAX_II_TASK MAX_DI_TASK 22 | 23 | keywords.$(file.patterns.sorcins)=$(commands) 24 | keywords2.$(file.patterns.sorcins)=$(parameter) 25 | keywords3.$(file.patterns.sorcins)=$(constants) 26 | 27 | comment.block.sorcins=; 28 | 29 | # Default 30 | style.sorcins.0= 31 | # Command 32 | style.sorcins.1=fore:#0000ff 33 | # Parameter 34 | style.sorcins.2=fore:#808080 35 | # Comment line 36 | style.sorcins.3=fore:#008000 37 | # String 38 | style.sorcins.4=fore:#ff0000 39 | # Constant 40 | style.sorcins.9=fore:#ff00ff 41 | -------------------------------------------------------------------------------- /scite/src/tacl.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for TACL files. 2 | 3 | file.patterns.TACL=*.tacl 4 | filter.tacl=TACL (TACL)|$(file.patterns.TACL)| 5 | 6 | lexer.$(file.patterns.TACL)=TACL 7 | 8 | # These keywords are case insensitive 9 | keywords.$(file.patterns.TACL)=activate add adddsttransition adduser alter altpri assign attachseg backupcpu break builtins buscmd clear columnize comment compute copy dump copyvar create createseg debug debugnow default delete deluser detachseg env exit fileinfo filenames files filetovar help history home info initterm inlecho inleof inlout inlprefix inlto join keep keys lights load loaded files logoff logon o obey outvar param password pause pmsearch pmsg pop ppd purge push rcvdump receivedump reload remotepassword rename reset rpasswrd run rund seginfo set setprompt settime show sink status stop suspend switch system systimes time timestamp_to_text useusers variables varinfo vartofile vchange vcopy vdelete vfind vinsert vlist vmove volume vtree wakeup who xbusdown xbusup ybusdown ybusup _comparev _contime_to_text _contime_to_text_date _contime_to_text_time _debugger _execute _longest _month3 10 | 11 | comment.block.TACL=== 12 | 13 | # TACL styles 14 | # 1,Comment|2,Line Comment|3,Doc Comment|4,Number|5,Builtin|6,String|7,Character|8,Command|9,Preprocessor|10,Operator 15 | # 11,Identifier|16,Label| 16 | style.TACL.0=fore:#808080,$(font.monospace) 17 | 18 | # Comment 19 | style.TACL.1=$(colour.text.comment),$(font.code.comment) 20 | # Line comment 21 | style.TACL.2=$(colour.code.comment.line),$(font.code.comment.line) 22 | # Doc comment 23 | style.TACL.3=$(colour.code.comment.document),$(font.code.comment.document) 24 | # Number 25 | style.TACL.4=$(colour.number),$(font.monospace) 26 | # Builtin 27 | style.TACL.5=$(colour.keyword),bold,$(font.monospace) 28 | # String 29 | style.TACL.6=$(colour.string),$(font.monospace),$(font.monospace) 30 | # Character 31 | style.TACL.7=$(colour.char),$(font.monospace),$(font.monospace) 32 | # Command 33 | style.TACL.8=back:#C0C0C0,bold,$(font.monospace) 34 | # Preprocessor 35 | style.TACL.9=$(colour.preproc),$(font.preproc),$(font.monospace) 36 | # Operators 37 | style.TACL.10=$(colour.operator),bold,$(font.monospace) 38 | # Identifier 39 | style.TACL.11=$(colour.identifier),$(font.identifier),$(font.monospace) 40 | # Label 41 | style.TACL.16=fore:#0020F0,$(font.monospace) 42 | 43 | 44 | -------------------------------------------------------------------------------- /scite/src/tal.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for TAL files. 2 | file.patterns.TAL=*.TAL 3 | filter.tal=TAL (TAL)|$(file.patterns.TAL)| 4 | 5 | lexer.$(file.patterns.TAL)=TAL 6 | 7 | # These keywords are case insensitive 8 | keywords.$(file.patterns.TAL)=and assert baddr begin by call callable case cbaddr code cwaddr define do downto drop else end entry external fixed for forward goto if int interrupt label land literal lor main not of or otherwise priv proc procaddr real resident return rscan scan sgbaddr sgwaddr sgxbaddr sgxwaddr stack store string struct subproc then to unsigned until use variable waddr while xor 9 | keywords2.$(file.patterns.TAL)=at below bit_filler block bytes c cobol elements ext extensible filler fortran language name pascal private unspecified words 10 | 11 | comment.block.TAL=-- 12 | 13 | # TAL styles 14 | # 1,Comment|2,Line Comment|3,Doc Comment|4,Number|5,Keyword|6,String|7,Character|8,Unreserved keyword|9,Preprocessor|10,Operator 15 | # 11,Identifier 16 | style.TAL.0=fore:#808080 17 | 18 | # Comment 19 | style.TAL.1=fore:#008000,$(font.code.comment) 20 | # Line comment 21 | style.TAL.2=$(colour.code.comment.line),$(font.code.comment.line) 22 | # Doc comment 23 | style.TAL.3=$(colour.code.comment.document),$(font.code.comment.document) 24 | # Number 25 | style.TAL.4=$(colour.number) 26 | # Keyword 27 | style.TAL.5=$(colour.keyword),bold 28 | # String 29 | style.TAL.6=$(colour.string),$(font.monospace) 30 | # Character 31 | style.TAL.7=$(colour.char),$(font.monospace) 32 | # Unreserved keyword 33 | style.TAL.8=$(colour.keyword),bold 34 | # Preprocessor 35 | style.TAL.9=$(colour.preproc),$(font.preproc) 36 | # Operators 37 | style.TAL.10=$(colour.operator),bold 38 | # Identifier 39 | style.TAL.11=$(colour.identifier),$(font.identifier) 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /scite/src/yaml.properties: -------------------------------------------------------------------------------- 1 | # Define SciTE settings for YAML files. 2 | 3 | # associate YAML file patter with the YAML lexer 4 | file.patterns.yaml=*.yaml;*.yml 5 | filter.yaml=YAML (yaml)|$(file.patterns.yaml)| 6 | lexer.$(file.patterns.yaml)=yaml 7 | 8 | # YAML requires spaces for tabs 9 | tabsize.$(file.patterns.yaml)=2 10 | indent.size.$(file.patterns.yaml)=2 11 | use.tabs.$(file.patterns.yaml)=0 12 | 13 | # YAML comment character 14 | comment.block.yaml=#~ 15 | 16 | # YAML convertible values 17 | keywords.$(file.patterns.yaml)=true false yes no 18 | 19 | # YAML font styles 20 | # default 21 | style.yaml.0=$(font.text),fore:#000000 22 | # comment line 23 | style.yaml.1=$(font.comment),fore:#008800 24 | # value identifier 25 | style.yaml.2=$(font.base),fore:#000088,bold 26 | # keyword value 27 | style.yaml.3=$(font.base),fore:#880088 28 | # numerical value 29 | style.yaml.4=$(font.base),fore:#880000 30 | # reference/repeating value 31 | style.yaml.5=$(font.base),fore:#008888 32 | # document delimiting line 33 | style.yaml.6=$(font.comment),fore:#FFFFFF,bold,back:#000088,eolfilled 34 | # text block marker 35 | style.yaml.7=$(font.text),fore:#333366 36 | # syntax error marker 37 | style.yaml.8=$(font.text),fore:#FFFFFF,italics,bold,back:#FF0000,eolfilled 38 | -------------------------------------------------------------------------------- /scite/tgzgscite: -------------------------------------------------------------------------------- 1 | cd .. 2 | rm -f gscite.tgz 3 | mkdir gscite 4 | cp scite/*.txt gscite 5 | cp scite/bin/SciTE gscite 6 | strip gscite/SciTE 7 | cp scite/src/*.properties gscite 8 | rm -f gscite/Embedded.properties 9 | cp scite/doc/*.html gscite 10 | cp scite/doc/*.png gscite 11 | cp scite/gtk/*.png gscite 12 | cp scite/doc/*.jpg gscite 13 | cp scite/doc/*.1 gscite 14 | tar --create gscite/* | gzip -c >gscite.tgz 15 | rm -f gscite/* 16 | rmdir gscite 17 | -------------------------------------------------------------------------------- /scite/tgzsrc: -------------------------------------------------------------------------------- 1 | cd .. 2 | rm -f scite.tgz 3 | rm -f scite/bin/*.properties 4 | tar --create --exclude=*.o --exclude=*.obj --exclude=*.dll --exclude=*.exe --exclude=*.a --exclude=SciTE \ 5 | scintilla/* scite/* \ 6 | | gzip -c >scite.tgz 7 | -------------------------------------------------------------------------------- /scite/upxsc1.bat: -------------------------------------------------------------------------------- 1 | del/q ..\Sc1.exe 2 | upx --best --force -o ..\Sc1.exe bin\Sc1.exe 3 | -------------------------------------------------------------------------------- /scite/win32/DirectorExtension.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file DirectorExtension.h 3 | ** Extension for communicating with a director program. 4 | **/ 5 | // Copyright 1998-2001 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | class DirectorExtension : public Extension { 9 | private: 10 | DirectorExtension() {} // Singleton 11 | DirectorExtension(const DirectorExtension &); // Disable copy ctor 12 | void operator=(const DirectorExtension &); // Disable operator= 13 | 14 | public: 15 | static DirectorExtension &Instance(); 16 | 17 | // Implement the Extension interface 18 | virtual bool Initialise(ExtensionAPI *host_); 19 | virtual bool Finalise(); 20 | virtual bool Clear(); 21 | virtual bool Load(const char *filename); 22 | 23 | virtual bool OnOpen(const char *path); 24 | virtual bool OnSwitchFile(const char *path); 25 | virtual bool OnSave(const char *path); 26 | virtual bool OnChar(char ch); 27 | virtual bool OnExecute(const char *s); 28 | virtual bool OnSavePointReached(); 29 | virtual bool OnSavePointLeft(); 30 | virtual bool OnStyle(unsigned int startPos, int lengthDoc, int initStyle, StyleWriter *styler); 31 | virtual bool OnDoubleClick(); 32 | virtual bool OnUpdateUI(); 33 | virtual bool OnMarginClick(); 34 | virtual bool OnMacro(const char *command, const char *params); 35 | 36 | virtual bool SendProperty(const char *prop); 37 | virtual bool OnClose(const char *path); 38 | 39 | // Allow messages through to extension 40 | void HandleStringMessage(const char *message); 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /scite/win32/DragDrop.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/win32/DragDrop.cur -------------------------------------------------------------------------------- /scite/win32/SciBall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/win32/SciBall.ico -------------------------------------------------------------------------------- /scite/win32/SciTE.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | SciTE 11 | 12 | 13 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /scite/win32/UniqueInstance.h: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file UniqueInstance.h 3 | ** Header of the class to ensure a unique instance of the editor. 4 | **/ 5 | // Copyright 1998-2003 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | class SciTEWin; 9 | 10 | /** 11 | */ 12 | class UniqueInstance { 13 | 14 | private: 15 | SciTEWin *stw; ///< Access to SciTEWin interface 16 | UINT identityMessage; ///< Registered message to identify SciTE instances 17 | HANDLE mutex; ///< Mutex to avoid concurrent running 18 | SString mutexName; ///< Name of the above 19 | bool bAlreadyRunning; ///< true if another instance accepting files is found 20 | HWND hOtherWindow; ///< Handle of the window of the found other instance 21 | 22 | public: 23 | UniqueInstance(); 24 | ~UniqueInstance(); 25 | 26 | void Init(SciTEWin *stw_); ///< To set the access to the SciTEWin interface 27 | bool AcceptToOpenFiles(bool bAccept); ///< Set mutex and see if succeed 28 | void ToggleOpenFilesHere(); ///< Change the option to open files in this instance and ask other instance to give up this option 29 | LRESULT CopyData(COPYDATASTRUCT *pcds); ///< Send command line to existing instance 30 | LRESULT CheckMessage(UINT message, WPARAM wParam, LPARAM lParam); ///< Test if a given message is the identity message 31 | void CheckOtherInstance(); ///< Create mutex name and try to set it 32 | bool FindOtherInstance(); ///< Find another instance answering to the identity message 33 | void SendCommands(const char *cmdLine); ///< Send the command line to the other instance 34 | static BOOL CALLBACK SearchOtherInstance(HWND hWnd, LPARAM lParam); ///< Callback in the window enumeration 35 | }; 36 | -------------------------------------------------------------------------------- /scite/win32/WinMutex.cxx: -------------------------------------------------------------------------------- 1 | // SciTE - Scintilla based Text Editor 2 | /** @file WinMutex.cxx 3 | ** Define mutex 4 | **/ 5 | // SciTE & Scintilla copyright 1998-2003 by Neil Hodgson 6 | // Copyright 2007 by Neil Hodgson , from April White 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | // http://www.microsoft.com/msj/0797/win320797.aspx 10 | 11 | #include 12 | #include "Mutex.h" 13 | 14 | class WinMutex : public Mutex { 15 | private: 16 | CRITICAL_SECTION cs; 17 | virtual void Lock() { ::EnterCriticalSection(&cs); } 18 | virtual void Unlock() { ::LeaveCriticalSection(&cs); } 19 | WinMutex() { ::InitializeCriticalSection(&cs); } 20 | virtual ~WinMutex() { ::DeleteCriticalSection(&cs); } 21 | friend class Mutex; 22 | }; 23 | 24 | Mutex *Mutex::Create() { 25 | return new WinMutex(); 26 | } 27 | -------------------------------------------------------------------------------- /scite/win32/closefile.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkottman/scite/a1edffd93547244eb32abace694c797f37c32129/scite/win32/closefile.bmp -------------------------------------------------------------------------------- /scite/zipsrc.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | del/q scite.zip 3 | zip scite.zip scintilla\*.* scintilla\*\*.* scintilla\*\*\*.* scintilla\*\*\*\*.* scintilla\*\*\*\*\*.* scite\*.* scite\*\*.* scite\*\*\*.* scite\*\*\*\*.* -x *.o -x *.obj -x *.lib -x *.dll -x *.exe -x *.pdb -x *.res -x *.exp -x *.ncb -x *.sbr -x *.bsc -x *.ilk -x *.idb -x *.dpsession -x *.bak 4 | cd scite 5 | -------------------------------------------------------------------------------- /scite/zipwscite.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | del/q wscite.zip 3 | mkdir wscite 4 | copy scite\license.txt wscite 5 | copy scite\bin\SciTE.exe wscite 6 | copy scite\bin\SciLexer.dll wscite 7 | copy scite\src\*.properties wscite 8 | copy scite\lua\COPYRIGHT wscite\luaCOPYRIGHT 9 | del/q wscite\Embedded.properties 10 | copy scite\doc\*.html wscite 11 | copy scite\doc\*.png wscite 12 | copy scite\doc\*.jpg wscite 13 | copy scite\doc\*.1 wscite 14 | zip wscite.zip wscite\*.* 15 | del/q wscite\*.* 16 | rmdir wscite 17 | cd scite 18 | -------------------------------------------------------------------------------- /scite/zipwscited.bat: -------------------------------------------------------------------------------- 1 | cd .. 2 | del/q wscite.zip 3 | mkdir wscite 4 | copy scite\license.txt wscite 5 | copy scite\bin\SciTE.exe wscite 6 | copy scite\bin\SciTE.pdb wscite 7 | copy scite\bin\SciLexer.dll wscite 8 | copy scite\bin\SciLexer.pdb wscite 9 | copy scite\src\*.properties wscite 10 | copy scite\lua\COPYRIGHT wscite\luaCOPYRIGHT 11 | del/q wscite\Embedded.properties 12 | copy scite\doc\*.html wscite 13 | copy scite\doc\*.png wscite 14 | copy scite\doc\*.jpg wscite 15 | copy scite\doc\*.1 wscite 16 | zip wscite.zip wscite\*.* 17 | del/q wscite\*.* 18 | rmdir wscite 19 | cd scite 20 | --------------------------------------------------------------------------------