├── .gitignore ├── LICENSE ├── README.md ├── Scintillua++.sln ├── ext ├── lpeg │ ├── HISTORY │ ├── lpcap.c │ ├── lpcap.h │ ├── lpcode.c │ ├── lpcode.h │ ├── lpeg-128.gif │ ├── lpeg.html │ ├── lpprint.c │ ├── lpprint.h │ ├── lptree.c │ ├── lptree.h │ ├── lptypes.h │ ├── lpvm.c │ ├── lpvm.h │ ├── makefile │ ├── re.html │ ├── re.lua │ └── test.lua ├── lua │ ├── Makefile │ ├── README │ ├── doc │ │ ├── contents.html │ │ ├── index.css │ │ ├── logo.gif │ │ ├── lua.1 │ │ ├── lua.css │ │ ├── luac.1 │ │ ├── manual.css │ │ ├── manual.html │ │ ├── osi-certified-72x60.png │ │ └── readme.html │ └── src │ │ ├── Makefile │ │ ├── lapi.c │ │ ├── lapi.h │ │ ├── lauxlib.c │ │ ├── lauxlib.h │ │ ├── lbaselib.c │ │ ├── lbitlib.c │ │ ├── lcode.c │ │ ├── lcode.h │ │ ├── lcorolib.c │ │ ├── lctype.c │ │ ├── lctype.h │ │ ├── ldblib.c │ │ ├── ldebug.c │ │ ├── ldebug.h │ │ ├── ldo.c │ │ ├── ldo.h │ │ ├── ldump.c │ │ ├── lfunc.c │ │ ├── lfunc.h │ │ ├── lgc.c │ │ ├── lgc.h │ │ ├── linit.c │ │ ├── liolib.c │ │ ├── llex.c │ │ ├── llex.h │ │ ├── llimits.h │ │ ├── lmathlib.c │ │ ├── lmem.c │ │ ├── lmem.h │ │ ├── loadlib.c │ │ ├── lobject.c │ │ ├── lobject.h │ │ ├── lopcodes.c │ │ ├── lopcodes.h │ │ ├── loslib.c │ │ ├── lparser.c │ │ ├── lparser.h │ │ ├── lprefix.h │ │ ├── lstate.c │ │ ├── lstate.h │ │ ├── lstring.c │ │ ├── lstring.h │ │ ├── lstrlib.c │ │ ├── ltable.c │ │ ├── ltable.h │ │ ├── ltablib.c │ │ ├── ltm.c │ │ ├── ltm.h │ │ ├── lua.c │ │ ├── lua.h │ │ ├── lua.hpp │ │ ├── luac.c │ │ ├── luaconf.h │ │ ├── lualib.h │ │ ├── lundump.c │ │ ├── lundump.h │ │ ├── lutf8lib.c │ │ ├── lvm.c │ │ ├── lvm.h │ │ ├── lzio.c │ │ └── lzio.h ├── scintilla │ ├── CONTRIBUTING │ ├── License.txt │ ├── README │ ├── cocoa │ │ ├── InfoBar.h │ │ ├── InfoBar.mm │ │ ├── InfoBarCommunicator.h │ │ ├── PlatCocoa.h │ │ ├── PlatCocoa.mm │ │ ├── QuartzTextLayout.h │ │ ├── QuartzTextStyle.h │ │ ├── QuartzTextStyleAttribute.h │ │ ├── ScintillaCocoa.h │ │ ├── ScintillaCocoa.mm │ │ ├── ScintillaFramework │ │ │ ├── English.lproj │ │ │ │ └── InfoPlist.strings │ │ │ ├── Info.plist │ │ │ ├── ScintillaFramework.xcodeproj │ │ │ │ ├── project.pbxproj │ │ │ │ ├── project.xcworkspace │ │ │ │ │ └── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ └── xcschemes │ │ │ │ │ └── Scintilla.xcscheme │ │ │ └── module.modulemap │ │ ├── ScintillaTest │ │ │ ├── AppController.h │ │ │ ├── AppController.mm │ │ │ ├── English.lproj │ │ │ │ ├── InfoPlist.strings │ │ │ │ └── MainMenu.xib │ │ │ ├── Info.plist │ │ │ ├── Scintilla-Info.plist │ │ │ ├── ScintillaTest.xcodeproj │ │ │ │ ├── project.pbxproj │ │ │ │ └── project.xcworkspace │ │ │ │ │ └── contents.xcworkspacedata │ │ │ ├── TestData.sql │ │ │ └── main.m │ │ ├── ScintillaView.h │ │ ├── ScintillaView.mm │ │ ├── checkbuildosx.sh │ │ └── res │ │ │ ├── info_bar_bg.png │ │ │ ├── info_bar_bg@2x.png │ │ │ ├── mac_cursor_busy.png │ │ │ ├── mac_cursor_busy@2x.png │ │ │ ├── mac_cursor_flipped.png │ │ │ └── mac_cursor_flipped@2x.png │ ├── cppcheck.suppress │ ├── delbin.bat │ ├── doc │ │ ├── Design.html │ │ ├── Icons.html │ │ ├── Indicators.png │ │ ├── Lexer.txt │ │ ├── Markers.png │ │ ├── Privacy.html │ │ ├── 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 │ │ ├── ScintillaGTK.h │ │ ├── ScintillaGTKAccessible.cxx │ │ ├── ScintillaGTKAccessible.h │ │ ├── deps.mak │ │ ├── makefile │ │ ├── scintilla-marshal.c │ │ ├── scintilla-marshal.h │ │ └── scintilla-marshal.list │ ├── include │ │ ├── ILexer.h │ │ ├── Platform.h │ │ ├── SciLexer.h │ │ ├── Sci_Position.h │ │ ├── Scintilla.h │ │ ├── Scintilla.iface │ │ └── ScintillaWidget.h │ ├── lexers │ │ ├── LexA68k.cxx │ │ ├── LexAPDL.cxx │ │ ├── LexASY.cxx │ │ ├── LexAU3.cxx │ │ ├── LexAVE.cxx │ │ ├── LexAVS.cxx │ │ ├── LexAbaqus.cxx │ │ ├── LexAda.cxx │ │ ├── LexAsm.cxx │ │ ├── LexAsn1.cxx │ │ ├── LexBaan.cxx │ │ ├── LexBash.cxx │ │ ├── LexBasic.cxx │ │ ├── LexBatch.cxx │ │ ├── LexBibTeX.cxx │ │ ├── LexBullant.cxx │ │ ├── LexCLW.cxx │ │ ├── LexCOBOL.cxx │ │ ├── LexCPP.cxx │ │ ├── LexCSS.cxx │ │ ├── LexCaml.cxx │ │ ├── LexCmake.cxx │ │ ├── LexCoffeeScript.cxx │ │ ├── LexConf.cxx │ │ ├── LexCrontab.cxx │ │ ├── LexCsound.cxx │ │ ├── LexD.cxx │ │ ├── LexDMAP.cxx │ │ ├── LexDMIS.cxx │ │ ├── LexDiff.cxx │ │ ├── LexECL.cxx │ │ ├── LexEDIFACT.cxx │ │ ├── LexEScript.cxx │ │ ├── LexEiffel.cxx │ │ ├── LexErlang.cxx │ │ ├── LexErrorList.cxx │ │ ├── LexFlagship.cxx │ │ ├── LexForth.cxx │ │ ├── LexFortran.cxx │ │ ├── LexGAP.cxx │ │ ├── LexGui4Cli.cxx │ │ ├── LexHTML.cxx │ │ ├── LexHaskell.cxx │ │ ├── LexHex.cxx │ │ ├── LexInno.cxx │ │ ├── LexJSON.cxx │ │ ├── LexKVIrc.cxx │ │ ├── LexKix.cxx │ │ ├── LexLaTeX.cxx │ │ ├── LexLisp.cxx │ │ ├── LexLout.cxx │ │ ├── LexLua.cxx │ │ ├── LexMMIXAL.cxx │ │ ├── LexMPT.cxx │ │ ├── LexMSSQL.cxx │ │ ├── LexMagik.cxx │ │ ├── LexMake.cxx │ │ ├── LexMarkdown.cxx │ │ ├── LexMatlab.cxx │ │ ├── LexMetapost.cxx │ │ ├── LexModula.cxx │ │ ├── LexMySQL.cxx │ │ ├── LexNimrod.cxx │ │ ├── LexNsis.cxx │ │ ├── LexNull.cxx │ │ ├── LexOScript.cxx │ │ ├── LexOpal.cxx │ │ ├── LexPB.cxx │ │ ├── LexPLM.cxx │ │ ├── LexPO.cxx │ │ ├── LexPOV.cxx │ │ ├── LexPS.cxx │ │ ├── LexPascal.cxx │ │ ├── LexPerl.cxx │ │ ├── LexPowerPro.cxx │ │ ├── LexPowerShell.cxx │ │ ├── LexProgress.cxx │ │ ├── LexProps.cxx │ │ ├── LexPython.cxx │ │ ├── LexR.cxx │ │ ├── LexRebol.cxx │ │ ├── LexRegistry.cxx │ │ ├── LexRuby.cxx │ │ ├── LexRust.cxx │ │ ├── LexSML.cxx │ │ ├── LexSQL.cxx │ │ ├── LexSTTXT.cxx │ │ ├── LexScriptol.cxx │ │ ├── LexSmalltalk.cxx │ │ ├── LexSorcus.cxx │ │ ├── LexSpecman.cxx │ │ ├── LexSpice.cxx │ │ ├── LexTACL.cxx │ │ ├── LexTADS3.cxx │ │ ├── LexTAL.cxx │ │ ├── LexTCL.cxx │ │ ├── LexTCMD.cxx │ │ ├── LexTeX.cxx │ │ ├── LexTxt2tags.cxx │ │ ├── LexVB.cxx │ │ ├── LexVHDL.cxx │ │ ├── LexVerilog.cxx │ │ ├── LexVisualProlog.cxx │ │ └── LexYAML.cxx │ ├── lexlib │ │ ├── Accessor.cxx │ │ ├── Accessor.h │ │ ├── CharacterCategory.cxx │ │ ├── CharacterCategory.h │ │ ├── CharacterSet.cxx │ │ ├── CharacterSet.h │ │ ├── LexAccessor.h │ │ ├── LexerBase.cxx │ │ ├── LexerBase.h │ │ ├── LexerModule.cxx │ │ ├── LexerModule.h │ │ ├── LexerNoExceptions.cxx │ │ ├── LexerNoExceptions.h │ │ ├── LexerSimple.cxx │ │ ├── LexerSimple.h │ │ ├── OptionSet.h │ │ ├── PropSetSimple.cxx │ │ ├── PropSetSimple.h │ │ ├── SparseState.h │ │ ├── StringCopy.h │ │ ├── StyleContext.cxx │ │ ├── StyleContext.h │ │ ├── SubStyles.h │ │ ├── WordList.cxx │ │ └── WordList.h │ ├── qt │ │ ├── README │ │ ├── ScintillaEdit │ │ │ ├── ScintillaDocument.cpp │ │ │ ├── ScintillaDocument.h │ │ │ ├── ScintillaEdit.cpp.template │ │ │ ├── ScintillaEdit.h.template │ │ │ ├── ScintillaEdit.pro │ │ │ └── WidgetGen.py │ │ ├── ScintillaEditBase │ │ │ ├── Notes.txt │ │ │ ├── PlatQt.cpp │ │ │ ├── PlatQt.h │ │ │ ├── ScintillaEditBase.cpp │ │ │ ├── ScintillaEditBase.h │ │ │ ├── ScintillaEditBase.pro │ │ │ ├── ScintillaQt.cpp │ │ │ └── ScintillaQt.h │ │ └── ScintillaEditPy │ │ │ ├── README │ │ │ ├── ScintillaConstants.py.template │ │ │ ├── ScintillaEditPy.pro │ │ │ ├── global.h │ │ │ ├── sepbuild.py │ │ │ ├── testsepq.py │ │ │ └── typesystem_ScintillaEdit.xml.template │ ├── scripts │ │ ├── Face.py │ │ ├── FileGenerator.py │ │ ├── GenerateCaseConvert.py │ │ ├── GenerateCharacterCategory.py │ │ ├── HFacer.py │ │ ├── HeaderCheck.py │ │ ├── HeaderOrder.txt │ │ ├── LexGen.py │ │ └── ScintillaData.py │ ├── src │ │ ├── AutoComplete.cxx │ │ ├── AutoComplete.h │ │ ├── CallTip.cxx │ │ ├── CallTip.h │ │ ├── CaseConvert.cxx │ │ ├── CaseConvert.h │ │ ├── CaseFolder.cxx │ │ ├── CaseFolder.h │ │ ├── Catalogue.cxx │ │ ├── Catalogue.h │ │ ├── CellBuffer.cxx │ │ ├── CellBuffer.h │ │ ├── CharClassify.cxx │ │ ├── CharClassify.h │ │ ├── ContractionState.cxx │ │ ├── ContractionState.h │ │ ├── Decoration.cxx │ │ ├── Decoration.h │ │ ├── Document.cxx │ │ ├── Document.h │ │ ├── EditModel.cxx │ │ ├── EditModel.h │ │ ├── EditView.cxx │ │ ├── EditView.h │ │ ├── Editor.cxx │ │ ├── Editor.h │ │ ├── ExternalLexer.cxx │ │ ├── ExternalLexer.h │ │ ├── FontQuality.h │ │ ├── Indicator.cxx │ │ ├── Indicator.h │ │ ├── KeyMap.cxx │ │ ├── KeyMap.h │ │ ├── LineMarker.cxx │ │ ├── LineMarker.h │ │ ├── MarginView.cxx │ │ ├── MarginView.h │ │ ├── Partitioning.h │ │ ├── PerLine.cxx │ │ ├── PerLine.h │ │ ├── Position.h │ │ ├── PositionCache.cxx │ │ ├── PositionCache.h │ │ ├── RESearch.cxx │ │ ├── RESearch.h │ │ ├── RunStyles.cxx │ │ ├── RunStyles.h │ │ ├── SciTE.properties │ │ ├── ScintillaBase.cxx │ │ ├── ScintillaBase.h │ │ ├── Selection.cxx │ │ ├── Selection.h │ │ ├── SparseVector.h │ │ ├── SplitVector.h │ │ ├── Style.cxx │ │ ├── Style.h │ │ ├── UniConversion.cxx │ │ ├── UniConversion.h │ │ ├── UnicodeFromUTF8.h │ │ ├── ViewStyle.cxx │ │ ├── ViewStyle.h │ │ ├── XPM.cxx │ │ └── XPM.h │ ├── test │ │ ├── MessageNumbers.py │ │ ├── README │ │ ├── ScintillaCallable.py │ │ ├── XiteMenu.py │ │ ├── XiteQt.py │ │ ├── XiteWin.py │ │ ├── examples │ │ │ ├── perl-test-5220delta.pl │ │ │ ├── perl-test-5220delta.pl.styled │ │ │ ├── perl-test-sub-prototypes.pl │ │ │ ├── perl-test-sub-prototypes.pl.styled │ │ │ ├── x.asp │ │ │ ├── x.asp.styled │ │ │ ├── x.cxx │ │ │ ├── x.cxx.styled │ │ │ ├── x.d │ │ │ ├── x.d.styled │ │ │ ├── x.html │ │ │ ├── x.html.styled │ │ │ ├── x.lua │ │ │ ├── x.lua.styled │ │ │ ├── x.php │ │ │ ├── x.php.styled │ │ │ ├── x.pl │ │ │ ├── x.pl.styled │ │ │ ├── x.py │ │ │ ├── x.py.styled │ │ │ ├── x.rb │ │ │ ├── x.rb.styled │ │ │ ├── x.vb │ │ │ └── x.vb.styled │ │ ├── gi │ │ │ ├── Scintilla-0.1.gir.good │ │ │ ├── filter-scintilla-h.py │ │ │ ├── gi-test.py │ │ │ └── makefile │ │ ├── lexTests.py │ │ ├── performanceTests.py │ │ ├── simpleTests.py │ │ ├── unit │ │ │ ├── LICENSE_1_0.txt │ │ │ ├── README │ │ │ ├── Sci.natvis │ │ │ ├── SciTE.properties │ │ │ ├── UnitTester.cxx │ │ │ ├── UnitTester.vcxproj │ │ │ ├── catch.hpp │ │ │ ├── makefile │ │ │ ├── test.mak │ │ │ ├── testCellBuffer.cxx │ │ │ ├── testCharClassify.cxx │ │ │ ├── testContractionState.cxx │ │ │ ├── testDecoration.cxx │ │ │ ├── testPartitioning.cxx │ │ │ ├── testRunStyles.cxx │ │ │ ├── testSparseState.cxx │ │ │ ├── testSparseVector.cxx │ │ │ ├── testSplitVector.cxx │ │ │ ├── testUnicodeFromUTF8.cxx │ │ │ ├── testWordList.cxx │ │ │ └── unitTest.cxx │ │ └── xite.py │ ├── tgzsrc │ ├── version.txt │ ├── win32 │ │ ├── CheckD2D.cxx │ │ ├── HanjaDic.cxx │ │ ├── HanjaDic.h │ │ ├── PlatWin.cxx │ │ ├── PlatWin.h │ │ ├── SciLexer.vcxproj │ │ ├── SciTE.properties │ │ ├── ScintRes.rc │ │ ├── Scintilla.def │ │ ├── ScintillaWin.cxx │ │ ├── deps.mak │ │ ├── makefile │ │ └── scintilla.mak │ └── zipsrc.bat ├── scintillua.diff └── scintillua │ ├── CHANGELOG.md │ ├── LICENSE │ ├── LexLPeg.cxx │ ├── LexLPeg.def │ ├── LexerList.md │ ├── Makefile │ ├── README.md │ ├── THANKS.md │ ├── doc │ ├── .footer.md │ ├── .header.md │ ├── CHANGELOG.html │ ├── LexerList.html │ ├── README.html │ ├── THANKS.html │ ├── api.html │ ├── api.md │ ├── bombay │ ├── icon.png │ ├── images │ │ └── icon.png │ ├── manual.html │ ├── manual.md │ ├── markdowndoc.lua │ └── style.css │ ├── gen_lexer_props.lua │ ├── lexers │ ├── actionscript.lua │ ├── ada.lua │ ├── ansi_c.lua │ ├── antlr.lua │ ├── apdl.lua │ ├── apl.lua │ ├── applescript.lua │ ├── asm.lua │ ├── asp.lua │ ├── autoit.lua │ ├── awk.lua │ ├── bash.lua │ ├── batch.lua │ ├── bibtex.lua │ ├── boo.lua │ ├── caml.lua │ ├── chuck.lua │ ├── cmake.lua │ ├── coffeescript.lua │ ├── container.lua │ ├── context.lua │ ├── cpp.lua │ ├── crystal.lua │ ├── csharp.lua │ ├── css.lua │ ├── cuda.lua │ ├── dart.lua │ ├── desktop.lua │ ├── diff.lua │ ├── django.lua │ ├── dmd.lua │ ├── dockerfile.lua │ ├── dot.lua │ ├── eiffel.lua │ ├── elixir.lua │ ├── erlang.lua │ ├── faust.lua │ ├── fish.lua │ ├── forth.lua │ ├── fortran.lua │ ├── fsharp.lua │ ├── gap.lua │ ├── gettext.lua │ ├── gherkin.lua │ ├── glsl.lua │ ├── gnuplot.lua │ ├── go.lua │ ├── groovy.lua │ ├── gtkrc.lua │ ├── haskell.lua │ ├── html.lua │ ├── icon.lua │ ├── idl.lua │ ├── inform.lua │ ├── ini.lua │ ├── io_lang.lua │ ├── java.lua │ ├── javascript.lua │ ├── json.lua │ ├── jsp.lua │ ├── latex.lua │ ├── ledger.lua │ ├── less.lua │ ├── lexer.lua │ ├── lilypond.lua │ ├── lisp.lua │ ├── litcoffee.lua │ ├── logtalk.lua │ ├── lpeg.properties │ ├── lua.lua │ ├── makefile.lua │ ├── man.lua │ ├── markdown.lua │ ├── matlab.lua │ ├── moonscript.lua │ ├── nemerle.lua │ ├── nim.lua │ ├── nsis.lua │ ├── null.lua │ ├── objective_c.lua │ ├── pascal.lua │ ├── perl.lua │ ├── php.lua │ ├── pico8.lua │ ├── pike.lua │ ├── pkgbuild.lua │ ├── powershell.lua │ ├── prolog.lua │ ├── props.lua │ ├── protobuf.lua │ ├── ps.lua │ ├── pure.lua │ ├── python.lua │ ├── rails.lua │ ├── rc.lua │ ├── rebol.lua │ ├── rest.lua │ ├── rexx.lua │ ├── rhtml.lua │ ├── rstats.lua │ ├── ruby.lua │ ├── rust.lua │ ├── sass.lua │ ├── scala.lua │ ├── scheme.lua │ ├── smalltalk.lua │ ├── sml.lua │ ├── snobol4.lua │ ├── sql.lua │ ├── taskpaper.lua │ ├── tcl.lua │ ├── template.txt │ ├── tex.lua │ ├── texinfo.lua │ ├── text.lua │ ├── themes │ │ ├── dark.lua │ │ ├── light.lua │ │ └── scite.lua │ ├── toml.lua │ ├── vala.lua │ ├── vb.lua │ ├── vbscript.lua │ ├── vcard.lua │ ├── verilog.lua │ ├── vhdl.lua │ ├── wsf.lua │ ├── xml.lua │ ├── xtend.lua │ └── yaml.lua │ ├── lpeg-1.0.0.tar.gz.asc │ ├── lua-5.1.4.tar.gz.asc │ ├── scintilla373.tgz.asc │ └── scintillua.luadoc ├── extra ├── default.ini └── npp.lua ├── make_release.ps1 ├── projects ├── Scintillua++.vcxproj ├── Scintillua++.vcxproj.filters ├── lpeg.vcxproj ├── lpeg.vcxproj.filters ├── lua.vcxproj ├── lua.vcxproj.filters ├── scintillua.vcxproj └── scintillua.vcxproj.filters └── src ├── AboutDialog.cpp ├── AboutDialog.h ├── Config.cpp ├── Config.h ├── Hyperlinks.cpp ├── Hyperlinks.h ├── LanguageDialog.cpp ├── LanguageDialog.h ├── Main.cpp ├── NotepadPPGateway.h ├── Notepad_plus_msgs.h ├── PluginDefinition.h ├── PluginInterface.h ├── Scintilla.h ├── ScintillaGateway.h ├── Utilities.cpp ├── Utilities.h ├── Version.h ├── Version.rc ├── menuCmdID.h ├── resource.h └── resource.rc /README.md: -------------------------------------------------------------------------------- 1 | # Scintillua++ 2 | Notepad++ plugin for supporting [Scintillua's](https://foicica.com/scintillua/) LPeg lexers. This adds nearly 70 new languages to Notepad++. 3 | 4 | **Note:** This is still in early development. This is not meant to replace or replicate current Notepad++ behavior. This does not function as a normal "external lexer" as most other do, such as being configurable through the Style Configurator. 5 | 6 | ## Installation 7 | Download a release from the [Release](https://github.com/dail8859/ScintilluaPlusPlus/releases) page. Extract the zip file then: 8 | 9 | 1. Copy the `Scintillua++.dll` (or `Scintillua++_64.dll` for the 64bit version) to Notepad++'s plugin directory 10 | 1. Copy the `Scintillua++` directory into Notepad++'s plugin config directory - most likely located under `%APPDATA%` 11 | 12 | ## Usage 13 | This auto detects files based on file names or file extensions. By default this will only parse files that Notepad++ does not recognize. Setting the `override` flag to `true` in the settings file will parse files even if Notepad++ already supports the file type. 14 | 15 | This comes with a default theme that is very similar to Notepad++'s default theme. You are also able to create your own as long as they are located in the `themes` directory and selected in the settings. 16 | 17 | You can also create your own custom lexers using the [LPeg](http://www.inf.puc-rio.br/~roberto/lpeg/) Lua library. 18 | 19 | ## Development 20 | The code has been developed using MSVC 2015. Building the code will generate the DLL which can be used by Notepad++. For convenience, MSVC automatically copies the DLL and files into Notepad++'s directories. 21 | 22 | ## License 23 | This code is released under the [GNU General Public License version 2](http://www.gnu.org/licenses/gpl-2.0.txt). 24 | 25 | Other parts of this are covered under their respective licenses. 26 | -------------------------------------------------------------------------------- /ext/lpeg/lpcap.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lpcap.h,v 1.3 2016/09/13 17:45:58 roberto Exp $ 3 | */ 4 | 5 | #if !defined(lpcap_h) 6 | #define lpcap_h 7 | 8 | 9 | #include "lptypes.h" 10 | 11 | 12 | /* kinds of captures */ 13 | typedef enum CapKind { 14 | Cclose, /* not used in trees */ 15 | Cposition, 16 | Cconst, /* ktable[key] is Lua constant */ 17 | Cbackref, /* ktable[key] is "name" of group to get capture */ 18 | Carg, /* 'key' is arg's number */ 19 | Csimple, /* next node is pattern */ 20 | Ctable, /* next node is pattern */ 21 | Cfunction, /* ktable[key] is function; next node is pattern */ 22 | Cquery, /* ktable[key] is table; next node is pattern */ 23 | Cstring, /* ktable[key] is string; next node is pattern */ 24 | Cnum, /* numbered capture; 'key' is number of value to return */ 25 | Csubst, /* substitution capture; next node is pattern */ 26 | Cfold, /* ktable[key] is function; next node is pattern */ 27 | Cruntime, /* not used in trees (is uses another type for tree) */ 28 | Cgroup /* ktable[key] is group's "name" */ 29 | } CapKind; 30 | 31 | 32 | typedef struct Capture { 33 | const char *s; /* subject position */ 34 | unsigned short idx; /* extra info (group name, arg index, etc.) */ 35 | byte kind; /* kind of capture */ 36 | byte siz; /* size of full capture + 1 (0 = not a full capture) */ 37 | } Capture; 38 | 39 | 40 | typedef struct CapState { 41 | Capture *cap; /* current capture */ 42 | Capture *ocap; /* (original) capture list */ 43 | lua_State *L; 44 | int ptop; /* index of last argument to 'match' */ 45 | const char *s; /* original string */ 46 | int valuecached; /* value stored in cache slot */ 47 | } CapState; 48 | 49 | 50 | int runtimecap (CapState *cs, Capture *close, const char *s, int *rem); 51 | int getcaptures (lua_State *L, const char *s, const char *r, int ptop); 52 | int finddyncap (Capture *cap, Capture *last); 53 | 54 | #endif 55 | 56 | 57 | -------------------------------------------------------------------------------- /ext/lpeg/lpcode.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lpcode.h,v 1.8 2016/09/15 17:46:13 roberto Exp $ 3 | */ 4 | 5 | #if !defined(lpcode_h) 6 | #define lpcode_h 7 | 8 | #include "lua.h" 9 | 10 | #include "lptypes.h" 11 | #include "lptree.h" 12 | #include "lpvm.h" 13 | 14 | int tocharset (TTree *tree, Charset *cs); 15 | int checkaux (TTree *tree, int pred); 16 | int fixedlen (TTree *tree); 17 | int hascaptures (TTree *tree); 18 | int lp_gc (lua_State *L); 19 | Instruction *compile (lua_State *L, Pattern *p); 20 | void realloccode (lua_State *L, Pattern *p, int nsize); 21 | int sizei (const Instruction *i); 22 | 23 | 24 | #define PEnullable 0 25 | #define PEnofail 1 26 | 27 | /* 28 | ** nofail(t) implies that 't' cannot fail with any input 29 | */ 30 | #define nofail(t) checkaux(t, PEnofail) 31 | 32 | /* 33 | ** (not nullable(t)) implies 't' cannot match without consuming 34 | ** something 35 | */ 36 | #define nullable(t) checkaux(t, PEnullable) 37 | 38 | 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /ext/lpeg/lpeg-128.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/lpeg/lpeg-128.gif -------------------------------------------------------------------------------- /ext/lpeg/lpprint.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lpprint.h,v 1.2 2015/06/12 18:18:08 roberto Exp $ 3 | */ 4 | 5 | 6 | #if !defined(lpprint_h) 7 | #define lpprint_h 8 | 9 | 10 | #include "lptree.h" 11 | #include "lpvm.h" 12 | 13 | 14 | #if defined(LPEG_DEBUG) 15 | 16 | void printpatt (Instruction *p, int n); 17 | void printtree (TTree *tree, int ident); 18 | void printktable (lua_State *L, int idx); 19 | void printcharset (const byte *st); 20 | void printcaplist (Capture *cap, Capture *limit); 21 | void printinst (const Instruction *op, const Instruction *p); 22 | 23 | #else 24 | 25 | #define printktable(L,idx) \ 26 | luaL_error(L, "function only implemented in debug mode") 27 | #define printtree(tree,i) \ 28 | luaL_error(L, "function only implemented in debug mode") 29 | #define printpatt(p,n) \ 30 | luaL_error(L, "function only implemented in debug mode") 31 | 32 | #endif 33 | 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /ext/lpeg/lpvm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lpvm.h,v 1.3 2014/02/21 13:06:41 roberto Exp $ 3 | */ 4 | 5 | #if !defined(lpvm_h) 6 | #define lpvm_h 7 | 8 | #include "lpcap.h" 9 | 10 | 11 | /* Virtual Machine's instructions */ 12 | typedef enum Opcode { 13 | IAny, /* if no char, fail */ 14 | IChar, /* if char != aux, fail */ 15 | ISet, /* if char not in buff, fail */ 16 | ITestAny, /* in no char, jump to 'offset' */ 17 | ITestChar, /* if char != aux, jump to 'offset' */ 18 | ITestSet, /* if char not in buff, jump to 'offset' */ 19 | ISpan, /* read a span of chars in buff */ 20 | IBehind, /* walk back 'aux' characters (fail if not possible) */ 21 | IRet, /* return from a rule */ 22 | IEnd, /* end of pattern */ 23 | IChoice, /* stack a choice; next fail will jump to 'offset' */ 24 | IJmp, /* jump to 'offset' */ 25 | ICall, /* call rule at 'offset' */ 26 | IOpenCall, /* call rule number 'key' (must be closed to a ICall) */ 27 | ICommit, /* pop choice and jump to 'offset' */ 28 | IPartialCommit, /* update top choice to current position and jump */ 29 | IBackCommit, /* "fails" but jump to its own 'offset' */ 30 | IFailTwice, /* pop one choice and then fail */ 31 | IFail, /* go back to saved state on choice and jump to saved offset */ 32 | IGiveup, /* internal use */ 33 | IFullCapture, /* complete capture of last 'off' chars */ 34 | IOpenCapture, /* start a capture */ 35 | ICloseCapture, 36 | ICloseRunTime 37 | } Opcode; 38 | 39 | 40 | 41 | typedef union Instruction { 42 | struct Inst { 43 | byte code; 44 | byte aux; 45 | short key; 46 | } i; 47 | int offset; 48 | byte buff[1]; 49 | } Instruction; 50 | 51 | 52 | void printpatt (Instruction *p, int n); 53 | const char *match (lua_State *L, const char *o, const char *s, const char *e, 54 | Instruction *op, Capture *capture, int ptop); 55 | 56 | 57 | #endif 58 | 59 | -------------------------------------------------------------------------------- /ext/lpeg/makefile: -------------------------------------------------------------------------------- 1 | LIBNAME = lpeg 2 | LUADIR = ../lua/ 3 | 4 | COPT = -O2 5 | # COPT = -DLPEG_DEBUG -g 6 | 7 | CWARNS = -Wall -Wextra -pedantic \ 8 | -Waggregate-return \ 9 | -Wcast-align \ 10 | -Wcast-qual \ 11 | -Wdisabled-optimization \ 12 | -Wpointer-arith \ 13 | -Wshadow \ 14 | -Wsign-compare \ 15 | -Wundef \ 16 | -Wwrite-strings \ 17 | -Wbad-function-cast \ 18 | -Wdeclaration-after-statement \ 19 | -Wmissing-prototypes \ 20 | -Wnested-externs \ 21 | -Wstrict-prototypes \ 22 | # -Wunreachable-code \ 23 | 24 | 25 | CFLAGS = $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC 26 | CC = gcc 27 | 28 | FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o 29 | 30 | # For Linux 31 | linux: 32 | make lpeg.so "DLLFLAGS = -shared -fPIC" 33 | 34 | # For Mac OS 35 | macosx: 36 | make lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup" 37 | 38 | lpeg.so: $(FILES) 39 | env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so 40 | 41 | $(FILES): makefile 42 | 43 | test: test.lua re.lua lpeg.so 44 | ./test.lua 45 | 46 | clean: 47 | rm -f $(FILES) lpeg.so 48 | 49 | 50 | lpcap.o: lpcap.c lpcap.h lptypes.h 51 | lpcode.o: lpcode.c lptypes.h lpcode.h lptree.h lpvm.h lpcap.h 52 | lpprint.o: lpprint.c lptypes.h lpprint.h lptree.h lpvm.h lpcap.h 53 | lptree.o: lptree.c lptypes.h lpcap.h lpcode.h lptree.h lpvm.h lpprint.h 54 | lpvm.o: lpvm.c lpcap.h lptypes.h lpvm.h lpprint.h lptree.h 55 | 56 | -------------------------------------------------------------------------------- /ext/lua/README: -------------------------------------------------------------------------------- 1 | 2 | This is Lua 5.3.4, released on 12 Jan 2017. 3 | 4 | For installation instructions, license details, and 5 | further information about Lua, see doc/readme.html. 6 | 7 | -------------------------------------------------------------------------------- /ext/lua/doc/index.css: -------------------------------------------------------------------------------- 1 | ul { 2 | list-style-type: none ; 3 | } 4 | 5 | ul.contents { 6 | padding: 0 ; 7 | } 8 | 9 | table { 10 | border: none ; 11 | border-spacing: 0 ; 12 | border-collapse: collapse ; 13 | } 14 | 15 | td { 16 | vertical-align: top ; 17 | padding: 0 ; 18 | text-align: left ; 19 | line-height: 1.25 ; 20 | width: 15% ; 21 | } 22 | -------------------------------------------------------------------------------- /ext/lua/doc/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/lua/doc/logo.gif -------------------------------------------------------------------------------- /ext/lua/doc/manual.css: -------------------------------------------------------------------------------- 1 | h3 code { 2 | font-family: inherit ; 3 | font-size: inherit ; 4 | } 5 | 6 | pre, code { 7 | font-size: 12pt ; 8 | } 9 | 10 | span.apii { 11 | color: gray ; 12 | float: right ; 13 | font-family: inherit ; 14 | font-style: normal ; 15 | font-size: small ; 16 | } 17 | 18 | h2:before { 19 | content: "" ; 20 | padding-right: 0em ; 21 | } 22 | -------------------------------------------------------------------------------- /ext/lua/doc/osi-certified-72x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/lua/doc/osi-certified-72x60.png -------------------------------------------------------------------------------- /ext/lua/src/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.9 2015/03/06 19:49:50 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "llimits.h" 12 | #include "lstate.h" 13 | 14 | #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ 15 | "stack overflow");} 16 | 17 | #define adjustresults(L,nres) \ 18 | { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } 19 | 20 | #define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \ 21 | "not enough elements in the stack") 22 | 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /ext/lua/src/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldebug.h,v 2.14 2015/05/22 17:45:56 roberto Exp $ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | 21 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, 22 | const char *opname); 23 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, 24 | const TValue *p2); 25 | LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1, 26 | const TValue *p2, 27 | const char *msg); 28 | LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1, 29 | const TValue *p2); 30 | LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1, 31 | const TValue *p2); 32 | LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...); 33 | LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg, 34 | TString *src, int line); 35 | LUAI_FUNC l_noret luaG_errormsg (lua_State *L); 36 | LUAI_FUNC void luaG_traceexec (lua_State *L); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /ext/lua/src/lfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lfunc.h,v 2.15 2015/01/13 15:49:11 roberto Exp $ 3 | ** Auxiliary functions to manipulate prototypes and closures 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lfunc_h 8 | #define lfunc_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ 15 | cast(int, sizeof(TValue)*((n)-1))) 16 | 17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ 18 | cast(int, sizeof(TValue *)*((n)-1))) 19 | 20 | 21 | /* test whether thread is in 'twups' list */ 22 | #define isintwups(L) (L->twups != L) 23 | 24 | 25 | /* 26 | ** maximum number of upvalues in a closure (both C and Lua). (Value 27 | ** must fit in a VM register.) 28 | */ 29 | #define MAXUPVAL 255 30 | 31 | 32 | /* 33 | ** Upvalues for Lua closures 34 | */ 35 | struct UpVal { 36 | TValue *v; /* points to stack or to its own value */ 37 | lu_mem refcount; /* reference counter */ 38 | union { 39 | struct { /* (when open) */ 40 | UpVal *next; /* linked list */ 41 | int touched; /* mark to avoid cycles with dead threads */ 42 | } open; 43 | TValue value; /* the value (when closed) */ 44 | } u; 45 | }; 46 | 47 | #define upisopen(up) ((up)->v != &(up)->u.value) 48 | 49 | 50 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); 51 | LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); 52 | LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); 53 | LUAI_FUNC void luaF_initupvals (lua_State *L, LClosure *cl); 54 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); 55 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); 56 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); 57 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, 58 | int pc); 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /ext/lua/src/linit.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: linit.c,v 1.39 2016/12/04 20:17:24 roberto Exp $ 3 | ** Initialization of libraries for lua.c and other clients 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #define linit_c 9 | #define LUA_LIB 10 | 11 | /* 12 | ** If you embed Lua in your program and need to open the standard 13 | ** libraries, call luaL_openlibs in your program. If you need a 14 | ** different set of libraries, copy this file to your project and edit 15 | ** it to suit your needs. 16 | ** 17 | ** You can also *preload* libraries, so that a later 'require' can 18 | ** open the library, which is already linked to the application. 19 | ** For that, do the following code: 20 | ** 21 | ** luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_PRELOAD_TABLE); 22 | ** lua_pushcfunction(L, luaopen_modname); 23 | ** lua_setfield(L, -2, modname); 24 | ** lua_pop(L, 1); // remove PRELOAD table 25 | */ 26 | 27 | #include "lprefix.h" 28 | 29 | 30 | #include 31 | 32 | #include "lua.h" 33 | 34 | #include "lualib.h" 35 | #include "lauxlib.h" 36 | 37 | 38 | /* 39 | ** these libs are loaded by lua.c and are readily available to any Lua 40 | ** program 41 | */ 42 | static const luaL_Reg loadedlibs[] = { 43 | {"_G", luaopen_base}, 44 | {LUA_LOADLIBNAME, luaopen_package}, 45 | {LUA_COLIBNAME, luaopen_coroutine}, 46 | {LUA_TABLIBNAME, luaopen_table}, 47 | {LUA_IOLIBNAME, luaopen_io}, 48 | {LUA_OSLIBNAME, luaopen_os}, 49 | {LUA_STRLIBNAME, luaopen_string}, 50 | {LUA_MATHLIBNAME, luaopen_math}, 51 | {LUA_UTF8LIBNAME, luaopen_utf8}, 52 | {LUA_DBLIBNAME, luaopen_debug}, 53 | #if defined(LUA_COMPAT_BITLIB) 54 | {LUA_BITLIBNAME, luaopen_bit32}, 55 | #endif 56 | {NULL, NULL} 57 | }; 58 | 59 | 60 | LUALIB_API void luaL_openlibs (lua_State *L) { 61 | const luaL_Reg *lib; 62 | /* "require" functions from 'loadedlibs' and set results to global table */ 63 | for (lib = loadedlibs; lib->func; lib++) { 64 | luaL_requiref(L, lib->name, lib->func, 1); 65 | lua_pop(L, 1); /* remove lib */ 66 | } 67 | } 68 | 69 | -------------------------------------------------------------------------------- /ext/lua/src/lprefix.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lprefix.h,v 1.2 2014/12/29 16:54:13 roberto Exp $ 3 | ** Definitions for Lua code that must come before any other header file 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lprefix_h 8 | #define lprefix_h 9 | 10 | 11 | /* 12 | ** Allows POSIX/XSI stuff 13 | */ 14 | #if !defined(LUA_USE_C89) /* { */ 15 | 16 | #if !defined(_XOPEN_SOURCE) 17 | #define _XOPEN_SOURCE 600 18 | #elif _XOPEN_SOURCE == 0 19 | #undef _XOPEN_SOURCE /* use -D_XOPEN_SOURCE=0 to undefine it */ 20 | #endif 21 | 22 | /* 23 | ** Allows manipulation of large files in gcc and some other compilers 24 | */ 25 | #if !defined(LUA_32BITS) && !defined(_FILE_OFFSET_BITS) 26 | #define _LARGEFILE_SOURCE 1 27 | #define _FILE_OFFSET_BITS 64 28 | #endif 29 | 30 | #endif /* } */ 31 | 32 | 33 | /* 34 | ** Windows stuff 35 | */ 36 | #if defined(_WIN32) /* { */ 37 | 38 | #if !defined(_CRT_SECURE_NO_WARNINGS) 39 | #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ISO C functions */ 40 | #endif 41 | 42 | #endif /* } */ 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /ext/lua/src/lstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lstring.h,v 1.61 2015/11/03 15:36:01 roberto Exp $ 3 | ** String table (keep all strings handled by Lua) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lstring_h 8 | #define lstring_h 9 | 10 | #include "lgc.h" 11 | #include "lobject.h" 12 | #include "lstate.h" 13 | 14 | 15 | #define sizelstring(l) (sizeof(union UTString) + ((l) + 1) * sizeof(char)) 16 | 17 | #define sizeludata(l) (sizeof(union UUdata) + (l)) 18 | #define sizeudata(u) sizeludata((u)->len) 19 | 20 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 21 | (sizeof(s)/sizeof(char))-1)) 22 | 23 | 24 | /* 25 | ** test whether a string is a reserved word 26 | */ 27 | #define isreserved(s) ((s)->tt == LUA_TSHRSTR && (s)->extra > 0) 28 | 29 | 30 | /* 31 | ** equality for short strings, which are always internalized 32 | */ 33 | #define eqshrstr(a,b) check_exp((a)->tt == LUA_TSHRSTR, (a) == (b)) 34 | 35 | 36 | LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed); 37 | LUAI_FUNC unsigned int luaS_hashlongstr (TString *ts); 38 | LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b); 39 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 40 | LUAI_FUNC void luaS_clearcache (global_State *g); 41 | LUAI_FUNC void luaS_init (lua_State *L); 42 | LUAI_FUNC void luaS_remove (lua_State *L, TString *ts); 43 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s); 44 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 45 | LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); 46 | LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l); 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /ext/lua/src/ltm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.h,v 2.22 2016/02/26 19:20:15 roberto Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltm_h 8 | #define ltm_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | /* 15 | * WARNING: if you change the order of this enumeration, 16 | * grep "ORDER TM" and "ORDER OP" 17 | */ 18 | typedef enum { 19 | TM_INDEX, 20 | TM_NEWINDEX, 21 | TM_GC, 22 | TM_MODE, 23 | TM_LEN, 24 | TM_EQ, /* last tag method with fast access */ 25 | TM_ADD, 26 | TM_SUB, 27 | TM_MUL, 28 | TM_MOD, 29 | TM_POW, 30 | TM_DIV, 31 | TM_IDIV, 32 | TM_BAND, 33 | TM_BOR, 34 | TM_BXOR, 35 | TM_SHL, 36 | TM_SHR, 37 | TM_UNM, 38 | TM_BNOT, 39 | TM_LT, 40 | TM_LE, 41 | TM_CONCAT, 42 | TM_CALL, 43 | TM_N /* number of elements in the enum */ 44 | } TMS; 45 | 46 | 47 | 48 | #define gfasttm(g,et,e) ((et) == NULL ? NULL : \ 49 | ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 50 | 51 | #define fasttm(l,et,e) gfasttm(G(l), et, e) 52 | 53 | #define ttypename(x) luaT_typenames_[(x) + 1] 54 | 55 | LUAI_DDEC const char *const luaT_typenames_[LUA_TOTALTAGS]; 56 | 57 | 58 | LUAI_FUNC const char *luaT_objtypename (lua_State *L, const TValue *o); 59 | 60 | LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); 61 | LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, 62 | TMS event); 63 | LUAI_FUNC void luaT_init (lua_State *L); 64 | 65 | LUAI_FUNC void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1, 66 | const TValue *p2, TValue *p3, int hasres); 67 | LUAI_FUNC int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2, 68 | StkId res, TMS event); 69 | LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, 70 | StkId res, TMS event); 71 | LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1, 72 | const TValue *p2, TMS event); 73 | 74 | 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /ext/lua/src/lua.hpp: -------------------------------------------------------------------------------- 1 | // lua.hpp 2 | // Lua header files for C++ 3 | // <> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /ext/lua/src/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.45 2017/01/12 17:14:26 roberto Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | /* version suffix for environment variable names */ 15 | #define LUA_VERSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR 16 | 17 | 18 | LUAMOD_API int (luaopen_base) (lua_State *L); 19 | 20 | #define LUA_COLIBNAME "coroutine" 21 | LUAMOD_API int (luaopen_coroutine) (lua_State *L); 22 | 23 | #define LUA_TABLIBNAME "table" 24 | LUAMOD_API int (luaopen_table) (lua_State *L); 25 | 26 | #define LUA_IOLIBNAME "io" 27 | LUAMOD_API int (luaopen_io) (lua_State *L); 28 | 29 | #define LUA_OSLIBNAME "os" 30 | LUAMOD_API int (luaopen_os) (lua_State *L); 31 | 32 | #define LUA_STRLIBNAME "string" 33 | LUAMOD_API int (luaopen_string) (lua_State *L); 34 | 35 | #define LUA_UTF8LIBNAME "utf8" 36 | LUAMOD_API int (luaopen_utf8) (lua_State *L); 37 | 38 | #define LUA_BITLIBNAME "bit32" 39 | LUAMOD_API int (luaopen_bit32) (lua_State *L); 40 | 41 | #define LUA_MATHLIBNAME "math" 42 | LUAMOD_API int (luaopen_math) (lua_State *L); 43 | 44 | #define LUA_DBLIBNAME "debug" 45 | LUAMOD_API int (luaopen_debug) (lua_State *L); 46 | 47 | #define LUA_LOADLIBNAME "package" 48 | LUAMOD_API int (luaopen_package) (lua_State *L); 49 | 50 | 51 | /* open all previous libraries */ 52 | LUALIB_API void (luaL_openlibs) (lua_State *L); 53 | 54 | 55 | 56 | #if !defined(lua_assert) 57 | #define lua_assert(x) ((void)0) 58 | #endif 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /ext/lua/src/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lundump.h,v 1.45 2015/09/08 15:41:05 roberto Exp $ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "llimits.h" 11 | #include "lobject.h" 12 | #include "lzio.h" 13 | 14 | 15 | /* data to catch conversion errors */ 16 | #define LUAC_DATA "\x19\x93\r\n\x1a\n" 17 | 18 | #define LUAC_INT 0x5678 19 | #define LUAC_NUM cast_num(370.5) 20 | 21 | #define MYINT(s) (s[0]-'0') 22 | #define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)) 23 | #define LUAC_FORMAT 0 /* this is the official format */ 24 | 25 | /* load one chunk; from lundump.c */ 26 | LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name); 27 | 28 | /* dump one chunk; from ldump.c */ 29 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, 30 | void* data, int strip); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /ext/lua/src/lzio.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.c,v 1.37 2015/09/08 15:41:05 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #define lzio_c 8 | #define LUA_CORE 9 | 10 | #include "lprefix.h" 11 | 12 | 13 | #include 14 | 15 | #include "lua.h" 16 | 17 | #include "llimits.h" 18 | #include "lmem.h" 19 | #include "lstate.h" 20 | #include "lzio.h" 21 | 22 | 23 | int luaZ_fill (ZIO *z) { 24 | size_t size; 25 | lua_State *L = z->L; 26 | const char *buff; 27 | lua_unlock(L); 28 | buff = z->reader(L, z->data, &size); 29 | lua_lock(L); 30 | if (buff == NULL || size == 0) 31 | return EOZ; 32 | z->n = size - 1; /* discount char being returned */ 33 | z->p = buff; 34 | return cast_uchar(*(z->p++)); 35 | } 36 | 37 | 38 | void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) { 39 | z->L = L; 40 | z->reader = reader; 41 | z->data = data; 42 | z->n = 0; 43 | z->p = NULL; 44 | } 45 | 46 | 47 | /* --------------------------------------------------------------- read --- */ 48 | size_t luaZ_read (ZIO *z, void *b, size_t n) { 49 | while (n) { 50 | size_t m; 51 | if (z->n == 0) { /* no bytes in buffer? */ 52 | if (luaZ_fill(z) == EOZ) /* try to read more */ 53 | return n; /* no more input; return number of missing bytes */ 54 | else { 55 | z->n++; /* luaZ_fill consumed first byte; put it back */ 56 | z->p--; 57 | } 58 | } 59 | m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ 60 | memcpy(b, z->p, m); 61 | z->n -= m; 62 | z->p += m; 63 | b = (char *)b + m; 64 | n -= m; 65 | } 66 | return 0; 67 | } 68 | 69 | -------------------------------------------------------------------------------- /ext/lua/src/lzio.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.h,v 1.31 2015/09/08 15:41:05 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lzio_h 9 | #define lzio_h 10 | 11 | #include "lua.h" 12 | 13 | #include "lmem.h" 14 | 15 | 16 | #define EOZ (-1) /* end of stream */ 17 | 18 | typedef struct Zio ZIO; 19 | 20 | #define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z)) 21 | 22 | 23 | typedef struct Mbuffer { 24 | char *buffer; 25 | size_t n; 26 | size_t buffsize; 27 | } Mbuffer; 28 | 29 | #define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) 30 | 31 | #define luaZ_buffer(buff) ((buff)->buffer) 32 | #define luaZ_sizebuffer(buff) ((buff)->buffsize) 33 | #define luaZ_bufflen(buff) ((buff)->n) 34 | 35 | #define luaZ_buffremove(buff,i) ((buff)->n -= (i)) 36 | #define luaZ_resetbuffer(buff) ((buff)->n = 0) 37 | 38 | 39 | #define luaZ_resizebuffer(L, buff, size) \ 40 | ((buff)->buffer = luaM_reallocvchar(L, (buff)->buffer, \ 41 | (buff)->buffsize, size), \ 42 | (buff)->buffsize = size) 43 | 44 | #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) 45 | 46 | 47 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, 48 | void *data); 49 | LUAI_FUNC size_t luaZ_read (ZIO* z, void *b, size_t n); /* read next n bytes */ 50 | 51 | 52 | 53 | /* --------- Private Part ------------------ */ 54 | 55 | struct Zio { 56 | size_t n; /* bytes still unread */ 57 | const char *p; /* current position in buffer */ 58 | lua_Reader reader; /* reader function */ 59 | void *data; /* additional data */ 60 | lua_State *L; /* Lua state (for reader) */ 61 | }; 62 | 63 | 64 | LUAI_FUNC int luaZ_fill (ZIO *z); 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /ext/scintilla/CONTRIBUTING: -------------------------------------------------------------------------------- 1 | Fixes should be posted to the Bug Tracker 2 | http://sourceforge.net/p/scintilla/bugs/ 3 | 4 | Features should be posted to the Feature Request Tracker 5 | http://sourceforge.net/p/scintilla/feature-requests/ 6 | 7 | Either send unified diffs (or patch files) or zip archives with whole files. 8 | Mercurial patch files are best as they include author information and commit 9 | messages. 10 | 11 | Questions should go to the scintilla-interest mailing list 12 | https://groups.google.com/forum/#!forum/scintilla-interest 13 | 14 | Code should follow the guidelines at 15 | http://www.scintilla.org/SciCoding.html 16 | 17 | Do not use SourceForge's Merge Request mechanism or message sending 18 | feature as no one is monitoring these. 19 | The neilh @ scintilla.org account receives much spam and is only checked 20 | occasionally. Almost all Scintilla mail should go to the mailing list. -------------------------------------------------------------------------------- /ext/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. -------------------------------------------------------------------------------- /ext/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) positionSubViews; 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 | -------------------------------------------------------------------------------- /ext/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 | typedef NS_OPTIONS(NSUInteger, 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 | typedef NS_ENUM(NSInteger, 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 | -------------------------------------------------------------------------------- /ext/scintilla/cocoa/ScintillaFramework/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/cocoa/ScintillaFramework/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /ext/scintilla/cocoa/ScintillaFramework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 3.7.3 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 3.7.3 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ext/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ext/scintilla/cocoa/ScintillaFramework/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Scintilla { 2 | umbrella header "ScintillaView.h" 3 | module InfoBar { 4 | header "InfoBar.h" 5 | } 6 | // ILexer.h is not included as Swift doesn't yet interoperate with C++ 7 | exclude header "ILexer.h" 8 | export * 9 | module * { export * } 10 | } 11 | -------------------------------------------------------------------------------- /ext/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 "Scintilla/ScintillaView.h" 13 | #import "Scintilla/InfoBar.h" 14 | 15 | @interface AppController : NSObject { 16 | IBOutlet NSBox *mEditHost; 17 | ScintillaView* mEditor; 18 | ScintillaView* sciExtra; // For testing Scintilla tear-down 19 | NSString* sql; 20 | } 21 | 22 | - (void) awakeFromNib; 23 | - (void) setupEditor; 24 | - (IBAction) searchText: (id) sender; 25 | - (IBAction) addRemoveExtra: (id) sender; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /ext/scintilla/cocoa/ScintillaTest/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/cocoa/ScintillaTest/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /ext/scintilla/cocoa/ScintillaTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_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 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/scintilla/cocoa/checkbuildosx.sh: -------------------------------------------------------------------------------- 1 | # Script to build Scintilla for OS X with most supported build files. 2 | # Current directory should be scintilla/cocoa before running. 3 | 4 | cd ../.. 5 | 6 | # ************************************************************ 7 | # Target 1: Unit tests 8 | 9 | echo Unit tests 10 | 11 | cd scintilla/test/unit 12 | make clean 13 | make test 14 | cd ../../.. 15 | 16 | # ************************************************************ 17 | # Target 2: build framework and test app with Xcode targeting OS X 10.n with n from 9 to 5 18 | # Only SDK versions that are installed will be built 19 | # Clean both then build both -- if perform clean in ScintillaTest, also cleans ScintillaFramework 20 | # which can cause double build 21 | 22 | echo Building Cocoa-native ScintillaFramework and ScintillaTest 23 | for sdk in macosx10.9 macosx10.8 macosx10.7 macosx10.6 macosx10.5 24 | do 25 | xcodebuild -showsdks | grep $sdk 26 | if [ "$(xcodebuild -showsdks | grep $sdk)" != "" ] 27 | then 28 | echo Building with $sdk 29 | cd scintilla/cocoa/ScintillaFramework 30 | xcodebuild clean 31 | cd ../ScintillaTest 32 | xcodebuild clean 33 | cd ../ScintillaFramework 34 | xcodebuild -sdk $sdk 35 | cd ../ScintillaTest 36 | xcodebuild -sdk $sdk 37 | cd ../../.. 38 | else 39 | echo Warning $sdk not available 40 | fi 41 | done 42 | 43 | # ************************************************************ 44 | # Target 3: Qt builds 45 | # Requires Qt development libraries and qmake to be installed 46 | 47 | echo Building Qt and PySide 48 | 49 | cd scintilla/qt 50 | cd ScintillaEditBase 51 | qmake -spec macx-xcode 52 | xcodebuild clean 53 | xcodebuild 54 | cd .. 55 | 56 | cd ScintillaEdit 57 | python WidgetGen.py 58 | qmake -spec macx-xcode 59 | xcodebuild clean 60 | xcodebuild 61 | cd .. 62 | 63 | cd ScintillaEditPy 64 | python sepbuild.py 65 | cd .. 66 | cd ../.. 67 | -------------------------------------------------------------------------------- /ext/scintilla/cocoa/res/info_bar_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/cocoa/res/info_bar_bg.png -------------------------------------------------------------------------------- /ext/scintilla/cocoa/res/info_bar_bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/cocoa/res/info_bar_bg@2x.png -------------------------------------------------------------------------------- /ext/scintilla/cocoa/res/mac_cursor_busy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/cocoa/res/mac_cursor_busy.png -------------------------------------------------------------------------------- /ext/scintilla/cocoa/res/mac_cursor_busy@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/cocoa/res/mac_cursor_busy@2x.png -------------------------------------------------------------------------------- /ext/scintilla/cocoa/res/mac_cursor_flipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/cocoa/res/mac_cursor_flipped.png -------------------------------------------------------------------------------- /ext/scintilla/cocoa/res/mac_cursor_flipped@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/cocoa/res/mac_cursor_flipped@2x.png -------------------------------------------------------------------------------- /ext/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 *.tlog >NUL: 2 | -------------------------------------------------------------------------------- /ext/scintilla/doc/Icons.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Scintilla icons 12 | 13 | 14 | 15 | 16 | 17 | 20 | 24 | 25 |
18 | Scintilla icon 19 | 21 | Scintilla 22 | and SciTE 23 |
26 |

27 | Icons 28 |

29 |

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

32 |

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

35 |

36 | zip format (70K) 37 |

38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |
For autocompletion listsFor margin markers
12x1216x1624x2432x32
56 | 57 | 58 | -------------------------------------------------------------------------------- /ext/scintilla/doc/Indicators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/doc/Indicators.png -------------------------------------------------------------------------------- /ext/scintilla/doc/Markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/doc/Markers.png -------------------------------------------------------------------------------- /ext/scintilla/doc/SciBreak.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/doc/SciBreak.jpg -------------------------------------------------------------------------------- /ext/scintilla/doc/SciRest.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/doc/SciRest.jpg -------------------------------------------------------------------------------- /ext/scintilla/doc/SciTEIco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/doc/SciTEIco.png -------------------------------------------------------------------------------- /ext/scintilla/doc/SciWord.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/doc/SciWord.jpg -------------------------------------------------------------------------------- /ext/scintilla/doc/annotations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/doc/annotations.png -------------------------------------------------------------------------------- /ext/scintilla/doc/styledmargin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/doc/styledmargin.png -------------------------------------------------------------------------------- /ext/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,OBJECT (scintilla-marshal.list:1) */ 10 | extern void scintilla_marshal_VOID__INT_OBJECT (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_OBJECT scintilla_marshal_VOID__INT_OBJECT 17 | 18 | /* NONE:INT,BOXED (scintilla-marshal.list:2) */ 19 | extern void scintilla_marshal_VOID__INT_BOXED (GClosure *closure, 20 | GValue *return_value, 21 | guint n_param_values, 22 | const GValue *param_values, 23 | gpointer invocation_hint, 24 | gpointer marshal_data); 25 | #define scintilla_marshal_NONE__INT_BOXED scintilla_marshal_VOID__INT_BOXED 26 | 27 | G_END_DECLS 28 | 29 | #endif /* __scintilla_marshal_MARSHAL_H__ */ 30 | 31 | -------------------------------------------------------------------------------- /ext/scintilla/gtk/scintilla-marshal.list: -------------------------------------------------------------------------------- 1 | NONE:INT,OBJECT 2 | NONE:INT,BOXED 3 | -------------------------------------------------------------------------------- /ext/scintilla/include/Sci_Position.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Sci_Position.h 3 | ** Define the Sci_Position type used in Scintilla's external interfaces. 4 | ** These need to be available to clients written in C so are not in a C++ namespace. 5 | **/ 6 | // Copyright 2015 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifndef SCI_POSITION_H 10 | #define SCI_POSITION_H 11 | 12 | // Basic signed type used throughout interface 13 | typedef int Sci_Position; 14 | 15 | // Unsigned variant used for ILexer::Lex and ILexer::Fold 16 | typedef unsigned int Sci_PositionU; 17 | 18 | // For Sci_CharacterRange which is defined as long to be compatible with Win32 CHARRANGE 19 | typedef long Sci_PositionCR; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /ext/scintilla/lexers/LexCSS.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/lexers/LexCSS.cxx -------------------------------------------------------------------------------- /ext/scintilla/lexers/LexErlang.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/lexers/LexErlang.cxx -------------------------------------------------------------------------------- /ext/scintilla/lexers/LexMMIXAL.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/lexers/LexMMIXAL.cxx -------------------------------------------------------------------------------- /ext/scintilla/lexers/LexMatlab.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintilla/lexers/LexMatlab.cxx -------------------------------------------------------------------------------- /ext/scintilla/lexers/LexNull.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file LexNull.cxx 3 | ** Lexer for no language. Used for plain text and unrecognized files. 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 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "ILexer.h" 16 | #include "Scintilla.h" 17 | #include "SciLexer.h" 18 | 19 | #include "WordList.h" 20 | #include "LexAccessor.h" 21 | #include "Accessor.h" 22 | #include "StyleContext.h" 23 | #include "CharacterSet.h" 24 | #include "LexerModule.h" 25 | 26 | #ifdef SCI_NAMESPACE 27 | using namespace Scintilla; 28 | #endif 29 | 30 | static void ColouriseNullDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], 31 | Accessor &styler) { 32 | // Null language means all style bytes are 0 so just mark the end - no need to fill in. 33 | if (length > 0) { 34 | styler.StartAt(startPos + length - 1); 35 | styler.StartSegment(startPos + length - 1); 36 | styler.ColourTo(startPos + length - 1, 0); 37 | } 38 | } 39 | 40 | LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null"); 41 | -------------------------------------------------------------------------------- /ext/scintilla/lexlib/Accessor.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Accessor.h 3 | ** Interfaces between Scintilla and lexers. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef ACCESSOR_H 9 | #define ACCESSOR_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | enum { wsSpace=1, wsTab=2, wsSpaceTab=4, wsInconsistent=8 }; 16 | 17 | class Accessor; 18 | class WordList; 19 | class PropSetSimple; 20 | 21 | typedef bool (*PFNIsCommentLeader)(Accessor &styler, Sci_Position pos, Sci_Position len); 22 | 23 | class Accessor : public LexAccessor { 24 | public: 25 | PropSetSimple *pprops; 26 | Accessor(IDocument *pAccess_, PropSetSimple *pprops_); 27 | int GetPropertyInt(const char *, int defaultValue=0) const; 28 | int IndentAmount(Sci_Position line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); 29 | }; 30 | 31 | #ifdef SCI_NAMESPACE 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /ext/scintilla/lexlib/CharacterCategory.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file CharacterCategory.h 3 | ** Returns the Unicode general category of a character. 4 | **/ 5 | // Copyright 2013 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef CHARACTERCATEGORY_H 9 | #define CHARACTERCATEGORY_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | enum CharacterCategory { 16 | ccLu, ccLl, ccLt, ccLm, ccLo, 17 | ccMn, ccMc, ccMe, 18 | ccNd, ccNl, ccNo, 19 | ccPc, ccPd, ccPs, ccPe, ccPi, ccPf, ccPo, 20 | ccSm, ccSc, ccSk, ccSo, 21 | ccZs, ccZl, ccZp, 22 | ccCc, ccCf, ccCs, ccCo, ccCn 23 | }; 24 | 25 | CharacterCategory CategoriseCharacter(int character); 26 | 27 | #ifdef SCI_NAMESPACE 28 | } 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /ext/scintilla/lexlib/CharacterSet.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file CharacterSet.cxx 3 | ** Simple case functions for ASCII. 4 | ** Lexer infrastructure. 5 | **/ 6 | // Copyright 1998-2010 by Neil Hodgson 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 | 15 | #include "CharacterSet.h" 16 | 17 | #ifdef SCI_NAMESPACE 18 | using namespace Scintilla; 19 | #endif 20 | 21 | #ifdef SCI_NAMESPACE 22 | namespace Scintilla { 23 | #endif 24 | 25 | int CompareCaseInsensitive(const char *a, const char *b) { 26 | while (*a && *b) { 27 | if (*a != *b) { 28 | char upperA = static_cast(MakeUpperCase(*a)); 29 | char upperB = static_cast(MakeUpperCase(*b)); 30 | if (upperA != upperB) 31 | return upperA - upperB; 32 | } 33 | a++; 34 | b++; 35 | } 36 | // Either *a or *b is nul 37 | return *a - *b; 38 | } 39 | 40 | int CompareNCaseInsensitive(const char *a, const char *b, size_t len) { 41 | while (*a && *b && len) { 42 | if (*a != *b) { 43 | char upperA = static_cast(MakeUpperCase(*a)); 44 | char upperB = static_cast(MakeUpperCase(*b)); 45 | if (upperA != upperB) 46 | return upperA - upperB; 47 | } 48 | a++; 49 | b++; 50 | len--; 51 | } 52 | if (len == 0) 53 | return 0; 54 | else 55 | // Either *a or *b is nul 56 | return *a - *b; 57 | } 58 | 59 | #ifdef SCI_NAMESPACE 60 | } 61 | #endif 62 | -------------------------------------------------------------------------------- /ext/scintilla/lexlib/LexerBase.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file LexerBase.h 3 | ** A simple lexer with no state. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef LEXERBASE_H 9 | #define LEXERBASE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | // A simple lexer with no state 16 | class LexerBase : public ILexer { 17 | protected: 18 | PropSetSimple props; 19 | enum {numWordLists=KEYWORDSET_MAX+1}; 20 | WordList *keyWordLists[numWordLists+1]; 21 | public: 22 | LexerBase(); 23 | virtual ~LexerBase(); 24 | void SCI_METHOD Release(); 25 | int SCI_METHOD Version() const; 26 | const char * SCI_METHOD PropertyNames(); 27 | int SCI_METHOD PropertyType(const char *name); 28 | const char * SCI_METHOD DescribeProperty(const char *name); 29 | Sci_Position SCI_METHOD PropertySet(const char *key, const char *val); 30 | const char * SCI_METHOD DescribeWordListSets(); 31 | Sci_Position SCI_METHOD WordListSet(int n, const char *wl); 32 | void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; 33 | void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; 34 | void * SCI_METHOD PrivateCall(int operation, void *pointer); 35 | }; 36 | 37 | #ifdef SCI_NAMESPACE 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /ext/scintilla/lexlib/LexerNoExceptions.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file LexerNoExceptions.h 3 | ** A simple lexer with no state. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef LEXERNOEXCEPTIONS_H 9 | #define LEXERNOEXCEPTIONS_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | // A simple lexer with no state 16 | class LexerNoExceptions : public LexerBase { 17 | public: 18 | // TODO Also need to prevent exceptions in constructor and destructor 19 | Sci_Position SCI_METHOD PropertySet(const char *key, const char *val); 20 | Sci_Position SCI_METHOD WordListSet(int n, const char *wl); 21 | void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess); 22 | void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *); 23 | 24 | virtual void Lexer(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess, Accessor &styler) = 0; 25 | virtual void Folder(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess, Accessor &styler) = 0; 26 | }; 27 | 28 | #ifdef SCI_NAMESPACE 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /ext/scintilla/lexlib/LexerSimple.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file LexerSimple.cxx 3 | ** A simple lexer with no state. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | 17 | #include "ILexer.h" 18 | #include "Scintilla.h" 19 | #include "SciLexer.h" 20 | 21 | #include "PropSetSimple.h" 22 | #include "WordList.h" 23 | #include "LexAccessor.h" 24 | #include "Accessor.h" 25 | #include "LexerModule.h" 26 | #include "LexerBase.h" 27 | #include "LexerSimple.h" 28 | 29 | #ifdef SCI_NAMESPACE 30 | using namespace Scintilla; 31 | #endif 32 | 33 | LexerSimple::LexerSimple(const LexerModule *module_) : module(module_) { 34 | for (int wl = 0; wl < module->GetNumWordLists(); wl++) { 35 | if (!wordLists.empty()) 36 | wordLists += "\n"; 37 | wordLists += module->GetWordListDescription(wl); 38 | } 39 | } 40 | 41 | const char * SCI_METHOD LexerSimple::DescribeWordListSets() { 42 | return wordLists.c_str(); 43 | } 44 | 45 | void SCI_METHOD LexerSimple::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) { 46 | Accessor astyler(pAccess, &props); 47 | module->Lex(startPos, lengthDoc, initStyle, keyWordLists, astyler); 48 | astyler.Flush(); 49 | } 50 | 51 | void SCI_METHOD LexerSimple::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) { 52 | if (props.GetInt("fold")) { 53 | Accessor astyler(pAccess, &props); 54 | module->Fold(startPos, lengthDoc, initStyle, keyWordLists, astyler); 55 | astyler.Flush(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /ext/scintilla/lexlib/LexerSimple.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file LexerSimple.h 3 | ** A simple lexer with no state. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef LEXERSIMPLE_H 9 | #define LEXERSIMPLE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | // A simple lexer with no state 16 | class LexerSimple : public LexerBase { 17 | const LexerModule *module; 18 | std::string wordLists; 19 | public: 20 | explicit LexerSimple(const LexerModule *module_); 21 | const char * SCI_METHOD DescribeWordListSets(); 22 | void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess); 23 | void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess); 24 | }; 25 | 26 | #ifdef SCI_NAMESPACE 27 | } 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /ext/scintilla/lexlib/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 { 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 | int GetExpanded(const char *key, char *result) const; 25 | int GetInt(const char *key, int defaultValue=0) const; 26 | }; 27 | 28 | #ifdef SCI_NAMESPACE 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /ext/scintilla/lexlib/StringCopy.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file StringCopy.h 3 | ** Safe string copy function which always NUL terminates. 4 | ** ELEMENTS macro for determining array sizes. 5 | **/ 6 | // Copyright 2013 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifndef STRINGCOPY_H 10 | #define STRINGCOPY_H 11 | 12 | #ifdef SCI_NAMESPACE 13 | namespace Scintilla { 14 | #endif 15 | 16 | // Safer version of string copy functions like strcpy, wcsncpy, etc. 17 | // Instantiate over fixed length strings of both char and wchar_t. 18 | // May truncate if source doesn't fit into dest with room for NUL. 19 | 20 | template 21 | void StringCopy(T (&dest)[count], const T* source) { 22 | for (size_t i=0; i 6 | // This file is in the public domain. 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include "ILexer.h" 15 | 16 | #include "LexAccessor.h" 17 | #include "Accessor.h" 18 | #include "StyleContext.h" 19 | #include "CharacterSet.h" 20 | 21 | #ifdef SCI_NAMESPACE 22 | using namespace Scintilla; 23 | #endif 24 | 25 | bool StyleContext::MatchIgnoreCase(const char *s) { 26 | if (MakeLowerCase(ch) != static_cast(*s)) 27 | return false; 28 | s++; 29 | if (MakeLowerCase(chNext) != static_cast(*s)) 30 | return false; 31 | s++; 32 | for (int n = 2; *s; n++) { 33 | if (static_cast(*s) != 34 | MakeLowerCase(static_cast(styler.SafeGetCharAt(currentPos + n, 0)))) 35 | return false; 36 | s++; 37 | } 38 | return true; 39 | } 40 | 41 | static void getRange(Sci_PositionU start, 42 | Sci_PositionU end, 43 | LexAccessor &styler, 44 | char *s, 45 | Sci_PositionU len) { 46 | Sci_PositionU i = 0; 47 | while ((i < end - start + 1) && (i < len-1)) { 48 | s[i] = styler[start + i]; 49 | i++; 50 | } 51 | s[i] = '\0'; 52 | } 53 | 54 | void StyleContext::GetCurrent(char *s, Sci_PositionU len) { 55 | getRange(styler.GetStartSegment(), currentPos - 1, styler, s, len); 56 | } 57 | 58 | static void getRangeLowered(Sci_PositionU start, 59 | Sci_PositionU end, 60 | LexAccessor &styler, 61 | char *s, 62 | Sci_PositionU len) { 63 | Sci_PositionU i = 0; 64 | while ((i < end - start + 1) && (i < len-1)) { 65 | s[i] = static_cast(tolower(styler[start + i])); 66 | i++; 67 | } 68 | s[i] = '\0'; 69 | } 70 | 71 | void StyleContext::GetCurrentLowered(char *s, Sci_PositionU len) { 72 | getRangeLowered(styler.GetStartSegment(), currentPos - 1, styler, s, len); 73 | } 74 | -------------------------------------------------------------------------------- /ext/scintilla/lexlib/WordList.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file WordList.h 3 | ** Hold a list of words. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef WORDLIST_H 9 | #define WORDLIST_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | /** 16 | */ 17 | class WordList { 18 | // Each word contains at least one character - a empty word acts as sentinel at the end. 19 | char **words; 20 | char *list; 21 | int len; 22 | bool onlyLineEnds; ///< Delimited by any white space or only line ends 23 | int starts[256]; 24 | public: 25 | explicit WordList(bool onlyLineEnds_ = false); 26 | ~WordList(); 27 | operator bool() const; 28 | bool operator!=(const WordList &other) const; 29 | int Length() const; 30 | void Clear(); 31 | void Set(const char *s); 32 | bool InList(const char *s) const; 33 | bool InListAbbreviated(const char *s, const char marker) const; 34 | bool InListAbridged(const char *s, const char marker) const; 35 | const char *WordAt(int n) const; 36 | }; 37 | 38 | #ifdef SCI_NAMESPACE 39 | } 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /ext/scintilla/qt/README: -------------------------------------------------------------------------------- 1 | README for building of Scintilla on Qt 2 | 3 | There are three different Scintilla libraries that can be produced: 4 | 5 | ScintillaEditBase 6 | A basic widget callable from C++ which is small and can be used just as is 7 | or with higher level functionality added. 8 | 9 | ScintillaEdit 10 | A more complete C++ widget with a method for every Scintilla API and a 11 | secondary API allowing direct access to document objects. 12 | 13 | ScintillaEditPy 14 | A Python callable version of ScintillaEdit using the PySide bindings. 15 | 16 | Building a library 17 | 18 | ScintillaEditBase can be built without performing any generation steps. 19 | The ScintillaEditBase/ScintillaEditBase.pro project can be loaded into 20 | Qt Creator and the "Build All" command performed. 21 | Alternatively, run "qmake" to build make files and then use the platform 22 | make to build. Most commonly, use "make" on Unix and "nmake" 23 | on Windows. 24 | 25 | ScintillaEdit requires a generation command be run first. From the 26 | ScintillaEdit directory: 27 | 28 | python WidgetGen.py 29 | 30 | After the generation command has run, the ScintillaEdit.h and 31 | ScintillaEdit.cpp files will have been populated with the Scintilla API 32 | methods. 33 | To build, use Qt Creator or qmake and make as for ScintillaEditBase. 34 | 35 | ScintillaEditPy is more complex and instructions are found in 36 | ScintillaEditPy/README. 37 | -------------------------------------------------------------------------------- /ext/scintilla/qt/ScintillaEditBase/Notes.txt: -------------------------------------------------------------------------------- 1 | 2 | Issues with Scintilla for Qt 3 | 4 | Qt reports character descenders are 1 pixel shorter than they really are. 5 | There is a tweak in the code to add a pixel in. This may have to be reviewed for Qt 5. 6 | There's a comment in the Qt code for Windows: 7 | // ### we subtract 1 to even out the historical +1 in QFontMetrics's 8 | // ### height=asc+desc+1 equation. Fix in Qt5. 9 | 10 | The clocks used aren't great. QTime is a time since midnight clock so wraps around and 11 | is only accurate to, at best, milliseconds. 12 | 13 | On OS X drawing text into a pixmap moves it around 1 pixel to the right compared to drawing 14 | it directly onto a window. Buffered drawing turned off by default to avoid this. 15 | Reported as QTBUG-19483. 16 | 17 | Only one QPainter can be active on any widget at a time. Scintilla only draws into one 18 | widget but reenters for measurement. 19 | -------------------------------------------------------------------------------- /ext/scintilla/qt/ScintillaEditPy/ScintillaConstants.py.template: -------------------------------------------------------------------------------- 1 | # ScintillaConstants.py 2 | # Define all the symbolic constants from Scintilla.iface so Python code can use them 3 | # Copyright (c) 2011 Archaeopteryx Software, Inc. d/b/a Wingware 4 | 5 | # ++Autogenerated -- start of section automatically generated from Scintilla.iface */ 6 | # --Autogenerated -- end of section automatically generated from Scintilla.iface */ 7 | -------------------------------------------------------------------------------- /ext/scintilla/qt/ScintillaEditPy/global.h: -------------------------------------------------------------------------------- 1 | #include "pyside_global.h" 2 | 3 | #include "ScintillaEditBase.h" 4 | #include "ScintillaEdit.h" 5 | -------------------------------------------------------------------------------- /ext/scintilla/scripts/GenerateCharacterCategory.py: -------------------------------------------------------------------------------- 1 | # Script to generate CharacterCategory.cxx from Python's Unicode data 2 | # Should be run rarely when a Python with a new version of Unicode data is available. 3 | # Requires Python 3.3 or later 4 | # Should not be run with old versions of Python. 5 | 6 | import codecs, os, platform, sys, unicodedata 7 | 8 | from FileGenerator import Regenerate 9 | 10 | def findCategories(filename): 11 | with codecs.open(filename, "r", "UTF-8") as infile: 12 | lines = [x.strip() for x in infile.readlines() if "\tcc" in x] 13 | values = "".join(lines).replace(" ","").split(",") 14 | print(values) 15 | return [v[2:] for v in values] 16 | 17 | def updateCharacterCategory(filename): 18 | values = ["// Created with Python %s, Unicode %s" % ( 19 | platform.python_version(), unicodedata.unidata_version)] 20 | category = unicodedata.category(chr(0)) 21 | startRange = 0 22 | for ch in range(sys.maxunicode): 23 | uch = chr(ch) 24 | if unicodedata.category(uch) != category: 25 | value = startRange * 32 + categories.index(category) 26 | values.append("%d," % value) 27 | category = unicodedata.category(uch) 28 | startRange = ch 29 | value = startRange * 32 + categories.index(category) 30 | values.append("%d," % value) 31 | 32 | Regenerate(filename, "//", values) 33 | 34 | categories = findCategories("../lexlib/CharacterCategory.h") 35 | 36 | updateCharacterCategory("../lexlib/CharacterCategory.cxx") 37 | -------------------------------------------------------------------------------- /ext/scintilla/src/CaseConvert.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | // Encoding: UTF-8 3 | /** @file CaseConvert.h 4 | ** Performs Unicode case conversions. 5 | ** Does not handle locale-sensitive case conversion. 6 | **/ 7 | // Copyright 2013 by Neil Hodgson 8 | // The License.txt file describes the conditions under which this software may be distributed. 9 | 10 | #ifndef CASECONVERT_H 11 | #define CASECONVERT_H 12 | 13 | #ifdef SCI_NAMESPACE 14 | namespace Scintilla { 15 | #endif 16 | 17 | enum CaseConversion { 18 | CaseConversionFold, 19 | CaseConversionUpper, 20 | CaseConversionLower 21 | }; 22 | 23 | class ICaseConverter { 24 | public: 25 | virtual size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed) = 0; 26 | }; 27 | 28 | ICaseConverter *ConverterFor(enum CaseConversion conversion); 29 | 30 | // Returns a UTF-8 string. Empty when no conversion 31 | const char *CaseConvert(int character, enum CaseConversion conversion); 32 | 33 | // When performing CaseConvertString, the converted value may be up to 3 times longer than the input. 34 | // Ligatures are often decomposed into multiple characters and long cases include: 35 | // ΐ "\xce\x90" folds to ΐ "\xce\xb9\xcc\x88\xcc\x81" 36 | const int maxExpansionCaseConversion=3; 37 | 38 | // Converts a mixed case string using a particular conversion. 39 | // Result may be a different length to input and the length is the return value. 40 | // If there is not enough space then 0 is returned. 41 | size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed, enum CaseConversion conversion); 42 | 43 | // Converts a mixed case string using a particular conversion. 44 | std::string CaseConvertString(const std::string &s, enum CaseConversion conversion); 45 | 46 | #ifdef SCI_NAMESPACE 47 | } 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /ext/scintilla/src/CaseFolder.cxx: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file CaseFolder.cxx 3 | ** Classes for case folding. 4 | **/ 5 | // Copyright 1998-2013 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include "CaseFolder.h" 13 | #include "CaseConvert.h" 14 | #include "UniConversion.h" 15 | 16 | #ifdef SCI_NAMESPACE 17 | using namespace Scintilla; 18 | #endif 19 | 20 | CaseFolder::~CaseFolder() { 21 | } 22 | 23 | CaseFolderTable::CaseFolderTable() { 24 | for (size_t iChar=0; iChar(iChar); 26 | } 27 | } 28 | 29 | CaseFolderTable::~CaseFolderTable() { 30 | } 31 | 32 | size_t CaseFolderTable::Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { 33 | if (lenMixed > sizeFolded) { 34 | return 0; 35 | } else { 36 | for (size_t i=0; i(mixed[i])]; 38 | } 39 | return lenMixed; 40 | } 41 | } 42 | 43 | void CaseFolderTable::SetTranslation(char ch, char chTranslation) { 44 | mapping[static_cast(ch)] = chTranslation; 45 | } 46 | 47 | void CaseFolderTable::StandardASCII() { 48 | for (size_t iChar=0; iChar= 'A' && iChar <= 'Z') { 50 | mapping[iChar] = static_cast(iChar - 'A' + 'a'); 51 | } else { 52 | mapping[iChar] = static_cast(iChar); 53 | } 54 | } 55 | } 56 | 57 | CaseFolderUnicode::CaseFolderUnicode() { 58 | StandardASCII(); 59 | converter = ConverterFor(CaseConversionFold); 60 | } 61 | 62 | size_t CaseFolderUnicode::Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { 63 | if ((lenMixed == 1) && (sizeFolded > 0)) { 64 | folded[0] = mapping[static_cast(mixed[0])]; 65 | return 1; 66 | } else { 67 | return converter->CaseConvertString(folded, sizeFolded, mixed, lenMixed); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /ext/scintilla/src/CaseFolder.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file CaseFolder.h 3 | ** Classes for case folding. 4 | **/ 5 | // Copyright 1998-2013 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef CASEFOLDER_H 9 | #define CASEFOLDER_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | class CaseFolder { 16 | public: 17 | virtual ~CaseFolder(); 18 | virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) = 0; 19 | }; 20 | 21 | class CaseFolderTable : public CaseFolder { 22 | protected: 23 | char mapping[256]; 24 | public: 25 | CaseFolderTable(); 26 | virtual ~CaseFolderTable(); 27 | virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed); 28 | void SetTranslation(char ch, char chTranslation); 29 | void StandardASCII(); 30 | }; 31 | 32 | class ICaseConverter; 33 | 34 | class CaseFolderUnicode : public CaseFolderTable { 35 | ICaseConverter *converter; 36 | public: 37 | CaseFolderUnicode(); 38 | virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed); 39 | }; 40 | 41 | #ifdef SCI_NAMESPACE 42 | } 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /ext/scintilla/src/Catalogue.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Catalogue.h 3 | ** Lexer infrastructure. 4 | **/ 5 | // Copyright 1998-2010 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef CATALOGUE_H 9 | #define CATALOGUE_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | class Catalogue { 16 | public: 17 | static const LexerModule *Find(int language); 18 | static const LexerModule *Find(const char *languageName); 19 | static void AddLexerModule(LexerModule *plm); 20 | }; 21 | 22 | #ifdef SCI_NAMESPACE 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ext/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 12 | 13 | #include "CharClassify.h" 14 | 15 | #ifdef SCI_NAMESPACE 16 | using namespace Scintilla; 17 | #endif 18 | 19 | CharClassify::CharClassify() { 20 | SetDefaultCharClasses(true); 21 | } 22 | 23 | void CharClassify::SetDefaultCharClasses(bool includeWordClass) { 24 | // Initialize all char classes to default values 25 | for (int ch = 0; ch < 256; ch++) { 26 | if (ch == '\r' || ch == '\n') 27 | charClass[ch] = ccNewLine; 28 | else if (ch < 0x20 || ch == ' ') 29 | charClass[ch] = ccSpace; 30 | else if (includeWordClass && (ch >= 0x80 || isalnum(ch) || ch == '_')) 31 | charClass[ch] = ccWord; 32 | else 33 | charClass[ch] = ccPunctuation; 34 | } 35 | } 36 | 37 | void CharClassify::SetCharClasses(const unsigned char *chars, cc newCharClass) { 38 | // Apply the newCharClass to the specifed chars 39 | if (chars) { 40 | while (*chars) { 41 | charClass[*chars] = static_cast(newCharClass); 42 | chars++; 43 | } 44 | } 45 | } 46 | 47 | int CharClassify::GetCharsOfClass(cc characterClass, unsigned char *buffer) const { 48 | // Get characters belonging to the given char class; return the number 49 | // of characters (if the buffer is NULL, don't write to it). 50 | int count = 0; 51 | for (int ch = maxChar - 1; ch >= 0; --ch) { 52 | if (charClass[ch] == characterClass) { 53 | ++count; 54 | if (buffer) { 55 | *buffer = static_cast(ch); 56 | buffer++; 57 | } 58 | } 59 | } 60 | return count; 61 | } 62 | -------------------------------------------------------------------------------- /ext/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 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | class CharClassify { 16 | public: 17 | CharClassify(); 18 | 19 | enum cc { ccSpace, ccNewLine, ccWord, ccPunctuation }; 20 | void SetDefaultCharClasses(bool includeWordClass); 21 | void SetCharClasses(const unsigned char *chars, cc newCharClass); 22 | int GetCharsOfClass(cc charClass, unsigned char *buffer) const; 23 | cc GetClass(unsigned char ch) const { return static_cast(charClass[ch]);} 24 | bool IsWord(unsigned char ch) const { return static_cast(charClass[ch]) == ccWord;} 25 | 26 | private: 27 | enum { maxChar=256 }; 28 | unsigned char charClass[maxChar]; // not type cc to save space 29 | }; 30 | 31 | #ifdef SCI_NAMESPACE 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /ext/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 | explicit Decoration(int indicator_); 21 | ~Decoration(); 22 | 23 | bool Empty() const; 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) const; 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 | -------------------------------------------------------------------------------- /ext/scintilla/src/EditModel.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file EditModel.h 3 | ** Defines the editor state that must be visible to EditorView. 4 | **/ 5 | // Copyright 1998-2014 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef EDITMODEL_H 9 | #define EDITMODEL_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | /** 16 | */ 17 | class Caret { 18 | public: 19 | bool active; 20 | bool on; 21 | int period; 22 | 23 | Caret(); 24 | }; 25 | 26 | class EditModel { 27 | // Private so EditModel objects can not be copied 28 | explicit EditModel(const EditModel &); 29 | EditModel &operator=(const EditModel &); 30 | 31 | public: 32 | bool inOverstrike; 33 | int xOffset; ///< Horizontal scrolled amount in pixels 34 | bool trackLineWidth; 35 | 36 | SpecialRepresentations reprs; 37 | Caret caret; 38 | SelectionPosition posDrag; 39 | Position braces[2]; 40 | int bracesMatchStyle; 41 | int highlightGuideColumn; 42 | Selection sel; 43 | bool primarySelection; 44 | 45 | enum IMEInteraction { imeWindowed, imeInline } imeInteraction; 46 | 47 | int foldFlags; 48 | int foldDisplayTextStyle; 49 | ContractionState cs; 50 | // Hotspot support 51 | Range hotspot; 52 | int hoverIndicatorPos; 53 | 54 | // Wrapping support 55 | int wrapWidth; 56 | 57 | Document *pdoc; 58 | 59 | EditModel(); 60 | virtual ~EditModel(); 61 | virtual int TopLineOfMain() const = 0; 62 | virtual Point GetVisibleOriginInMain() const = 0; 63 | virtual int LinesOnScreen() const = 0; 64 | virtual Range GetHotSpotRange() const = 0; 65 | }; 66 | 67 | #ifdef SCI_NAMESPACE 68 | } 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /ext/scintilla/src/FontQuality.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file FontQuality.h 3 | ** Definitions to control font anti-aliasing. 4 | ** Redefine constants from Scintilla.h to avoid including Scintilla.h in PlatWin.cxx. 5 | **/ 6 | // Copyright 1998-2009 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifndef FONTQUALITY_H 10 | #define FONTQUALITY_H 11 | 12 | #ifdef SCI_NAMESPACE 13 | namespace Scintilla { 14 | #endif 15 | 16 | // These definitions match Scintilla.h 17 | #define SC_EFF_QUALITY_MASK 0xF 18 | #define SC_EFF_QUALITY_DEFAULT 0 19 | #define SC_EFF_QUALITY_NON_ANTIALIASED 1 20 | #define SC_EFF_QUALITY_ANTIALIASED 2 21 | #define SC_EFF_QUALITY_LCD_OPTIMIZED 3 22 | 23 | // These definitions must match SC_TECHNOLOGY_* in Scintilla.h 24 | #define SCWIN_TECH_GDI 0 25 | #define SCWIN_TECH_DIRECTWRITE 1 26 | 27 | #ifdef SCI_NAMESPACE 28 | } 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /ext/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 | struct StyleAndColour { 16 | int style; 17 | ColourDesired fore; 18 | StyleAndColour() : style(INDIC_PLAIN), fore(0, 0, 0) { 19 | } 20 | StyleAndColour(int style_, ColourDesired fore_ = ColourDesired(0, 0, 0)) : style(style_), fore(fore_) { 21 | } 22 | bool operator==(const StyleAndColour &other) const { 23 | return (style == other.style) && (fore == other.fore); 24 | } 25 | }; 26 | 27 | /** 28 | */ 29 | class Indicator { 30 | public: 31 | enum DrawState { drawNormal, drawHover }; 32 | StyleAndColour sacNormal; 33 | StyleAndColour sacHover; 34 | bool under; 35 | int fillAlpha; 36 | int outlineAlpha; 37 | int attributes; 38 | Indicator() : under(false), fillAlpha(30), outlineAlpha(50), attributes(0) { 39 | } 40 | Indicator(int style_, ColourDesired fore_=ColourDesired(0,0,0), bool under_=false, int fillAlpha_=30, int outlineAlpha_=50) : 41 | sacNormal(style_, fore_), sacHover(style_, fore_), under(under_), fillAlpha(fillAlpha_), outlineAlpha(outlineAlpha_), attributes(0) { 42 | } 43 | void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine, const PRectangle &rcCharacter, DrawState drawState, int value) const; 44 | bool IsDynamic() const { 45 | return !(sacNormal == sacHover); 46 | } 47 | bool OverridesTextFore() const { 48 | return sacNormal.style == INDIC_TEXTFORE || sacHover.style == INDIC_TEXTFORE; 49 | } 50 | int Flags() const { 51 | return attributes; 52 | } 53 | void SetFlags(int attributes_); 54 | }; 55 | 56 | #ifdef SCI_NAMESPACE 57 | } 58 | #endif 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /ext/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 KEYMAP_H 9 | #define KEYMAP_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_META SCMOD_META 20 | #define SCI_SUPER SCMOD_SUPER 21 | #define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT) 22 | #define SCI_ASHIFT (SCI_ALT | SCI_SHIFT) 23 | 24 | /** 25 | */ 26 | class KeyModifiers { 27 | public: 28 | int key; 29 | int modifiers; 30 | KeyModifiers(int key_, int modifiers_) : key(key_), modifiers(modifiers_) { 31 | } 32 | bool operator<(const KeyModifiers &other) const { 33 | if (key == other.key) 34 | return modifiers < other.modifiers; 35 | else 36 | return key < other.key; 37 | } 38 | }; 39 | 40 | /** 41 | */ 42 | class KeyToCommand { 43 | public: 44 | int key; 45 | int modifiers; 46 | unsigned int msg; 47 | }; 48 | 49 | /** 50 | */ 51 | class KeyMap { 52 | std::map kmap; 53 | static const KeyToCommand MapDefault[]; 54 | 55 | public: 56 | KeyMap(); 57 | ~KeyMap(); 58 | void Clear(); 59 | void AssignCmdKey(int key, int modifiers, unsigned int msg); 60 | unsigned int Find(int key, int modifiers) const; // 0 returned on failure 61 | }; 62 | 63 | #ifdef SCI_NAMESPACE 64 | } 65 | #endif 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /ext/scintilla/src/MarginView.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file MarginView.h 3 | ** Defines the appearance of the editor margin. 4 | **/ 5 | // Copyright 1998-2014 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef MARGINVIEW_H 9 | #define MARGINVIEW_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour); 16 | 17 | typedef void (*DrawWrapMarkerFn)(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour); 18 | 19 | /** 20 | * MarginView draws the margins. 21 | */ 22 | class MarginView { 23 | public: 24 | Surface *pixmapSelMargin; 25 | Surface *pixmapSelPattern; 26 | Surface *pixmapSelPatternOffset1; 27 | // Highlight current folding block 28 | HighlightDelimiter highlightDelimiter; 29 | 30 | int wrapMarkerPaddingRight; // right-most pixel padding of wrap markers 31 | /** Some platforms, notably PLAT_CURSES, do not support Scintilla's native 32 | * DrawWrapMarker function for drawing wrap markers. Allow those platforms to 33 | * override it instead of creating a new method in the Surface class that 34 | * existing platforms must implement as empty. */ 35 | DrawWrapMarkerFn customDrawWrapMarker; 36 | 37 | MarginView(); 38 | 39 | void DropGraphics(bool freeObjects); 40 | void AllocateGraphics(const ViewStyle &vsDraw); 41 | void RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw); 42 | void PaintMargin(Surface *surface, int topLine, PRectangle rc, PRectangle rcMargin, 43 | const EditModel &model, const ViewStyle &vs); 44 | }; 45 | 46 | #ifdef SCI_NAMESPACE 47 | } 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /ext/scintilla/src/Position.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file Position.h 3 | ** Defines global type name Position in the Sci internal namespace. 4 | **/ 5 | // Copyright 2015 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef POSITION_H 9 | #define POSITION_H 10 | 11 | /** 12 | * A Position is a position within a document between two characters or at the beginning or end. 13 | * Sometimes used as a character index where it identifies the character after the position. 14 | */ 15 | 16 | namespace Sci { 17 | 18 | typedef int Position; 19 | 20 | // A later version (4.x) of this file may: 21 | //#if defined(SCI_LARGE_FILE_SUPPORT) 22 | //typedef std::ptrdiff_t Position; 23 | // or may allow runtime choice between different position sizes. 24 | 25 | const Position invalidPosition = -1; 26 | 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /ext/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 | explicit RESearch(CharClassify *charClassTable); 35 | ~RESearch(); 36 | void Clear(); 37 | void GrabMatches(CharacterIndexer &ci); 38 | const char *Compile(const char *pattern, int length, bool caseSensitive, bool posix); 39 | int Execute(CharacterIndexer &ci, int lp, int endp); 40 | 41 | enum { MAXTAG=10 }; 42 | enum { MAXNFA=4096 }; 43 | enum { NOTFOUND=-1 }; 44 | 45 | int bopat[MAXTAG]; 46 | int eopat[MAXTAG]; 47 | std::string pat[MAXTAG]; 48 | 49 | private: 50 | void ChSet(unsigned char c); 51 | void ChSetWithCase(unsigned char c, bool caseSensitive); 52 | int GetBackslashExpression(const char *pattern, int &incr); 53 | 54 | int PMatch(CharacterIndexer &ci, int lp, int endp, char *ap); 55 | 56 | int bol; 57 | int tagstk[MAXTAG]; /* subpat tag stack */ 58 | char nfa[MAXNFA]; /* automaton */ 59 | int sta; 60 | unsigned char bittab[BITBLK]; /* bit table for CCL pre-set bits */ 61 | int failure; 62 | CharClassify *charClass; 63 | bool iswordc(unsigned char x) const { 64 | return charClass->IsWord(x); 65 | } 66 | }; 67 | 68 | #ifdef SCI_NAMESPACE 69 | } 70 | #endif 71 | 72 | #endif 73 | 74 | -------------------------------------------------------------------------------- /ext/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 | private: 19 | Partitioning *starts; 20 | SplitVector *styles; 21 | int RunFromPosition(int position) const; 22 | int SplitRun(int position); 23 | void RemoveRun(int run); 24 | void RemoveRunIfEmpty(int run); 25 | void RemoveRunIfSameAsPrevious(int run); 26 | // Private so RunStyles objects can not be copied 27 | RunStyles(const RunStyles &); 28 | public: 29 | RunStyles(); 30 | ~RunStyles(); 31 | int Length() const; 32 | int ValueAt(int position) const; 33 | int FindNextChange(int position, int end) const; 34 | int StartRun(int position) const; 35 | int EndRun(int position) const; 36 | // Returns true if some values may have changed 37 | bool FillRange(int &position, int value, int &fillLength); 38 | void SetValueAt(int position, int value); 39 | void InsertSpace(int position, int insertLength); 40 | void DeleteAll(); 41 | void DeleteRange(int position, int deleteLength); 42 | int Runs() const; 43 | bool AllSame() const; 44 | bool AllSameAs(int value) const; 45 | int Find(int value, int start) const; 46 | 47 | void Check() const; 48 | }; 49 | 50 | #ifdef SCI_NAMESPACE 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /ext/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 6 | command.build.*.h=nmake -f scintilla.mak QUIET=1 7 | -------------------------------------------------------------------------------- /ext/scintilla/src/UnicodeFromUTF8.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file UnicodeFromUTF8.h 3 | ** Lexer infrastructure. 4 | **/ 5 | // Copyright 2013 by Neil Hodgson 6 | // This file is in the public domain. 7 | 8 | #ifndef UNICODEFROMUTF8_H 9 | #define UNICODEFROMUTF8_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | inline int UnicodeFromUTF8(const unsigned char *us) { 16 | if (us[0] < 0xC2) { 17 | return us[0]; 18 | } else if (us[0] < 0xE0) { 19 | return ((us[0] & 0x1F) << 6) + (us[1] & 0x3F); 20 | } else if (us[0] < 0xF0) { 21 | return ((us[0] & 0xF) << 12) + ((us[1] & 0x3F) << 6) + (us[2] & 0x3F); 22 | } else if (us[0] < 0xF5) { 23 | return ((us[0] & 0x7) << 18) + ((us[1] & 0x3F) << 12) + ((us[2] & 0x3F) << 6) + (us[3] & 0x3F); 24 | } 25 | return us[0]; 26 | } 27 | 28 | #ifdef SCI_NAMESPACE 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/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 or Linux/Qt using Python 2.7 or 3.x. 4 | Python 2.7+ is required because the bytes string type and literals are available. 5 | Scintilla must be built before running any tests. 6 | 7 | A test application for Windows only is in xite.py and this can be run to experiment: 8 | pythonw xite.py 9 | 10 | To run the basic tests: 11 | python simpleTests.py 12 | 13 | There are some lexing tests with simple input files in several languages in the examples 14 | subdirectory and their expected lexed states in *.styled where the start of each style 15 | is marked with {styleNumber}, for example: 16 | {15}<%@{16}language=javas{15}%>{0} 17 | 18 | To run the lexing tests: 19 | python lexTests.py 20 | 21 | To check for performance regressions: 22 | python performanceTests.py 23 | While each test run will be different and the timer has only limited granularity, some results 24 | from a 2 GHz Athlon with a DEBUG build are: 25 | 0.187 testAddLine 26 | . 0.203 testAddLineMiddle 27 | . 0.171 testHuge 28 | . 0.203 testHugeInserts 29 | . 0.312 testHugeReplace 30 | . 31 | -------------------------------------------------------------------------------- /ext/scintilla/test/XiteMenu.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from __future__ import unicode_literals 4 | 5 | """ Define the menu structure used by the Pentacle applications """ 6 | 7 | MenuStructure = [ 8 | ["&File", [ 9 | ["&New", "N"], 10 | ["&Open...", "O"], 11 | ["&Save", "S"], 12 | ["Save &As...", "S"], 13 | ["Test", ""], 14 | ["Exercised", ""], 15 | ["Uncalled", ""], 16 | ["-", ""], 17 | ["&Exit", ""]]], 18 | [ "&Edit", [ 19 | ["&Undo", "Z"], 20 | ["&Redo", "Y"], 21 | ["-", ""], 22 | ["Cu&t", "X"], 23 | ["&Copy", "C"], 24 | ["&Paste", "V"], 25 | ["&Delete", "Del"], 26 | ["Select &All", "A"], 27 | ]], 28 | ] 29 | -------------------------------------------------------------------------------- /ext/scintilla/test/XiteQt.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Requires Python 2.7 or later 3 | 4 | import ctypes, os, sys, unittest 5 | 6 | from PySide.QtCore import * 7 | from PySide.QtGui import * 8 | 9 | import ScintillaCallable 10 | 11 | sys.path.append("..") 12 | from bin import ScintillaEditPy 13 | 14 | scintillaDirectory = ".." 15 | scintillaIncludeDirectory = os.path.join(scintillaDirectory, "include") 16 | scintillaScriptsDirectory = os.path.join(scintillaDirectory, "scripts") 17 | sys.path.append(scintillaScriptsDirectory) 18 | import Face 19 | 20 | class Form(QDialog): 21 | 22 | def __init__(self, parent=None): 23 | super(Form, self).__init__(parent) 24 | self.resize(460,300) 25 | # Create widget 26 | self.edit = ScintillaEditPy.ScintillaEdit(self) 27 | 28 | class XiteWin(): 29 | def __init__(self, test=""): 30 | self.face = Face.Face() 31 | self.face.ReadFromFile(os.path.join(scintillaIncludeDirectory, "Scintilla.iface")) 32 | 33 | self.test = test 34 | 35 | self.form = Form() 36 | 37 | scifn = self.form.edit.send(int(self.face.features["GetDirectFunction"]["Value"]), 0, 0) 38 | sciptr = ctypes.c_char_p(self.form.edit.send( 39 | int(self.face.features["GetDirectPointer"]["Value"]), 0,0)) 40 | 41 | self.ed = ScintillaCallable.ScintillaCallable(self.face, scifn, sciptr) 42 | self.form.show() 43 | 44 | def DoStuff(self): 45 | print(self.test) 46 | self.CmdTest() 47 | 48 | def DoEvents(self): 49 | QApplication.processEvents() 50 | 51 | def CmdTest(self): 52 | runner = unittest.TextTestRunner() 53 | tests = unittest.defaultTestLoader.loadTestsFromName(self.test) 54 | results = runner.run(tests) 55 | print(results) 56 | sys.exit(0) 57 | 58 | xiteFrame = None 59 | 60 | def main(test): 61 | global xiteFrame 62 | app = QApplication(sys.argv) 63 | xiteFrame = XiteWin(test) 64 | xiteFrame.DoStuff() 65 | sys.exit(app.exec_()) 66 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/scintilla/test/examples/x.cxx: -------------------------------------------------------------------------------- 1 | // A demonstration program 2 | #include 3 | #if 0 /* */ 4 | #define DUMMY() \ 5 | if (1); 6 | #endif 7 | 8 | #define M\ 9 | 10 | \ 11 | 12 | int main() { 13 | double x[] = {3.14159,6.02e23,1.6e-19,1.0+1}; 14 | int y[] = {75,0113,0x4b}; 15 | printf("hello world %d %g\n", y[0], x[0]); 16 | } 17 | -------------------------------------------------------------------------------- /ext/scintilla/test/examples/x.cxx.styled: -------------------------------------------------------------------------------- 1 | {2}// A demonstration program 2 | {9}#include 3 | #if 0 {23}/* */{9} 4 | {73}#define DUMMY() \ 5 | if (1); 6 | {9}#endif 7 | {0} 8 | {9}#define M\ 9 | 10 | {0}\ 11 | 12 | {5}int{0} {11}main{10}(){0} {10}{{0} 13 | {11}double{0} {11}x{10}[]{0} {10}={0} {10}{{4}3.14159{10},{4}6.02e23{10},{4}1.6e-19{10},{4}1.0{10}+{4}1{10}};{0} 14 | {5}int{0} {11}y{10}[]{0} {10}={0} {10}{{4}75{10},{4}0113{10},{4}0x4b{10}};{0} 15 | {11}printf{10}({6}"hello world %d %g\n"{10},{0} {11}y{10}[{4}0{10}],{0} {11}x{10}[{4}0{10}]);{0} 16 | {10}}{0} 17 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/scintilla/test/examples/x.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | SinkWorld - Portability 10 | SinkWorld - Portability 11 | 12 | 13 | -------------------------------------------------------------------------------- /ext/scintilla/test/examples/x.html.styled: -------------------------------------------------------------------------------- 1 | {1}{0} 2 | {1}{40} 3 | {46}var{41} {46}b{41} {50}={41} {52}/abc/i{46}.test{50}({49}'abc'{50});{41} 4 | {49}'x\ 5 | '{41} 6 | {1}{0} 7 | {1}{0} 8 | {1}{0} 9 | {1}{0}SinkWorld - Portability{1}{0} 10 | {2}{0}SinkWorld - Portability{2}{0} 11 | {1}{0} 12 | {1}{0} 13 | -------------------------------------------------------------------------------- /ext/scintilla/test/examples/x.lua: -------------------------------------------------------------------------------- 1 | --[[ coding:UTF-8 2 | comment ]] 3 | function first() 4 | ::開:: 5 | -- Comment 6 | func(SCI_ANNOTATIONSETTEXT, 'a', 0, "LINE1") 7 | end 8 | -------------------------------------------------------------------------------- /ext/scintilla/test/examples/x.lua.styled: -------------------------------------------------------------------------------- 1 | {1}--[[ coding:UTF-8 2 | comment ]]{0} 3 | {5}function{0} {11}first{10}(){0} 4 | {20}::開::{0} 5 | {2}-- Comment 6 | {0} {11}func{10}({11}SCI_ANNOTATIONSETTEXT{10},{0} {7}'a'{10},{0} {4}0{10},{0} {6}"LINE1"{10}){0} 7 | {5}end{0} 8 | -------------------------------------------------------------------------------- /ext/scintilla/test/examples/x.php: -------------------------------------------------------------------------------- 1 | 2 | \n"; 4 | /* ?> */ 5 | ?> 6 | forif 7 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/scintilla/test/examples/x.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | while ( $r ) { 3 | printf ( "Example text \n" ); 4 | sleep 1; 5 | } -------------------------------------------------------------------------------- /ext/scintilla/test/examples/x.pl.styled: -------------------------------------------------------------------------------- 1 | {5}use{0} {11}strict{10};{0} 2 | {5}while{0} {10}({0} {12}$r{0} {10}){0} {10}{{0} 3 | {5}printf{0} {10}({0} {6}"Example text \n"{0} {10});{0} 4 | {5}sleep{0} {4}1{10};{0} 5 | {10}} -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/scintilla/test/examples/x.rb: -------------------------------------------------------------------------------- 1 | class Demo 2 | def test # A test 3 | i = 1 4 | puts "Example" 5 | end 6 | end -------------------------------------------------------------------------------- /ext/scintilla/test/examples/x.rb.styled: -------------------------------------------------------------------------------- 1 | {5}class{0} {8}Demo{0} 2 | {5}def{0} {9}test{0} {2}# A test{0} 3 | {11}i{0} {10}={0} {4}1{0} 4 | {11}puts{0} {6}"Example"{0} 5 | {5}end{0} 6 | {5}end -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/scintilla/test/gi/filter-scintilla-h.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Filters Scintilla.h to not contain generated stuff or deprecated defines 3 | 4 | import sys 5 | import fileinput 6 | 7 | def main(): 8 | inhibit = 0 9 | for line in fileinput.input(): 10 | if line.startswith("/* ++Autogenerated") or line.startswith("#ifdef INCLUDE_DEPRECATED_FEATURES"): 11 | inhibit += 1 12 | if inhibit == 0: 13 | sys.stdout.write(line) 14 | if line.startswith("/* --Autogenerated") or line.startswith("#endif"): 15 | if (inhibit > 0): 16 | inhibit -= 1 17 | 18 | if __name__ == "__main__": 19 | main() 20 | -------------------------------------------------------------------------------- /ext/scintilla/test/gi/gi-test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import gi 3 | gi.require_version('Scintilla', '0.1') 4 | 5 | # Scintilla is imported before because it loads Gtk with a specified version 6 | # this avoids a warning when Gtk is imported without version such as below (where 7 | # it is imported without because this script works with gtk2 and gtk3) 8 | from gi.repository import Scintilla 9 | from gi.repository import Gtk 10 | 11 | def on_notify(sci, id, scn): 12 | if (scn.nmhdr.code == 2001): # SCN_CHARADDED 13 | print ("sci-notify: id: %d, char added: %d" % (id, scn.ch)) 14 | elif (scn.nmhdr.code == 2008): # SCN_MODIFIED 15 | print ("sci-notify: id: %d, pos: %d, mod type: %d" % (id, scn.position, scn.modificationType)) 16 | else: 17 | print ("sci-notify: id: %d, scn.nmhdr.code: %d" % (id, scn.nmhdr.code)) 18 | 19 | win = Gtk.Window() 20 | win.connect("delete-event", Gtk.main_quit) 21 | sci = Scintilla.Object() 22 | sci.connect("sci-notify", on_notify) 23 | win.add(sci) 24 | win.show_all() 25 | win.resize(400,300) 26 | Gtk.main() 27 | -------------------------------------------------------------------------------- /ext/scintilla/test/gi/makefile: -------------------------------------------------------------------------------- 1 | # Build gir and test 2 | # For Ubuntu, these may be needed: 3 | # apt-get install gobject-introspection 4 | # apt-get install libgirepository1.0-dev 5 | all: Scintilla-0.1.typelib 6 | 7 | ifdef GTK3 8 | GTKVERSION=3.0 9 | else 10 | GTKVERSION=2.0 11 | endif 12 | 13 | GI_SCANNER = g-ir-scanner 14 | GI_COMPILER = g-ir-compiler 15 | GTK_LIBS = $(shell pkg-config --libs gtk+-$(GTKVERSION)) 16 | GTK_CFLAGS = $(shell pkg-config --cflags gtk+-$(GTKVERSION)) 17 | PWD = $(shell pwd) 18 | 19 | .PHONY: test clean FORCE 20 | 21 | ../../bin/scintilla.a: FORCE 22 | $(MAKE) -C ../../gtk all 23 | 24 | Scintilla-filtered.h: ../../include/Scintilla.h 25 | python filter-scintilla-h.py $< > $@ 26 | 27 | libscintilla.so: ../../bin/scintilla.a 28 | $(CXX) -shared -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive $(GTK_LIBS) 29 | 30 | Scintilla-0.1.gir: libscintilla.so Scintilla-filtered.h 31 | LDFLAGS=-Wl,-rpath=$(shell pwd) \ 32 | $(GI_SCANNER) --no-libtool --warn-all -i Gtk-$(GTKVERSION) -DG_IR_SCANNING -DGTK \ 33 | --cflags-begin $(GTK_CFLAGS) -include gtk/gtk.h \ 34 | -include Scintilla-filtered.h -I../../include --cflags-end \ 35 | --accept-unprefixed \ 36 | --c-include Scintilla.h --c-include ScintillaWidget.h \ 37 | -n Scintilla --nsversion 0.1 --library scintilla -L$(PWD) \ 38 | ../../include/Sci_Position.h ../../include/ScintillaWidget.h Scintilla-filtered.h \ 39 | -o $@ 40 | 41 | Scintilla-0.1.typelib: Scintilla-0.1.gir 42 | $(GI_COMPILER) $^ -o $@ 43 | 44 | clean: 45 | rm -f libscintilla.so Scintilla-0.1.gir Scintilla-0.1.typelib Scintilla-filtered.h 46 | $(MAKE) -C ../../gtk clean 47 | 48 | test: Scintilla-0.1.gir Scintilla-0.1.typelib 49 | @echo Verifying Scintilla-0.1.gir file 50 | @diff $<.good $< || (echo "GIR FILE MISMATCH!"; exit 1) 51 | @echo Launching gi-test.py python program 52 | GI_TYPELIB_PATH=$(PWD) LD_LIBRARY_PATH=$(PWD) \ 53 | python $(PWD)/gi-test.py 54 | -------------------------------------------------------------------------------- /ext/scintilla/test/unit/LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /ext/scintilla/test/unit/README: -------------------------------------------------------------------------------- 1 | The test/unit directory contains unit tests for Scintilla data structures. 2 | 3 | The tests can be run on Windows, OS X, or Linux using g++ and GNU make. 4 | The Catch test framework is used. 5 | https://github.com/philsquared/Catch 6 | The file catch.hpp is under the Boost Software License which is contained in LICENSE_1_0.txt 7 | 8 | To run the tests on OS X or Linux: 9 | make test 10 | 11 | To run the tests on Windows: 12 | mingw32-make test 13 | 14 | Visual C++ (2010+) and nmake can also be used on Windows: 15 | nmake -f test.mak test 16 | -------------------------------------------------------------------------------- /ext/scintilla/test/unit/Sci.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{size = {lengthBody}}} 5 | 6 | lengthBody 7 | (size) 8 | part1Length 9 | gapLength 10 | 11 | part1Length 12 | body 13 | 14 | 15 | lengthBody-part1Length 16 | body+part1Length+gapLength 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ext/scintilla/test/unit/SciTE.properties: -------------------------------------------------------------------------------- 1 | command.go.*.cxx=./unitTest 2 | if PLAT_WIN 3 | make.command=mingw32-make 4 | command.go.*.cxx=unitTest 5 | command.go.needs.$(file.patterns.cplusplus)=$(make.command) 6 | -------------------------------------------------------------------------------- /ext/scintilla/test/unit/UnitTester.cxx: -------------------------------------------------------------------------------- 1 | // UnitTester.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include 5 | #include 6 | 7 | #include "Platform.h" 8 | 9 | #define CATCH_CONFIG_RUNNER 10 | #include "catch.hpp" 11 | 12 | // Needed for PLATFORM_ASSERT in code being tested 13 | 14 | void Platform::Assert(const char *c, const char *file, int line) { 15 | fprintf(stderr, "Assertion [%s] failed at %s %d\n", c, file, line); 16 | abort(); 17 | } 18 | 19 | void Platform::DebugPrintf(const char *format, ...) { 20 | char buffer[2000]; 21 | va_list pArguments; 22 | va_start(pArguments, format); 23 | vsprintf(buffer, format, pArguments); 24 | va_end(pArguments); 25 | fprintf(stderr, "%s", buffer); 26 | } 27 | 28 | int main(int argc, char* const argv[]) { 29 | const int result = Catch::Session().run(argc, argv); 30 | 31 | _CrtDumpMemoryLeaks(); 32 | 33 | return result; 34 | } 35 | -------------------------------------------------------------------------------- /ext/scintilla/test/unit/makefile: -------------------------------------------------------------------------------- 1 | # Build all the unit tests using GNU make and either g++ or clang 2 | # Should be run using mingw32-make on Windows, not nmake 3 | # On Windows g++ is used, on OS X clang, and on Linux G++ is used by default 4 | # but clang can be used by defining CLANG when invoking make 5 | # clang works only with libc++, not libstdc++ 6 | # Tested with clang 3.3 and g++ 4.8 7 | 8 | ifndef windir 9 | ifeq ($(shell uname),Darwin) 10 | # On OS X always use clang as g++ is old version 11 | CLANG = 1 12 | USELIBCPP = 1 13 | endif 14 | endif 15 | 16 | CXXFLAGS += --std=c++11 17 | 18 | ifdef CLANG 19 | CXX = clang++ 20 | ifdef USELIBCPP 21 | # OS X, use libc++ but don't have sanitizers 22 | CXXFLAGS += --stdlib=libc++ 23 | LINKFLAGS = -lc++ 24 | else 25 | # Linux, have sanitizers 26 | SANITIZE = -fsanitize=address,undefined 27 | CXXFLAGS += $(SANITIZE) 28 | endif 29 | else 30 | CXX = g++ 31 | endif 32 | 33 | ifdef windir 34 | DEL = del /q 35 | EXE = unitTest.exe 36 | else 37 | DEL = rm -f 38 | EXE = unitTest 39 | endif 40 | 41 | INCLUDEDIRS = -I ../../include -I ../../src -I../../lexlib 42 | 43 | CPPFLAGS += $(INCLUDEDIRS) 44 | CXXFLAGS += -Wall -Wextra 45 | 46 | # Files in this directory containing tests 47 | TESTSRC=test*.cxx 48 | # Files being tested from scintilla/src directory 49 | TESTEDSRC=\ 50 | ../../lexlib/WordList.cxx \ 51 | ../../src/CellBuffer.cxx \ 52 | ../../src/CharClassify.cxx \ 53 | ../../src/ContractionState.cxx \ 54 | ../../src/Decoration.cxx \ 55 | ../../src/RunStyles.cxx 56 | 57 | TESTS=$(EXE) 58 | 59 | all: $(TESTS) 60 | 61 | test: $(TESTS) 62 | ./$(EXE) 63 | 64 | clean: 65 | $(DEL) $(TESTS) *.o *.obj *.exe 66 | 67 | $(EXE): $(TESTSRC) $(TESTEDSRC) unitTest.cxx 68 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LINKFLAGS) $^ -o $@ 69 | -------------------------------------------------------------------------------- /ext/scintilla/test/unit/test.mak: -------------------------------------------------------------------------------- 1 | # Build all the unit tests with Microsoft Visual C++ using nmake 2 | # Tested with Visual C++ 2010 and 2013 3 | 4 | DEL = del /q 5 | EXE = unitTest.exe 6 | 7 | INCLUDEDIRS = /I../../include /I../../src /I../../lexlib 8 | 9 | CXXFLAGS = /EHsc /wd 4805 $(INCLUDEDIRS) 10 | 11 | # Files in this directory containing tests 12 | TESTSRC=test*.cxx 13 | # Files being tested from scintilla/src directory 14 | TESTEDSRC=\ 15 | ../../lexlib/WordList.cxx \ 16 | ../../src/CellBuffer.cxx \ 17 | ../../src/CharClassify.cxx \ 18 | ../../src/ContractionState.cxx \ 19 | ../../src/Decoration.cxx \ 20 | ../../src/RunStyles.cxx 21 | 22 | TESTS=$(EXE) 23 | 24 | all: $(TESTS) 25 | 26 | test: $(TESTS) 27 | $(EXE) 28 | 29 | clean: 30 | $(DEL) $(TESTS) *.o *.obj *.exe 31 | 32 | $(EXE): $(TESTSRC) $(TESTEDSRC) $(@B).obj 33 | $(CXX) $(CXXFLAGS) /Fe$@ $** 34 | -------------------------------------------------------------------------------- /ext/scintilla/test/unit/testUnicodeFromUTF8.cxx: -------------------------------------------------------------------------------- 1 | // Unit Tests for Scintilla internal data structures 2 | 3 | #include 4 | 5 | #include 6 | 7 | #include "Platform.h" 8 | 9 | #include "UnicodeFromUTF8.h" 10 | 11 | #include "catch.hpp" 12 | 13 | // Test UnicodeFromUTF8. 14 | // Use examples from Wikipedia: 15 | // http://en.wikipedia.org/wiki/UTF-8 16 | 17 | TEST_CASE("UnicodeFromUTF8") { 18 | 19 | SECTION("ASCII") { 20 | const unsigned char s[]={'a', 0}; 21 | REQUIRE(UnicodeFromUTF8(s) == 'a'); 22 | } 23 | 24 | SECTION("Example1") { 25 | const unsigned char s[]={0x24, 0}; 26 | REQUIRE(UnicodeFromUTF8(s) == 0x24); 27 | } 28 | 29 | SECTION("Example2") { 30 | const unsigned char s[]={0xC2, 0xA2, 0}; 31 | REQUIRE(UnicodeFromUTF8(s) == 0xA2); 32 | } 33 | 34 | SECTION("Example3") { 35 | const unsigned char s[]={0xE2, 0x82, 0xAC, 0}; 36 | REQUIRE(UnicodeFromUTF8(s) == 0x20AC); 37 | } 38 | 39 | SECTION("Example4") { 40 | const unsigned char s[]={0xF0, 0x90, 0x8D, 0x88, 0}; 41 | REQUIRE(UnicodeFromUTF8(s) == 0x10348); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /ext/scintilla/test/unit/unitTest.cxx: -------------------------------------------------------------------------------- 1 | // Unit Tests for Scintilla internal data structures 2 | 3 | /* 4 | Currently tested: 5 | SplitVector 6 | Partitioning 7 | RunStyles 8 | ContractionState 9 | CharClassify 10 | Decoration 11 | DecorationList 12 | CellBuffer 13 | UnicodeFromUTF8 14 | 15 | To do: 16 | PerLine * 17 | Range 18 | StyledText 19 | CaseFolder ... 20 | Document 21 | RESearch 22 | Selection 23 | UniConversion 24 | Style 25 | 26 | lexlib: 27 | Accessor 28 | LexAccessor 29 | CharacterSet 30 | OptionSet 31 | PropSetSimple 32 | StyleContext 33 | WordList 34 | */ 35 | 36 | #include 37 | #include 38 | 39 | #include "Platform.h" 40 | 41 | #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file 42 | #include "catch.hpp" 43 | 44 | // Needed for PLATFORM_ASSERT in code being tested 45 | 46 | void Platform::Assert(const char *c, const char *file, int line) { 47 | fprintf(stderr, "Assertion [%s] failed at %s %d\n", c, file, line); 48 | abort(); 49 | } 50 | 51 | void Platform::DebugPrintf(const char *format, ...) { 52 | char buffer[2000]; 53 | va_list pArguments; 54 | va_start(pArguments, format); 55 | vsprintf(buffer, format, pArguments); 56 | va_end(pArguments); 57 | fprintf(stderr, "%s", buffer); 58 | } 59 | -------------------------------------------------------------------------------- /ext/scintilla/test/xite.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import XiteWin 4 | 5 | if __name__ == "__main__": 6 | XiteWin.main("") 7 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/scintilla/version.txt: -------------------------------------------------------------------------------- 1 | 373 2 | -------------------------------------------------------------------------------- /ext/scintilla/win32/CheckD2D.cxx: -------------------------------------------------------------------------------- 1 | // This file is compiled to check whether Direct2D and DirectWrite headers are available. 2 | #include 3 | #include 4 | -------------------------------------------------------------------------------- /ext/scintilla/win32/HanjaDic.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file HanjaDic.h 3 | ** Korean Hanja Dictionary 4 | ** Convert between Korean Hanja and Hangul by COM interface. 5 | **/ 6 | // Copyright 2015 by Neil Hodgson 7 | // The License.txt file describes the conditions under which this software may be distributed. 8 | 9 | #ifndef HANJADIC_H 10 | #define HANJADIC_H 11 | 12 | #ifdef SCI_NAMESPACE 13 | namespace Scintilla { 14 | #endif 15 | 16 | namespace HanjaDict { 17 | 18 | int GetHangulOfHanja(wchar_t *inout); 19 | 20 | } 21 | 22 | #ifdef SCI_NAMESPACE 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /ext/scintilla/win32/PlatWin.h: -------------------------------------------------------------------------------- 1 | // Scintilla source code edit control 2 | /** @file PlatWin.h 3 | ** Implementation of platform facilities on Windows. 4 | **/ 5 | // Copyright 1998-2011 by Neil Hodgson 6 | // The License.txt file describes the conditions under which this software may be distributed. 7 | 8 | #ifndef PLATWIN_H 9 | #define PLATWIN_H 10 | 11 | #ifdef SCI_NAMESPACE 12 | namespace Scintilla { 13 | #endif 14 | 15 | extern void Platform_Initialise(void *hInstance); 16 | extern void Platform_Finalise(bool fromDllMain); 17 | 18 | #if defined(USE_D2D) 19 | extern bool LoadD2D(); 20 | extern ID2D1Factory *pD2DFactory; 21 | extern IDWriteFactory *pIDWriteFactory; 22 | #endif 23 | 24 | #ifdef SCI_NAMESPACE 25 | } 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/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 | #include 6 | 7 | #define VERSION_SCINTILLA "3.7.3" 8 | #define VERSION_WORDS 3, 7, 3, 0 9 | 10 | VS_VERSION_INFO VERSIONINFO 11 | FILEVERSION VERSION_WORDS 12 | PRODUCTVERSION VERSION_WORDS 13 | FILEFLAGSMASK 0x3fL 14 | FILEFLAGS 0 15 | FILEOS VOS_NT_WINDOWS32 16 | FILETYPE VFT_APP 17 | FILESUBTYPE VFT2_UNKNOWN 18 | BEGIN 19 | BLOCK "VarFileInfo" 20 | BEGIN 21 | VALUE "Translation", 0x409, 1200 22 | END 23 | BLOCK "StringFileInfo" 24 | BEGIN 25 | BLOCK "040904b0" 26 | BEGIN 27 | VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0" 28 | VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component\0" 29 | VALUE "FileVersion", VERSION_SCINTILLA "\0" 30 | VALUE "InternalName", "Scintilla\0" 31 | VALUE "LegalCopyright", "Copyright 1998-2012 by Neil Hodgson\0" 32 | VALUE "OriginalFilename", "Scintilla.DLL\0" 33 | VALUE "ProductName", "Scintilla\0" 34 | VALUE "ProductVersion", VERSION_SCINTILLA "\0" 35 | END 36 | END 37 | END 38 | -------------------------------------------------------------------------------- /ext/scintilla/win32/Scintilla.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | Scintilla_DirectFunction -------------------------------------------------------------------------------- /ext/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 | -------------------------------------------------------------------------------- /ext/scintillua.diff: -------------------------------------------------------------------------------- 1 | diff --git a/ext/scintillua/LexLPeg.cxx b/ext/scintillua/LexLPeg.cxx 2 | index ad68ac2..7cc49a5 100644 3 | --- a/ext/scintillua/LexLPeg.cxx 4 | +++ b/ext/scintillua/LexLPeg.cxx 5 | @@ -473,7 +473,7 @@ class LexerLPeg : public ILexer { 6 | // Determine which styles are language whitespace styles 7 | // ([lang]_whitespace). This is necessary for determining which language 8 | // to start lexing with. 9 | - char style_name[50]; 10 | + char style_name[50] = { 0 }; 11 | for (int i = 0; i <= STYLE_MAX; i++) { 12 | PrivateCall(i, reinterpret_cast(style_name)); 13 | ws[i] = strstr(style_name, "whitespace") ? true : false; 14 | @@ -495,7 +495,7 @@ class LexerLPeg : public ILexer { 15 | * @param str The string to copy. 16 | * @return number of bytes needed to hold *str* 17 | */ 18 | - void *StringResult(long lparam, const char *str) { 19 | + void *StringResult(sptr_t lparam, const char *str) { 20 | if (lparam) strcpy(reinterpret_cast(lparam), str); 21 | return reinterpret_cast(strlen(str)); 22 | } 23 | @@ -606,13 +606,13 @@ public: 24 | if (lua_pcall(L, 3, 1, 0) != LUA_OK) l_error(L); 25 | // Style the text from the token table returned. 26 | if (lua_istable(L, -1)) { 27 | - int len = lua_rawlen(L, -1); 28 | + size_t len = lua_rawlen(L, -1); 29 | if (len > 0) { 30 | styler.StartAt(startPos); 31 | styler.StartSegment(startPos); 32 | l_getlexerfield(L, "_TOKENSTYLES"); 33 | // Loop through token-position pairs. 34 | - for (int i = 1; i < len; i += 2) { 35 | + for (int i = 1; i < static_cast(len); i += 2) { 36 | style = STYLE_DEFAULT; 37 | lua_rawgeti(L, -2, i), lua_rawget(L, -2); // _TOKENSTYLES[token] 38 | if (!lua_isnil(L, -1)) style = lua_tointeger(L, -1); 39 | -------------------------------------------------------------------------------- /ext/scintillua/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2007-2017 Mitchell 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 | -------------------------------------------------------------------------------- /ext/scintillua/LexLPeg.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | GetLexerCount 3 | GetLexerName 4 | GetLexerFactory 5 | -------------------------------------------------------------------------------- /ext/scintillua/THANKS.md: -------------------------------------------------------------------------------- 1 | # Thanks 2 | 3 | Thank you everyone for your contributions and feedback. They have helped make 4 | Scintillua better and better over the years. 5 | 6 | ## Code Contributors 7 | 8 | * Alejandro Baez 9 | * Alex Saraci 10 | * Brian Schott 11 | * Carl Sturtivant 12 | * Chris Emerson 13 | * Christian Hesse 14 | * David B. Lamkins 15 | * Heck Fy 16 | * Jason Schindler 17 | * Jeff Stone 18 | * Joshua Krämer 19 | * Klaus Borges 20 | * Larry Hynes 21 | * M Rawash 22 | * Marc André Tanner 23 | * Markus F.X.J. Oberhumer 24 | * Martin Morawetz 25 | * Michael Forney 26 | * Michael T. Richter 27 | * Michel Martens 28 | * Murray Calavera 29 | * Neil Hodgson 30 | * Olivier Guibé 31 | * Peter Odding 32 | * Piotr Orzechowski 33 | * Richard Philips 34 | * Robert Gieseke 35 | * Roberto Ierusalimschy 36 | * S. Gilles 37 | * Stéphane Rivière 38 | * Tymur Gubayev 39 | * Wolfgang Seeberg 40 | 41 | If I have left off your name, please [contact me][]. I am very sorry about that. 42 | 43 | [contact me]: README.html#Contact 44 | -------------------------------------------------------------------------------- /ext/scintillua/doc/.footer.md: -------------------------------------------------------------------------------- 1 | -> (c) 2006-2017 [Mitchell][] mitchell.att.foicica.com <- 2 | 3 | [Mitchell]: http://foicica.com 4 | -------------------------------------------------------------------------------- /ext/scintillua/doc/.header.md: -------------------------------------------------------------------------------- 1 | # ![](images/icon.png) Scintillua 2 | 3 | * [Home](README.html) | 4 | * [Download](http://foicica.com/scintillua/download) | 5 | * [Manual](manual.html) | 6 | * [API](api.html) | 7 | * [Source](http://foicica.com/hg/scintillua) | 8 | * [Stats](http://foicica.com/stats.html#Scintillua) | 9 | * [Mailing List](http://foicica.com/lists) 10 | -------------------------------------------------------------------------------- /ext/scintillua/doc/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintillua/doc/icon.png -------------------------------------------------------------------------------- /ext/scintillua/doc/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dail8859/ScintilluaPlusPlus/22c8450f13ae70d10bc030315da22ffcfa4984a8/ext/scintillua/doc/images/icon.png -------------------------------------------------------------------------------- /ext/scintillua/gen_lexer_props.lua: -------------------------------------------------------------------------------- 1 | #!/usr/bin/lua 2 | 3 | local format, concat = string.format, table.concat 4 | 5 | -- Do not glob these files. (e.g. *.foo) 6 | local noglobs = { 7 | Dockerfile = true, 8 | GNUmakefile = true, 9 | Makefile = true, 10 | makefile = true, 11 | Rakefile = true, 12 | ['Rout.save'] = true, 13 | ['Rout.fail'] = true, 14 | } 15 | 16 | local alt_name = { 17 | actionscript = 'flash', 18 | ansi_c = 'c', 19 | dmd = 'd', 20 | javascript = 'js', 21 | python = 'py', 22 | rstats = 'r', 23 | ruby = 'rb', 24 | } 25 | 26 | -- Process file patterns and lexer definitions from Textadept. 27 | local f = io.open('../textadept/modules/textadept/file_types.lua') 28 | local definitions = f:read('*all'):match('M%.extensions = (%b{})') 29 | f:close() 30 | 31 | local output = {'# Lexer definitions ('} 32 | local lexer, ext, last_lexer 33 | local exts = {} 34 | for ext, lexer in definitions:gmatch("([^,'%]]+)'?%]?='([%w_]+)'") do 35 | if lexer ~= last_lexer and #exts > 0 then 36 | local name = alt_name[last_lexer] or last_lexer 37 | output[#output + 1] = format('file.patterns.%s=%s', name, 38 | concat(exts, ';')) 39 | output[#output + 1] = format('lexer.$(file.patterns.%s)=lpeg_%s', name, 40 | last_lexer) 41 | exts = {} 42 | end 43 | exts[#exts + 1] = not noglobs[ext] and '*.'..ext or ext 44 | last_lexer = lexer 45 | end 46 | local name = alt_name[last_lexer] or last_lexer 47 | output[#output + 1] = format('file.patterns.%s=%s', name, concat(exts, ';')) 48 | output[#output + 1] = format('lexer.$(file.patterns.%s)=lpeg_%s', name, 49 | last_lexer) 50 | output[#output + 1] = '# )' 51 | 52 | -- Write to lpeg.properties. 53 | f = io.open('lexers/lpeg.properties') 54 | local text = f:read('*all') 55 | text = text:gsub('# Lexer definitions %b()', table.concat(output, '\n'), 1) 56 | f:close() 57 | f = io.open('lexers/lpeg.properties', 'wb') 58 | f:write(text) 59 | f:close() 60 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/apl.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2015-2017 David B. Lamkins . See LICENSE. 2 | -- APL LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'apl'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, (P('⍝') + P('#')) * l.nonnewline^0) 15 | 16 | -- Strings. 17 | local sq_str = l.delimited_range("'", false, true) 18 | local dq_str = l.delimited_range('"') 19 | 20 | local string = token(l.STRING, sq_str + dq_str) 21 | 22 | -- Numbers. 23 | local dig = R('09') 24 | local rad = P('.') 25 | local exp = S('eE') 26 | local img = S('jJ') 27 | local sgn = P('¯')^-1 28 | local float = sgn * (dig^0 * rad * dig^1 + dig^1 * rad * dig^0 + dig^1) * 29 | (exp * sgn *dig^1)^-1 30 | local number = token(l.NUMBER, float * img * float + float) 31 | 32 | -- Keywords. 33 | local keyword = token(l.KEYWORD, P('⍞') + P('χ') + P('⍺') + P('⍶') + P('⍵') + 34 | P('⍹') + P('⎕') * R('AZ', 'az')^0) 35 | 36 | -- Names. 37 | local n1l = R('AZ', 'az') 38 | local n1b = P('_') + P('∆') + P('⍙') 39 | local n2l = n1l + R('09') 40 | local n2b = n1b + P('¯') 41 | local n1 = n1l + n1b 42 | local n2 = n2l + n2b 43 | local name = n1 * n2^0 44 | 45 | -- Labels. 46 | local label = token(l.LABEL, name * P(':')) 47 | 48 | -- Variables. 49 | local variable = token(l.VARIABLE, name) 50 | 51 | -- Special. 52 | local special = token(l.TYPE, S('{}[]();') + P('←') + P('→') + P('◊')) 53 | 54 | -- Nabla. 55 | local nabla = token(l.PREPROCESSOR, P('∇') + P('⍫')) 56 | 57 | M._rules = { 58 | {'whitespace', ws}, 59 | {'comment', comment}, 60 | {'string', string}, 61 | {'number', number}, 62 | {'keyword', keyword}, 63 | {'label', label}, 64 | {'variable', variable}, 65 | {'special', special}, 66 | {'nabla', nabla}, 67 | } 68 | 69 | return M 70 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/asp.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- ASP LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'asp'} 9 | 10 | -- Embedded in HTML. 11 | local html = l.load('html') 12 | 13 | -- Embedded VB. 14 | local vb = l.load('vb') 15 | local vb_start_rule = token('asp_tag', '<%' * P('=')^-1) 16 | local vb_end_rule = token('asp_tag', '%>') 17 | l.embed_lexer(html, vb, vb_start_rule, vb_end_rule) 18 | 19 | -- Embedded VBScript. 20 | local vbs = l.load('vbscript') 21 | local script_element = word_match({'script'}, nil, html.case_insensitive_tags) 22 | local vbs_start_rule = #(P('<') * script_element * (P(function(input, index) 23 | if input:find('^%s+language%s*=%s*(["\'])vbscript%1', index) or 24 | input:find('^%s+type%s*=%s*(["\'])text/vbscript%1', index) then 25 | return index 26 | end 27 | end) + '>')) * html.embed_start_tag -- 30 | l.embed_lexer(html, vbs, vbs_start_rule, vbs_end_rule) 31 | 32 | M._tokenstyles = { 33 | asp_tag = l.STYLE_EMBEDDED 34 | } 35 | 36 | local _foldsymbols = html._foldsymbols 37 | _foldsymbols._patterns[#_foldsymbols._patterns + 1] = '<%%' 38 | _foldsymbols._patterns[#_foldsymbols._patterns + 1] = '%%>' 39 | _foldsymbols.asp_tag = {['<%'] = 1, ['%>'] = -1} 40 | M._foldsymbols = _foldsymbols 41 | 42 | return M 43 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/bibtex.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Bibtex LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'bibtex'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Strings. 14 | local string = token(l.STRING, l.delimited_range('"') + 15 | l.delimited_range('{}', false, true, true)) 16 | 17 | -- Fields. 18 | local field = token('field', word_match{ 19 | 'author', 'title', 'journal', 'year', 'volume', 'number', 'pages', 'month', 20 | 'note', 'key', 'publisher', 'editor', 'series', 'address', 'edition', 21 | 'howpublished', 'booktitle', 'organization', 'chapter', 'school', 22 | 'institution', 'type', 'isbn', 'issn', 'affiliation', 'issue', 'keyword', 23 | 'url' 24 | }) 25 | 26 | -- Identifiers. 27 | local identifier = token(l.IDENTIFIER, l.word) 28 | 29 | -- Operators. 30 | local operator = token(l.OPERATOR, S(',=')) 31 | 32 | M._rules = { 33 | {'whitespace', ws}, 34 | {'field', field}, 35 | {'identifier', identifier}, 36 | {'string', string}, 37 | {'operator', operator}, 38 | } 39 | 40 | -- Embedded in Latex. 41 | local latex = l.load('latex') 42 | 43 | -- Embedded Bibtex. 44 | local entry = token('entry', P('@') * word_match({ 45 | 'book', 'article', 'booklet', 'conference', 'inbook', 'incollection', 46 | 'inproceedings', 'manual', 'mastersthesis', 'lambda', 'misc', 'phdthesis', 47 | 'proceedings', 'techreport', 'unpublished' 48 | }, nil, true)) 49 | local bibtex_start_rule = entry * ws^0 * token(l.OPERATOR, P('{')) 50 | local bibtex_end_rule = token(l.OPERATOR, P('}')) 51 | l.embed_lexer(latex, M, bibtex_start_rule, bibtex_end_rule) 52 | 53 | M._tokenstyles = { 54 | field = l.STYLE_CONSTANT, 55 | entry = l.STYLE_PREPROCESSOR 56 | } 57 | 58 | return M 59 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/container.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Container LPeg lexer. 3 | -- This is SciTE's plain text lexer. 4 | 5 | local M = {_NAME = 'container'} 6 | 7 | return M 8 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/context.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Robert Gieseke. See LICENSE. 2 | -- ConTeXt LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'context'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, '%' * l.nonnewline^0) 15 | 16 | -- Commands. 17 | local command = token(l.KEYWORD, '\\' * (l.alpha^1 + S('#$&~_^%{}'))) 18 | 19 | -- Sections. 20 | local section = token('section', '\\' * word_match{ 21 | 'part', 'chapter', 'section', 'subsection', 'subsubsection', 'title', 22 | 'subject', 'subsubject', 'subsubsubject' 23 | }) 24 | 25 | -- ConTeXt environments. 26 | local environment = token('environment', '\\' * (P('start') + 'stop') * l.word) 27 | 28 | -- Operators. 29 | local operator = token(l.OPERATOR, S('$&#{}[]')) 30 | 31 | M._rules = { 32 | {'whitespace', ws}, 33 | {'comment', comment}, 34 | {'environment', environment}, 35 | {'section', section}, 36 | {'keyword', command}, 37 | {'operator', operator}, 38 | } 39 | 40 | M._tokenstyles = { 41 | environment = l.STYLE_KEYWORD, 42 | section = l.STYLE_CLASS 43 | } 44 | 45 | M._foldsymbols = { 46 | _patterns = {'\\start', '\\stop', '[{}]', '%%'}, 47 | ['environment'] = {['\\start'] = 1, ['\\stop'] = -1}, 48 | [l.OPERATOR] = {['{'] = 1, ['}'] = -1}, 49 | [l.COMMENT] = {['%'] = l.fold_line_comments('%')} 50 | } 51 | 52 | -- Embedded Lua. 53 | local luatex = l.load('lua') 54 | local luatex_start_rule = #P('\\startluacode') * environment 55 | local luatex_end_rule = #P('\\stopluacode') * environment 56 | l.embed_lexer(M, luatex, luatex_start_rule, luatex_end_rule) 57 | 58 | 59 | return M 60 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/desktop.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Desktop Entry LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'desktop'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, '#' * l.nonnewline^0) 15 | 16 | -- Strings. 17 | local string = token(l.STRING, l.delimited_range('"')) 18 | 19 | -- Group headers. 20 | local group_header = l.starts_line(token(l.STRING, 21 | l.delimited_range('[]', false, true))) 22 | 23 | -- Numbers. 24 | local number = token(l.NUMBER, (l.float + l.integer)) 25 | 26 | -- Keywords. 27 | local keyword = token(l.KEYWORD, word_match{'true', 'false'}) 28 | 29 | -- Locales. 30 | local locale = token(l.CLASS, l.delimited_range('[]', false, true)) 31 | 32 | -- Keys. 33 | local key = token(l.VARIABLE, word_match{ 34 | 'Type', 'Version', 'Name', 'GenericName', 'NoDisplay', 'Comment', 'Icon', 35 | 'Hidden', 'OnlyShowIn', 'NotShowIn', 'TryExec', 'Exec', 'Exec', 'Path', 36 | 'Terminal', 'MimeType', 'Categories', 'StartupNotify', 'StartupWMClass', 'URL' 37 | }) 38 | 39 | -- Field codes. 40 | local code = l.token(l.CONSTANT, P('%') * S('fFuUdDnNickvm')) 41 | 42 | -- Identifiers. 43 | local identifier = l.token(l.IDENTIFIER, l.alpha * (l.alnum + S('_-'))^0) 44 | 45 | -- Operators. 46 | local operator = token(l.OPERATOR, S('=')) 47 | 48 | M._rules = { 49 | {'whitespace', ws}, 50 | {'keyword', keyword}, 51 | {'key', key}, 52 | {'identifier', identifier}, 53 | {'group_header', group_header}, 54 | {'locale', locale}, 55 | {'string', string}, 56 | {'comment', comment}, 57 | {'number', number}, 58 | {'code', code}, 59 | {'operator', operator}, 60 | } 61 | 62 | return M 63 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/diff.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Diff LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'diff'} 9 | 10 | -- Text, separators, and file headers. 11 | local index = token(l.COMMENT, 'Index: ' * l.any^0 * P(-1)) 12 | local separator = token(l.COMMENT, ('---' + P('*')^4 + P('=')^1) * l.space^0 * 13 | -1) 14 | local header = token('header', (P('*** ') + '--- ' + '+++ ') * l.any^1) 15 | 16 | -- Location. 17 | local location = token(l.NUMBER, ('@@' + l.digit^1 + '****') * l.any^1) 18 | 19 | -- Additions, deletions, and changes. 20 | local addition = token('addition', S('>+') * l.any^0) 21 | local deletion = token('deletion', S('<-') * l.any^0) 22 | local change = token('change', '! ' * l.any^0) 23 | 24 | M._rules = { 25 | {'index', index}, 26 | {'separator', separator}, 27 | {'header', header}, 28 | {'location', location}, 29 | {'addition', addition}, 30 | {'deletion', deletion}, 31 | {'change', change}, 32 | {'any_line', token('default', l.any^1)}, 33 | } 34 | 35 | M._tokenstyles = { 36 | header = l.STYLE_COMMENT, 37 | addition = 'fore:$(color.green)', 38 | deletion = 'fore:$(color.red)', 39 | change = 'fore:$(color.yellow)' 40 | } 41 | 42 | M._LEXBYLINE = true 43 | 44 | return M 45 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/dockerfile.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2016-2017 Alejandro Baez (https://keybase.io/baez). See LICENSE. 2 | -- Dockerfile LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'dockerfile'} 9 | 10 | -- Whitespace 11 | local indent = #l.starts_line(S(' \t')) * 12 | (token(l.WHITESPACE, ' ') + token('indent_error', '\t'))^1 13 | local ws = token(l.WHITESPACE, S(' \t')^1 + l.newline^1) 14 | 15 | -- Comments. 16 | local comment = token(l.COMMENT, '#' * l.nonnewline^0) 17 | 18 | -- Strings. 19 | local sq_str = l.delimited_range("'", false, true) 20 | local dq_str = l.delimited_range('"') 21 | local string = token(l.STRING, sq_str + dq_str) 22 | 23 | -- Numbers. 24 | local number = token(l.NUMBER, l.float + l.integer) 25 | 26 | -- Keywords. 27 | local keyword = token(l.KEYWORD, word_match{ 28 | 'ADD', 'ARG', 'CMD', 'COPY', 'ENTRYPOINT', 'ENV', 'EXPOSE', 'FROM', 'LABEL', 29 | 'MAINTAINER', 'ONBUILD', 'RUN', 'STOPSIGNAL', 'USER', 'VOLUME', 'WORKDIR' 30 | }) 31 | 32 | -- Identifiers. 33 | local identifier = token(l.IDENTIFIER, l.word) 34 | 35 | -- Variable. 36 | local variable = token(l.VARIABLE, 37 | S('$')^1 * (S('{')^1 * l.word * S('}')^1 + l.word)) 38 | 39 | -- Operators. 40 | local operator = token(l.OPERATOR, S('\\[],=:{}')) 41 | 42 | M._rules = { 43 | {'whitespace', ws}, 44 | {'keyword', keyword}, 45 | {'variable', variable}, 46 | {'identifier', identifier}, 47 | {'string', string}, 48 | {'comment', comment}, 49 | {'number', number}, 50 | {'operator', operator}, 51 | } 52 | 53 | M._FOLDBYINDENTATION = true 54 | 55 | return M 56 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/faust.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2015-2017 David B. Lamkins . See LICENSE. 2 | -- Faust LPeg lexer, see http://faust.grame.fr/ 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'faust'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local line_comment = '//' * l.nonnewline^0 15 | local block_comment = '/*' * (l.any - '*/')^0 * P('*/')^-1 16 | local comment = token(l.COMMENT, line_comment + block_comment) 17 | 18 | -- Strings. 19 | local string = token(l.STRING, l.delimited_range('"', true)) 20 | 21 | -- Numbers. 22 | local int = R('09')^1 23 | local rad = P('.') 24 | local exp = (P('e') * S('+-')^-1 * int)^-1 25 | local flt = int * (rad * int)^-1 * exp + int^-1 * rad * int * exp 26 | local number = token(l.NUMBER, flt + int) 27 | 28 | -- Keywords. 29 | local keyword = token(l.KEYWORD, word_match{ 30 | 'declare', 'import', 'mdoctags', 'dependencies', 'distributed', 'inputs', 31 | 'outputs', 'par', 'seq', 'sum', 'prod', 'xor', 'with', 'environment', 32 | 'library', 'component', 'ffunction', 'fvariable', 'fconstant', 'int', 'float', 33 | 'case', 'waveform', 'h:', 'v:', 't:' 34 | }) 35 | 36 | -- Identifiers. 37 | local identifier = token(l.IDENTIFIER, l.word) 38 | 39 | -- Operators. 40 | local punct = S('+-/*%<>~!=^&|?~:;,.()[]{}@#$`\\\'') 41 | local operator = token(l.OPERATOR, punct) 42 | 43 | -- Pragmas. 44 | local mdoc = P('') * (l.any - P(''))^0 * P('') 45 | local pragma = token(l.PREPROCESSOR, mdoc) 46 | 47 | M._rules = { 48 | {'whitespace', ws}, 49 | {'comment', comment}, 50 | {'pragma', pragma}, 51 | {'keyword', keyword}, 52 | {'number', number}, 53 | {'operator', operator}, 54 | {'identifier', identifier}, 55 | {'string', string}, 56 | } 57 | 58 | return M 59 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/forth.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Forth LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'forth'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local line_comment = S('|\\') * l.nonnewline^0 15 | local block_comment = '(*' * (l.any - '*)')^0 * P('*)')^-1 16 | local comment = token(l.COMMENT, line_comment + block_comment) 17 | 18 | -- Strings. 19 | local s_str = 's' * l.delimited_range('"', true, true) 20 | local dot_str = '.' * l.delimited_range('"', true, true) 21 | local f_str = 'f' * l.delimited_range('"', true, true) 22 | local dq_str = l.delimited_range('"', true, true) 23 | local string = token(l.STRING, s_str + dot_str + f_str + dq_str) 24 | 25 | -- Numbers. 26 | local number = token(l.NUMBER, P('-')^-1 * l.digit^1 * (S('./') * l.digit^1)^-1) 27 | 28 | -- Keywords. 29 | local keyword = token(l.KEYWORD, word_match({ 30 | 'swap', 'drop', 'dup', 'nip', 'over', 'rot', '-rot', '2dup', '2drop', '2over', 31 | '2swap', '>r', 'r>', 32 | 'and', 'or', 'xor', '>>', '<<', 'not', 'negate', 'mod', '/mod', '1+', '1-', 33 | 'base', 'hex', 'decimal', 'binary', 'octal', 34 | '@', '!', 'c@', 'c!', '+!', 'cell+', 'cells', 'char+', 'chars', 35 | 'create', 'does>', 'variable', 'variable,', 'literal', 'last', '1,', '2,', 36 | '3,', ',', 'here', 'allot', 'parse', 'find', 'compile', 37 | -- Operators. 38 | 'if', '=if', 'if', '<>if', 'then', 'repeat', 'until', 'forth', 'macro' 39 | }, '2><1-@!+3,=')) 40 | 41 | -- Identifiers. 42 | local identifier = token(l.IDENTIFIER, (l.alnum + S('+-*=<>.?/\'%,_$'))^1) 43 | 44 | -- Operators. 45 | local operator = token(l.OPERATOR, S(':;<>+*-/()[]')) 46 | 47 | M._rules = { 48 | {'whitespace', ws}, 49 | {'keyword', keyword}, 50 | {'string', string}, 51 | {'identifier', identifier}, 52 | {'comment', comment}, 53 | {'number', number}, 54 | {'operator', operator}, 55 | } 56 | 57 | return M 58 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/gap.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Gap LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'gap'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, '#' * l.nonnewline^0) 15 | 16 | -- Strings. 17 | local sq_str = l.delimited_range("'", true) 18 | local dq_str = l.delimited_range('"', true) 19 | local string = token(l.STRING, sq_str + dq_str) 20 | 21 | -- Numbers. 22 | local number = token(l.NUMBER, l.digit^1 * -l.alpha) 23 | 24 | -- Keywords. 25 | local keyword = token(l.KEYWORD, word_match{ 26 | 'and', 'break', 'continue', 'do', 'elif', 'else', 'end', 'fail', 'false', 27 | 'fi', 'for', 'function', 'if', 'in', 'infinity', 'local', 'not', 'od', 'or', 28 | 'rec', 'repeat', 'return', 'then', 'true', 'until', 'while' 29 | }) 30 | 31 | -- Identifiers. 32 | local identifier = token(l.IDENTIFIER, l.word) 33 | 34 | -- Operators. 35 | local operator = token(l.OPERATOR, S('*+-,./:;<=>~^#()[]{}')) 36 | 37 | M._rules = { 38 | {'whitespace', ws}, 39 | {'keyword', keyword}, 40 | {'identifier', identifier}, 41 | {'string', string}, 42 | {'comment', comment}, 43 | {'number', number}, 44 | {'operator', operator}, 45 | } 46 | 47 | M._foldsymbols = { 48 | _patterns = {'[a-z]+', '#'}, 49 | [l.KEYWORD] = { 50 | ['function'] = 1, ['end'] = -1, ['do'] = 1, od = -1, ['if'] = 1, fi = -1, 51 | ['repeat'] = 1, ['until'] = -1 52 | }, 53 | [l.COMMENT] = {['#'] = l.fold_line_comments('#')} 54 | } 55 | 56 | return M 57 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/gettext.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Gettext LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'gettext'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, '#' * S(': .~') * l.nonnewline^0) 15 | 16 | -- Strings. 17 | local string = token(l.STRING, l.delimited_range('"', true)) 18 | 19 | -- Keywords. 20 | local keyword = token(l.KEYWORD, word_match({ 21 | 'msgid', 'msgid_plural', 'msgstr', 'fuzzy', 'c-format', 'no-c-format' 22 | }, '-', true)) 23 | 24 | -- Identifiers. 25 | local identifier = token(l.IDENTIFIER, l.word) 26 | 27 | -- Variables. 28 | local variable = token(l.VARIABLE, S('%$@') * l.word) 29 | 30 | M._rules = { 31 | {'whitespace', ws}, 32 | {'comment', comment}, 33 | {'string', string}, 34 | {'keyword', keyword}, 35 | {'identifier', identifier}, 36 | {'variable', variable}, 37 | } 38 | 39 | return M 40 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/gherkin.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2015-2017 Jason Schindler. See LICENSE. 2 | -- Gherkin (https://github.com/cucumber/cucumber/wiki/Gherkin) LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'gherkin'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Tags. 14 | local tag = token('tag', '@' * l.word^0) 15 | 16 | -- Comments. 17 | local comment = token(l.COMMENT, '#' * l.nonnewline^0) 18 | 19 | -- Strings. 20 | local doc_str = '"""' * (l.any - '"""')^0 * P('"""')^-1 21 | local dq_str = l.delimited_range('"') 22 | 23 | local string = token(l.STRING, doc_str + dq_str) 24 | 25 | -- Placeholders. 26 | local placeholder = token('placeholder', l.nested_pair('<', '>')) 27 | 28 | -- Keywords. 29 | local keyword = token(l.KEYWORD, word_match{ 30 | 'Given', 'When', 'Then', 'And', 'But' 31 | }) 32 | 33 | -- Identifiers. 34 | local identifier = token(l.KEYWORD, P('Scenario Outline') + word_match{ 35 | 'Feature', 'Background', 'Scenario', 'Scenarios', 'Examples' 36 | }) 37 | 38 | -- Examples. 39 | local example = token('example', '|' * l.nonnewline^0) 40 | 41 | -- Numbers. 42 | local number = token(l.NUMBER, l.float + l.integer) 43 | 44 | M._rules = { 45 | {'whitespace', ws}, 46 | {'comment', comment}, 47 | {'tag', tag}, 48 | {'placeholder', placeholder}, 49 | {'keyword', keyword}, 50 | {'identifier', identifier}, 51 | {'example', example}, 52 | {'string', string}, 53 | {'number', number} 54 | } 55 | 56 | M._tokenstyles = { 57 | tag = l.STYLE_LABEL, 58 | placeholder = l.STYLE_NUMBER, 59 | example = l.STYLE_NUMBER 60 | } 61 | 62 | M._FOLDBYINDENTATION = true 63 | 64 | return M 65 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/gtkrc.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Gtkrc LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'gtkrc'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, '#' * l.nonnewline^0) 15 | 16 | -- Strings. 17 | local sq_str = l.delimited_range("'", true) 18 | local dq_str = l.delimited_range('"', true) 19 | local string = token(l.STRING, sq_str + dq_str) 20 | 21 | -- Numbers. 22 | local number = token(l.NUMBER, l.digit^1 * ('.' * l.digit^1)^-1) 23 | 24 | -- Keywords. 25 | local keyword = token(l.KEYWORD, word_match{ 26 | 'binding', 'class', 'include', 'module_path', 'pixmap_path', 'im_module_file', 27 | 'style', 'widget', 'widget_class' 28 | }) 29 | 30 | -- Variables. 31 | local variable = token(l.VARIABLE, word_match{ 32 | 'bg', 'fg', 'base', 'text', 'xthickness', 'ythickness', 'bg_pixmap', 'font', 33 | 'fontset', 'font_name', 'stock', 'color', 'engine' 34 | }) 35 | 36 | -- States. 37 | local state = token(l.CONSTANT, word_match{ 38 | 'ACTIVE', 'SELECTED', 'NORMAL', 'PRELIGHT', 'INSENSITIVE', 'TRUE', 'FALSE' 39 | }) 40 | 41 | -- Functions. 42 | local func = token(l.FUNCTION, word_match{ 43 | 'mix', 'shade', 'lighter', 'darker' 44 | }) 45 | 46 | -- Identifiers. 47 | local identifier = token(l.IDENTIFIER, l.alpha * (l.alnum + S('_-'))^0) 48 | 49 | -- Operators. 50 | local operator = token(l.OPERATOR, S(':=,*()[]{}')) 51 | 52 | M._rules = { 53 | {'whitespace', ws}, 54 | {'keyword', keyword}, 55 | {'variable', variable}, 56 | {'state', state}, 57 | {'function', func}, 58 | {'identifier', identifier}, 59 | {'string', string}, 60 | {'comment', comment}, 61 | {'number', number}, 62 | {'operator', operator}, 63 | } 64 | 65 | M._foldsymbols = { 66 | _patterns = {'[{}]', '#'}, 67 | [l.OPERATOR] = {['{'] = 1, ['}'] = -1}, 68 | [l.COMMENT] = {['#'] = l.fold_line_comments('#')} 69 | } 70 | 71 | return M 72 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/haskell.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Haskell LPeg lexer. 3 | -- Modified by Alex Suraci. 4 | 5 | local l = require('lexer') 6 | local token, word_match = l.token, l.word_match 7 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 8 | 9 | local M = {_NAME = 'haskell'} 10 | 11 | -- Whitespace. 12 | local ws = token(l.WHITESPACE, l.space^1) 13 | 14 | -- Comments. 15 | local line_comment = '--' * l.nonnewline_esc^0 16 | local block_comment = '{-' * (l.any - '-}')^0 * P('-}')^-1 17 | local comment = token(l.COMMENT, line_comment + block_comment) 18 | 19 | -- Strings. 20 | local string = token(l.STRING, l.delimited_range('"')) 21 | 22 | -- Chars. 23 | local char = token(l.STRING, l.delimited_range("'", true)) 24 | 25 | -- Numbers. 26 | local number = token(l.NUMBER, l.float + l.integer) 27 | 28 | -- Keywords. 29 | local keyword = token(l.KEYWORD, word_match{ 30 | 'case', 'class', 'data', 'default', 'deriving', 'do', 'else', 'if', 'import', 31 | 'in', 'infix', 'infixl', 'infixr', 'instance', 'let', 'module', 'newtype', 32 | 'of', 'then', 'type', 'where', '_', 'as', 'qualified', 'hiding' 33 | }) 34 | 35 | -- Identifiers. 36 | local word = (l.alnum + S("._'#"))^0 37 | local identifier = token(l.IDENTIFIER, (l.alpha + '_') * word) 38 | 39 | -- Operators. 40 | local op = l.punct - S('()[]{}') 41 | local operator = token(l.OPERATOR, op) 42 | 43 | -- Types & type constructors. 44 | local constructor = token(l.TYPE, (l.upper * word) + (P(":") * (op^1 - P(":")))) 45 | 46 | M._rules = { 47 | {'whitespace', ws}, 48 | {'keyword', keyword}, 49 | {'type', constructor}, 50 | {'identifier', identifier}, 51 | {'string', string}, 52 | {'char', char}, 53 | {'comment', comment}, 54 | {'number', number}, 55 | {'operator', operator}, 56 | } 57 | 58 | M._FOLDBYINDENTATION = true 59 | 60 | return M 61 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/ini.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Ini LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'ini'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, l.starts_line(S(';#')) * l.nonnewline^0) 15 | 16 | -- Strings. 17 | local sq_str = l.delimited_range("'") 18 | local dq_str = l.delimited_range('"') 19 | local label = l.delimited_range('[]', true, true) 20 | local string = token(l.STRING, sq_str + dq_str + label) 21 | 22 | -- Numbers. 23 | local dec = l.digit^1 * ('_' * l.digit^1)^0 24 | local oct_num = '0' * S('01234567_')^1 25 | local integer = S('+-')^-1 * (l.hex_num + oct_num + dec) 26 | local number = token(l.NUMBER, (l.float + integer)) 27 | 28 | -- Keywords. 29 | local keyword = token(l.KEYWORD, word_match{ 30 | 'true', 'false', 'on', 'off', 'yes', 'no' 31 | }) 32 | 33 | -- Identifiers. 34 | local word = (l.alpha + '_') * (l.alnum + S('_.'))^0 35 | local identifier = token(l.IDENTIFIER, word) 36 | 37 | -- Operators. 38 | local operator = token(l.OPERATOR, '=') 39 | 40 | M._rules = { 41 | {'whitespace', ws}, 42 | {'keyword', keyword}, 43 | {'identifier', identifier}, 44 | {'string', string}, 45 | {'comment', comment}, 46 | {'number', number}, 47 | {'operator', operator}, 48 | } 49 | 50 | M._LEXBYLINE = true 51 | 52 | return M 53 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/io_lang.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Io LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'io_lang'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local line_comment = (P('#') + '//') * l.nonnewline^0 15 | local block_comment = '/*' * (l.any - '*/')^0 * P('*/')^-1 16 | local comment = token(l.COMMENT, line_comment + block_comment) 17 | 18 | -- Strings. 19 | local sq_str = l.delimited_range("'") 20 | local dq_str = l.delimited_range('"') 21 | local tq_str = '"""' * (l.any - '"""')^0 * P('"""')^-1 22 | local string = token(l.STRING, tq_str + sq_str + dq_str) 23 | 24 | -- Numbers. 25 | local number = token(l.NUMBER, l.float + l.integer) 26 | 27 | -- Keywords. 28 | local keyword = token(l.KEYWORD, word_match{ 29 | 'block', 'method', 'while', 'foreach', 'if', 'else', 'do', 'super', 'self', 30 | 'clone', 'proto', 'setSlot', 'hasSlot', 'type', 'write', 'print', 'forward' 31 | }) 32 | 33 | -- Types. 34 | local type = token(l.TYPE, word_match{ 35 | 'Block', 'Buffer', 'CFunction', 'Date', 'Duration', 'File', 'Future', 'List', 36 | 'LinkedList', 'Map', 'Nop', 'Message', 'Nil', 'Number', 'Object', 'String', 37 | 'WeakLink' 38 | }) 39 | 40 | -- Identifiers. 41 | local identifier = token(l.IDENTIFIER, l.word) 42 | 43 | -- Operators. 44 | local operator = token(l.OPERATOR, S('`~@$%^&*-+/=\\<>?.,:;()[]{}')) 45 | 46 | M._rules = { 47 | {'whitespace', ws}, 48 | {'keyword', keyword}, 49 | {'type', type}, 50 | {'identifier', identifier}, 51 | {'string', string}, 52 | {'comment', comment}, 53 | {'number', number}, 54 | {'operator', operator}, 55 | } 56 | 57 | M._foldsymbols = { 58 | _patterns = {'[%(%)]', '/%*', '%*/', '#', '//'}, 59 | [l.OPERATOR] = {['('] = 1, [')'] = -1}, 60 | [l.COMMENT] = { 61 | ['/*'] = 1, ['*/'] = -1, ['#'] = l.fold_line_comments('#'), 62 | ['//'] = l.fold_line_comments('//') 63 | } 64 | } 65 | 66 | return M 67 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/json.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Brian "Sir Alaran" Schott. See LICENSE. 2 | -- JSON LPeg lexer. 3 | -- Based off of lexer code by Mitchell. 4 | 5 | local l = require('lexer') 6 | local token, word_match = l.token, l.word_match 7 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 8 | 9 | local M = {_NAME = 'json'} 10 | 11 | -- Whitespace. 12 | local ws = token(l.WHITESPACE, l.space^1) 13 | 14 | -- Comments. 15 | local comment = token(l.COMMENT, '/*' * (l.any - '*/')^0 * P('*/')^-1) 16 | 17 | -- Strings. 18 | local sq_str = P('u')^-1 * l.delimited_range("'", true) 19 | local dq_str = P('U')^-1 * l.delimited_range('"', true) 20 | local string = token(l.STRING, sq_str + dq_str) 21 | 22 | -- Numbers. 23 | local integer = S('+-')^-1 * l.digit^1 * S('Ll')^-1 24 | local number = token(l.NUMBER, l.float + integer) 25 | 26 | -- Keywords. 27 | local keyword = token(l.KEYWORD, word_match{"true", "false", "null"}) 28 | 29 | -- Operators. 30 | local operator = token(l.OPERATOR, S('[]{}:,')) 31 | 32 | M._rules = { 33 | {'whitespace', ws}, 34 | {'comment', comment}, 35 | {'string', string}, 36 | {'number', number}, 37 | {'keyword', keyword}, 38 | {'operator', operator}, 39 | } 40 | 41 | M._foldsymbols = { 42 | _patterns = {'[%[%]{}]', '/%*', '%*/'}, 43 | [l.OPERATOR] = {['['] = 1, [']'] = -1, ['{'] = 1, ['}'] = -1}, 44 | [l.COMMENT] = {['/*'] = 1, ['*/'] = -1} 45 | } 46 | 47 | return M 48 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/jsp.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- JSP LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'jsp'} 9 | 10 | -- Embedded in HTML. 11 | local html = l.load('html') 12 | 13 | -- Embedded Java. 14 | local java = l.load('java') 15 | local java_start_rule = token('jsp_tag', '<%' * P('=')^-1) 16 | local java_end_rule = token('jsp_tag', '%>') 17 | l.embed_lexer(html, java, java_start_rule, java_end_rule, true) 18 | 19 | M._tokenstyles = { 20 | jsp_tag = l.STYLE_EMBEDDED 21 | } 22 | 23 | local _foldsymbols = html._foldsymbols 24 | _foldsymbols._patterns[#_foldsymbols._patterns + 1] = '<%%' 25 | _foldsymbols._patterns[#_foldsymbols._patterns + 1] = '%%>' 26 | _foldsymbols.jsp_tag = {['<%'] = 1, ['%>'] = -1} 27 | M._foldsymbols = _foldsymbols 28 | 29 | return M 30 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/ledger.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2015-2017 Charles Lehner. See LICENSE. 2 | -- ledger journal LPeg lexer, see http://www.ledger-cli.org/ 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'ledger'} 9 | 10 | local delim = P('\t') + P(' ') 11 | 12 | -- Whitespace. 13 | local ws = token(l.WHITESPACE, l.space^1) 14 | 15 | -- Comments. 16 | local comment = token(l.COMMENT, S(';#') * l.nonnewline^0) 17 | 18 | -- Strings. 19 | local sq_str = l.delimited_range("'") 20 | local dq_str = l.delimited_range('"') 21 | local label = l.delimited_range('[]', true, true) 22 | local string = token(l.STRING, sq_str + dq_str + label) 23 | 24 | -- Date. 25 | local date = token(l.CONSTANT, l.starts_line((l.digit + S('/-')) ^1)) 26 | 27 | -- Account. 28 | local account = token(l.VARIABLE, 29 | l.starts_line(S(' \t')^1 * (l.print - delim)^1)) 30 | 31 | -- Amount. 32 | local amount = token(l.NUMBER, delim * (1 - S(';\r\n'))^1) 33 | 34 | -- Automated transactions. 35 | local auto_tx = token(l.PREPROCESSOR, l.starts_line(S('=~') * l.nonnewline^0)) 36 | 37 | -- Directives. 38 | local directive_word = word_match{ 39 | 'account', 'alias', 'assert', 'bucket', 'capture', 'check', 'comment', 40 | 'commodity', 'define', 'end', 'fixed', 'endfixed', 'include', 'payee', 41 | 'apply', 'tag', 'test', 'year' 42 | } + S('AYNDCIiOobh') 43 | local directive = token(l.KEYWORD, l.starts_line(S('!@')^-1 * directive_word)) 44 | 45 | M._rules = { 46 | {'account', account}, 47 | {'amount', amount}, 48 | {'comment', comment}, 49 | {'whitespace', ws}, 50 | {'date', date}, 51 | {'auto_tx', auto_tx}, 52 | {'directive', directive}, 53 | } 54 | 55 | M._LEXBYLINE = true 56 | 57 | return M 58 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/less.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Robert Gieseke. See LICENSE. 2 | -- Less CSS LPeg lexer. 3 | -- http://lesscss.org 4 | 5 | local l = require('lexer') 6 | local token = l.token 7 | local S = lpeg.S 8 | 9 | local M = {_NAME = 'less'} 10 | 11 | -- Line comments. 12 | local line_comment = token(l.COMMENT, '//' * l.nonnewline^0) 13 | 14 | -- Variables. 15 | local variable = token(l.VARIABLE, '@' * (l.alnum + S('_-{}'))^1) 16 | 17 | local css = l.load('css') 18 | local _rules = css._rules 19 | table.insert(_rules, #_rules - 1, {'line_comment', line_comment}) 20 | table.insert(_rules, #_rules - 1, {'variable', variable}) 21 | M._rules = _rules 22 | 23 | M._tokenstyles = css._tokenstyles 24 | 25 | M._foldsymbols = css._foldsymbols 26 | 27 | return M 28 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/lilypond.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Robert Gieseke. See LICENSE. 2 | -- Lilypond LPeg lexer. 3 | -- TODO Embed Scheme; Notes?, Numbers? 4 | 5 | local l = require('lexer') 6 | local token, word_match = l.token, l.word_match 7 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 8 | 9 | local M = {_NAME = 'lilypond'} 10 | 11 | -- Whitespace. 12 | local ws = token(l.WHITESPACE, l.space^1) 13 | 14 | -- Comments. 15 | local line_comment = '%' * l.nonnewline^0 16 | -- TODO: block comment. 17 | local comment = token(l.COMMENT, line_comment) 18 | 19 | -- Strings. 20 | local string = token(l.STRING, l.delimited_range('"', false, true)) 21 | 22 | -- Keywords, commands. 23 | local keyword = token(l.KEYWORD, '\\' * l.word) 24 | 25 | -- Identifiers. 26 | local identifier = token(l.IDENTIFIER, l.word) 27 | 28 | -- Operators. 29 | local operator = token(l.OPERATOR, S("{}'~<>|")) 30 | 31 | M._rules = { 32 | {'whitespace', ws}, 33 | {'comment', comment}, 34 | {'string', string}, 35 | {'keyword', keyword}, 36 | {'operator', operator}, 37 | {'identifier', identifier}, 38 | } 39 | 40 | return M 41 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/litcoffee.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Robert Gieseke. See LICENSE. 2 | -- Literate CoffeeScript LPeg lexer. 3 | -- http://coffeescript.org/#literate 4 | 5 | local l = require('lexer') 6 | local token = l.token 7 | local P = lpeg.P 8 | 9 | local M = {_NAME = 'litcoffee'} 10 | 11 | -- Embedded in Markdown. 12 | local markdown = l.load('markdown') 13 | M._lexer = markdown -- ensure markdown's rules are loaded, not HTML's 14 | 15 | -- Embedded CoffeeScript. 16 | local coffeescript = l.load('coffeescript') 17 | local coffee_start_rule = token(l.STYLE_EMBEDDED, (P(' ')^4 + P('\t'))) 18 | local coffee_end_rule = token(l.STYLE_EMBEDDED, l.newline) 19 | l.embed_lexer(markdown, coffeescript, coffee_start_rule, coffee_end_rule) 20 | 21 | return M 22 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/man.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2015-2017 David B. Lamkins . See LICENSE. 2 | -- man/roff LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'man'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Markup. 14 | local rule1 = token(l.STRING, 15 | P('.') * (P('B') * P('R')^-1 + P('I') * P('PR')^-1) * 16 | l.nonnewline^0) 17 | local rule2 = token(l.NUMBER, P('.') * S('ST') * P('H') * l.nonnewline^0) 18 | local rule3 = token(l.KEYWORD, 19 | P('.br') + P('.DS') + P('.RS') + P('.RE') + P('.PD')) 20 | local rule4 = token(l.LABEL, P('.') * (S('ST') * P('H') + P('.TP'))) 21 | local rule5 = token(l.VARIABLE, 22 | P('.B') * P('R')^-1 + P('.I') * S('PR')^-1 + P('.PP')) 23 | local rule6 = token(l.TYPE, P('\\f') * S('BIPR')) 24 | local rule7 = token(l.PREPROCESSOR, l.starts_line('.') * l.alpha^1) 25 | 26 | M._rules = { 27 | {'whitespace', ws}, 28 | {'rule1', rule1}, 29 | {'rule2', rule2}, 30 | {'rule3', rule3}, 31 | {'rule4', rule4}, 32 | {'rule5', rule5}, 33 | {'rule6', rule6}, 34 | {'rule7', rule7}, 35 | } 36 | 37 | return M 38 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/null.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Null LPeg lexer. 3 | 4 | local M = {_NAME = 'null'} 5 | 6 | return M 7 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/pico8.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2016-2017 Alejandro Baez (https://keybase.io/baez). See LICENSE. 2 | -- PICO-8 Lexer. 3 | -- http://www.lexaloffle.com/pico-8.php 4 | 5 | local l = require('lexer') 6 | local token, word_match = l.token, l.word_match 7 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 8 | 9 | local M = {_NAME = 'pico8'} 10 | 11 | -- Whitespace 12 | local ws = token(l.WHITESPACE, l.space^1) 13 | 14 | -- Comments 15 | local comment = token(l.COMMENT, '//' * l.nonnewline_esc^0) 16 | 17 | -- Numbers 18 | local number = token(l.NUMBER, l.integer) 19 | 20 | -- Keywords 21 | local keyword = token(l.KEYWORD, word_match{ 22 | '__lua__', '__gfx__', '__gff__', '__map__', '__sfx__', '__music__' 23 | }) 24 | 25 | -- Identifiers 26 | local identifier = token(l.IDENTIFIER, l.word) 27 | 28 | -- Operators 29 | local operator = token(l.OPERATOR, S('_')) 30 | 31 | M._rules = { 32 | {'whitespace', ws}, 33 | {'keyword', keyword}, 34 | {'identifier', identifier}, 35 | {'comment', comment}, 36 | {'number', number}, 37 | {'operator', operator}, 38 | } 39 | 40 | -- Embed Lua into PICO-8. 41 | local lua = l.load('lua') 42 | 43 | local lua_start_rule = token('pico8_tag', '__lua__') 44 | local lua_end_rule = token('pico8_tag', '__gfx__' ) 45 | l.embed_lexer(M, lua, lua_start_rule, lua_end_rule) 46 | 47 | M._tokenstyles = { 48 | pico8_tag = l.STYLE_EMBEDDED 49 | } 50 | 51 | M._foldsymbols = lua._foldsymbols 52 | 53 | return M 54 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/props.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Props LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'props'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, '#' * l.nonnewline^0) 15 | 16 | -- Equals. 17 | local equals = token(l.OPERATOR, '=') 18 | 19 | -- Strings. 20 | local sq_str = l.delimited_range("'") 21 | local dq_str = l.delimited_range('"') 22 | local string = token(l.STRING, sq_str + dq_str) 23 | 24 | -- Variables. 25 | local variable = token(l.VARIABLE, '$(' * (l.any - ')')^1 * ')') 26 | 27 | -- Colors. 28 | local xdigit = l.xdigit 29 | local color = token('color', '#' * xdigit * xdigit * xdigit * xdigit * xdigit * 30 | xdigit) 31 | 32 | M._rules = { 33 | {'whitespace', ws}, 34 | {'color', color}, 35 | {'comment', comment}, 36 | {'equals', equals}, 37 | {'string', string}, 38 | {'variable', variable}, 39 | } 40 | 41 | M._tokenstyles = { 42 | color = l.STYLE_NUMBER 43 | } 44 | 45 | M._LEXBYLINE = true 46 | 47 | return M 48 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/protobuf.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2016-2017 David B. Lamkins . See LICENSE. 2 | -- Protocol Buffer IDL LPeg lexer. 3 | -- 4 | 5 | local l = require('lexer') 6 | local token, word_match = l.token, l.word_match 7 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 8 | 9 | local M = {_NAME = 'protobuf'} 10 | 11 | -- Whitespace. 12 | local ws = token(l.WHITESPACE, l.space^1) 13 | 14 | -- Comments. 15 | local line_comment = '//' * l.nonnewline_esc^0 16 | local block_comment = '/*' * (l.any - '*/')^0 * P('*/')^-1 17 | local comment = token(l.COMMENT, line_comment + block_comment) 18 | 19 | -- Strings. 20 | local sq_str = P('L')^-1 * l.delimited_range("'", true) 21 | local dq_str = P('L')^-1 * l.delimited_range('"', true) 22 | local string = token(l.STRING, sq_str + dq_str) 23 | 24 | -- Numbers. 25 | local number = token(l.NUMBER, l.float + l.integer) 26 | 27 | -- Keywords. 28 | local keyword = token(l.KEYWORD, word_match{ 29 | 'contained', 'syntax', 'import', 'option', 'package', 'message', 'group', 30 | 'oneof', 'optional', 'required', 'repeated', 'default', 'extend', 31 | 'extensions', 'to', 'max', 'reserved', 'service', 'rpc', 'returns' 32 | }) 33 | 34 | -- Types. 35 | local type = token(l.TYPE, word_match{ 36 | 'int32', 'int64', 'uint32', 'uint64', 'sint32', 'sint64', 'fixed32', 37 | 'fixed64', 'sfixed32', 'sfixed64', 'float', 'double', 'bool', 'string', 38 | 'bytes', 'enum', 'true', 'false' 39 | }) 40 | 41 | -- Identifiers. 42 | local identifier = token(l.IDENTIFIER, l.word) 43 | 44 | -- Operators. 45 | local operator = token(l.OPERATOR, S('<>=|;,.()[]{}')) 46 | 47 | M._rules = { 48 | {'whitespace', ws}, 49 | {'keyword', keyword}, 50 | {'type', type}, 51 | {'identifier', identifier}, 52 | {'string', string}, 53 | {'comment', comment}, 54 | {'number', number}, 55 | {'operator', operator}, 56 | } 57 | 58 | return M 59 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/ps.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Postscript LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'ps'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, '%' * l.nonnewline^0) 15 | 16 | -- Strings. 17 | local arrow_string = l.delimited_range('<>') 18 | local nested_string = l.delimited_range('()', false, false, true) 19 | local string = token(l.STRING, arrow_string + nested_string) 20 | 21 | -- Numbers. 22 | local number = token(l.NUMBER, l.float + l.integer) 23 | 24 | -- Keywords. 25 | local keyword = token(l.KEYWORD, word_match{ 26 | 'pop', 'exch', 'dup', 'copy', 'roll', 'clear', 'count', 'mark', 'cleartomark', 27 | 'counttomark', 'exec', 'if', 'ifelse', 'for', 'repeat', 'loop', 'exit', 28 | 'stop', 'stopped', 'countexecstack', 'execstack', 'quit', 'start', 29 | 'true', 'false', 'NULL' 30 | }) 31 | 32 | -- Functions. 33 | local func = token(l.FUNCTION, word_match{ 34 | 'add', 'div', 'idiv', 'mod', 'mul', 'sub', 'abs', 'ned', 'ceiling', 'floor', 35 | 'round', 'truncate', 'sqrt', 'atan', 'cos', 'sin', 'exp', 'ln', 'log', 'rand', 36 | 'srand', 'rrand' 37 | }) 38 | 39 | -- Identifiers. 40 | local word = (l.alpha + '-') * (l.alnum + '-')^0 41 | local identifier = token(l.IDENTIFIER, word) 42 | 43 | -- Operators. 44 | local operator = token(l.OPERATOR, S('[]{}')) 45 | 46 | -- Labels. 47 | local label = token(l.LABEL, '/' * word) 48 | 49 | M._rules = { 50 | {'whitespace', ws}, 51 | {'keyword', keyword}, 52 | {'function', func}, 53 | {'identifier', identifier}, 54 | {'string', string}, 55 | {'comment', comment}, 56 | {'number', number}, 57 | {'label', label}, 58 | {'operator', operator}, 59 | } 60 | 61 | return M 62 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/pure.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2015-2017 David B. Lamkins . See LICENSE. 2 | -- pure LPeg lexer, see http://purelang.bitbucket.org/ 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'pure'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local line_comment = '//' * l.nonnewline^0 15 | local block_comment = '/*' * (l.any - '*/')^0 * P('*/')^-1 16 | local comment = token(l.COMMENT, line_comment + block_comment) 17 | 18 | -- Strings. 19 | local string = token(l.STRING, l.delimited_range('"', true)) 20 | 21 | -- Numbers. 22 | local bin = '0' * S('Bb') * S('01')^1 23 | local hex = '0' * S('Xx') * (R('09') + R('af') + R('AF'))^1 24 | local dec = R('09')^1 25 | local int = (bin + hex + dec) * P('L')^-1 26 | local rad = P('.') - P('..') 27 | local exp = (S('Ee') * S('+-')^-1 * int)^-1 28 | local flt = int * (rad * dec)^-1 * exp + int^-1 * rad * dec * exp 29 | local number = token(l.NUMBER, flt + int) 30 | 31 | -- Keywords. 32 | local keyword = token(l.KEYWORD, word_match{ 33 | 'namespace', 'with', 'end', 'using', 'interface', 'extern', 'let', 'const', 34 | 'def', 'type', 'public', 'private', 'nonfix', 'outfix', 'infix', 'infixl', 35 | 'infixr', 'prefix', 'postfix', 'if', 'otherwise', 'when', 'case', 'of', 36 | 'then', 'else' 37 | }) 38 | 39 | -- Identifiers. 40 | local identifier = token(l.IDENTIFIER, l.word) 41 | 42 | -- Operators. 43 | local punct = S('+-/*%<>~!=^&|?~:;,.()[]{}@#$`\\\'') 44 | local dots = P('..') 45 | local operator = token(l.OPERATOR, dots + punct) 46 | 47 | -- Pragmas. 48 | local hashbang = l.starts_line('#!') * (l.nonnewline - P('//'))^0 49 | local pragma = token(l.PREPROCESSOR, hashbang) 50 | 51 | M._rules = { 52 | {'whitespace', ws}, 53 | {'comment', comment}, 54 | {'pragma', pragma}, 55 | {'keyword', keyword}, 56 | {'number', number}, 57 | {'operator', operator}, 58 | {'identifier', identifier}, 59 | {'string', string}, 60 | } 61 | 62 | return M 63 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/rc.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2017 Michael Forney. See LICENSE. 2 | -- rc LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'rc'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, '#' * l.nonnewline^0) 15 | 16 | -- Strings. 17 | local str = l.delimited_range("'", false, true) 18 | local heredoc = '<<' * P(function(input, index) 19 | local s, e, _, delimiter = 20 | input:find('[ \t]*(["\']?)([%w!"%%+,-./:?@_~]+)%1', index) 21 | if s == index and delimiter then 22 | delimiter = delimiter:gsub('[%%+-.?]', '%%%1') 23 | local _, e = input:find('[\n\r]'..delimiter..'[\n\r]', e) 24 | return e and e + 1 or #input + 1 25 | end 26 | end) 27 | local string = token(l.STRING, str + heredoc) 28 | 29 | -- Numbers. 30 | local number = token(l.NUMBER, l.integer + l.float) 31 | 32 | -- Keywords. 33 | local keyword = token(l.KEYWORD, word_match({ 34 | 'for', 'in', 'while', 'if', 'not', 'switch', 'fn', 35 | 'builtin', 'cd', 'eval', 'exec', 'exit', 'flag', 'rfork', 'shift', 'ulimit', 36 | 'umask', 'wait', 'whatis', '.', '~', 37 | }, '!"%*+,-./:?@[]~')) 38 | 39 | -- Identifiers. 40 | local identifier = token(l.IDENTIFIER, l.word) 41 | 42 | -- Variables. 43 | local variable = token(l.VARIABLE, 44 | '$' * S('"#')^-1 * ('*' + l.digit^1 + l.word)) 45 | 46 | -- Operators. 47 | local operator = token(l.OPERATOR, S('@`=!<>*&^|;?()[]{}') + '\\\n') 48 | 49 | M._rules = { 50 | {'whitespace', ws}, 51 | {'keyword', keyword}, 52 | {'identifier', identifier}, 53 | {'string', string}, 54 | {'comment', comment}, 55 | {'number', number}, 56 | {'variable', variable}, 57 | {'operator', operator}, 58 | } 59 | 60 | M._foldsymbols = { 61 | _patterns = {'[{}]', '#'}, 62 | [l.OPERATOR] = {['{'] = 1, ['}'] = -1}, 63 | [l.COMMENT] = {['#'] = l.fold_line_comments('#')} 64 | } 65 | 66 | return M 67 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/rhtml.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- RHTML LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'rhtml'} 9 | 10 | -- Embedded in HTML. 11 | local html = l.load('html') 12 | 13 | -- Embedded Ruby. 14 | local ruby = l.load('rails') 15 | local ruby_start_rule = token('rhtml_tag', '<%' * P('=')^-1) 16 | local ruby_end_rule = token('rhtml_tag', '%>') 17 | l.embed_lexer(html, ruby, ruby_start_rule, ruby_end_rule) 18 | 19 | M._tokenstyles = { 20 | rhtml_tag = l.STYLE_EMBEDDED 21 | } 22 | 23 | local _foldsymbols = html._foldsymbols 24 | _foldsymbols._patterns[#_foldsymbols._patterns + 1] = '<%%' 25 | _foldsymbols._patterns[#_foldsymbols._patterns + 1] = '%%>' 26 | _foldsymbols.rhtml_tag = {['<%'] = 1, ['%>'] = -1} 27 | M._foldsymbols = _foldsymbols 28 | 29 | return M 30 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/rstats.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- R LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'rstats'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, '#' * l.nonnewline^0) 15 | 16 | -- Strings. 17 | local sq_str = l.delimited_range("'", true) 18 | local dq_str = l.delimited_range('"', true) 19 | local string = token(l.STRING, sq_str + dq_str) 20 | 21 | -- Numbers. 22 | local number = token(l.NUMBER, (l.float + l.integer) * P('i')^-1) 23 | 24 | -- Keywords. 25 | local keyword = token(l.KEYWORD, word_match{ 26 | 'break', 'else', 'for', 'if', 'in', 'next', 'repeat', 'return', 'switch', 27 | 'try', 'while', 'Inf', 'NA', 'NaN', 'NULL', 'FALSE', 'TRUE' 28 | }) 29 | 30 | -- Types. 31 | local type = token(l.TYPE, word_match{ 32 | 'array', 'character', 'complex', 'data.frame', 'double', 'factor', 'function', 33 | 'integer', 'list', 'logical', 'matrix', 'numeric', 'vector' 34 | }) 35 | 36 | -- Identifiers. 37 | local identifier = token(l.IDENTIFIER, l.word) 38 | 39 | -- Operators. 40 | local operator = token(l.OPERATOR, S('<->+*/^=.,:;|$()[]{}')) 41 | 42 | M._rules = { 43 | {'whitespace', ws}, 44 | {'keyword', keyword}, 45 | {'type', type}, 46 | {'identifier', identifier}, 47 | {'string', string}, 48 | {'comment', comment}, 49 | {'number', number}, 50 | {'operator', operator}, 51 | } 52 | 53 | return M 54 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/sass.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Robert Gieseke. See LICENSE. 2 | -- Sass CSS preprocessor LPeg lexer. 3 | -- http://sass-lang.com 4 | 5 | local l = require('lexer') 6 | local token = l.token 7 | local P, S = lpeg.P, lpeg.S 8 | 9 | local M = {_NAME = 'sass'} 10 | 11 | -- Line comments. 12 | local line_comment = token(l.COMMENT, '//' * l.nonnewline^0) 13 | 14 | -- Variables. 15 | local variable = token(l.VARIABLE, '$' * (l.alnum + S('_-'))^1) 16 | 17 | -- Mixins. 18 | local mixin = token('mixin', P('@') * l.word) 19 | 20 | local css = l.load('css') 21 | local _rules = css._rules 22 | table.insert(_rules, #_rules - 1, {'mixin', mixin}) 23 | table.insert(_rules, #_rules - 1, {'line_comment', line_comment}) 24 | table.insert(_rules, #_rules - 1, {'variable', variable}) 25 | M._rules = _rules 26 | 27 | M._tokenstyles = css._tokenstyles 28 | M._tokenstyles['mixin'] = l.STYLE_FUNCTION 29 | 30 | M._foldsymbols = css._foldsymbols 31 | 32 | return M 33 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/smalltalk.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Smalltalk LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'smalltalk'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, l.delimited_range('"', false, true)) 15 | 16 | -- Strings. 17 | local sq_str = l.delimited_range("'") 18 | local literal = '$' * l.word 19 | local string = token(l.STRING, sq_str + literal) 20 | 21 | -- Numbers. 22 | local number = token(l.NUMBER, l.float + l.integer) 23 | 24 | -- Keywords. 25 | local keyword = token(l.KEYWORD, word_match{ 26 | 'true', 'false', 'nil', 'self', 'super', 'isNil', 'not', 'Smalltalk', 27 | 'Transcript' 28 | }) 29 | 30 | -- Types. 31 | local type = token(l.TYPE, word_match{ 32 | 'Date', 'Time', 'Boolean', 'True', 'False', 'Character', 'String', 'Array', 33 | 'Symbol', 'Integer', 'Object' 34 | }) 35 | 36 | -- Identifiers. 37 | local identifier = token(l.IDENTIFIER, l.word) 38 | 39 | -- Operators. 40 | local operator = token(l.OPERATOR, S(':=_<>+-/*!()[]')) 41 | 42 | -- Labels. 43 | local label = token(l.LABEL, '#' * l.word) 44 | 45 | M._rules = { 46 | {'whitespace', ws}, 47 | {'keyword', keyword}, 48 | {'type', type}, 49 | {'identifier', identifier}, 50 | {'string', string}, 51 | {'comment', comment}, 52 | {'number', number}, 53 | {'label', label}, 54 | {'operator', operator}, 55 | } 56 | 57 | M._foldsymbols = { 58 | _patterns = {'[%[%]]'}, 59 | [l.OPERATOR] = {['['] = 1, [']'] = -1} 60 | } 61 | 62 | return M 63 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/taskpaper.lua: -------------------------------------------------------------------------------- 1 | -- Copyright (c) 2016-2017 Larry Hynes. See LICENSE. 2 | -- Taskpaper LPeg lexer 3 | 4 | local l = require('lexer') 5 | local token = l.token 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'taskpaper'} 9 | 10 | local delimiter = P(' ') + P('\t') 11 | 12 | -- Whitespace 13 | local ws = token(l.WHITESPACE, l.space^1) 14 | 15 | -- Tags 16 | local day_tag = token('day_tag', (P('@today') + P('@tomorrow'))) 17 | 18 | local overdue_tag = token('overdue_tag', P('@overdue')) 19 | 20 | local plain_tag = token('plain_tag', P('@') * l.word) 21 | 22 | local extended_tag = token('extended_tag', 23 | P('@') * l.word * P('(') * 24 | (l.word + R('09') + P('-'))^1 * P(')')) 25 | 26 | -- Projects 27 | local project = token('project', 28 | l.nested_pair(l.starts_line(l.alnum), ':') * l.newline) 29 | 30 | -- Notes 31 | local note = token('note', delimiter^1 * l.alnum * l.nonnewline^0) 32 | 33 | -- Tasks 34 | local task = token('task', delimiter^1 * P('-') + l.newline) 35 | 36 | M._rules = { 37 | {'note', note}, 38 | {'task', task}, 39 | {'project', project}, 40 | {'extended_tag', extended_tag}, 41 | {'day_tag', day_tag}, 42 | {'overdue_tag', overdue_tag}, 43 | {'plain_tag', plain_tag}, 44 | {'whitespace', ws}, 45 | } 46 | 47 | M._tokenstyles = { 48 | note = l.STYLE_CONSTANT, 49 | task = l.STYLE_FUNCTION, 50 | project = l.STYLE_TAG, 51 | extended_tag = l.STYLE_COMMENT, 52 | day_tag = l.STYLE_CLASS, 53 | overdue_tag = l.STYLE_PREPROCESSOR, 54 | plain_tag = l.STYLE_COMMENT, 55 | } 56 | 57 | M._LEXBYLINE = true 58 | 59 | return M 60 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/tcl.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2014-2017 Joshua Krämer. See LICENSE. 2 | -- Tcl LPeg lexer. 3 | -- This lexer follows the TCL dodekalogue (http://wiki.tcl.tk/10259). 4 | -- It is based on the previous lexer by Mitchell. 5 | 6 | local l = require('lexer') 7 | local token, word_match = l.token, l.word_match 8 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 9 | 10 | local M = {_NAME = 'tcl'} 11 | 12 | -- Whitespace. 13 | local whitespace = token(l.WHITESPACE, l.space^1) 14 | 15 | -- Separator (semicolon). 16 | local separator = token(l.CLASS, P(';')) 17 | 18 | -- Delimiters. 19 | local braces = token(l.KEYWORD, S('{}')) 20 | local quotes = token(l.FUNCTION, '"') 21 | local brackets = token(l.VARIABLE, S('[]')) 22 | 23 | -- Argument expander. 24 | local expander = token(l.LABEL, P('{*}')) 25 | 26 | -- Variable substitution. 27 | local variable = token(l.STRING, '$' * (l.alnum + '_' + P(':')^2)^0) 28 | 29 | -- Backslash substitution. 30 | local backslash = token(l.TYPE, '\\' * ((l.digit * l.digit^-2) + 31 | ('x' * l.xdigit^1) + ('u' * l.xdigit * l.xdigit^-3) + 32 | ('U' * l.xdigit * l.xdigit^-7) + P(1))) 33 | 34 | -- Comment. 35 | local comment = token(l.COMMENT, '#' * P(function(input, index) 36 | local i = index - 2 37 | while i > 0 and input:find('^[ \t]', i) do i = i - 1 end 38 | if i < 1 or input:find('^[\r\n;]', i) then return index end 39 | end) * l.nonnewline^0) 40 | 41 | M._rules = { 42 | {'whitespace', whitespace}, 43 | {'comment', comment}, 44 | {'separator', separator}, 45 | {'expander', expander}, 46 | {'braces', braces}, 47 | {'quotes', quotes}, 48 | {'brackets', brackets}, 49 | {'variable', variable}, 50 | {'backslash', backslash}, 51 | } 52 | 53 | M._foldsymbols = { 54 | _patterns = {'[{}]', '#'}, 55 | [l.KEYWORD] = {['{'] = 1, ['}'] = -1}, 56 | [l.COMMENT] = {['#'] = l.fold_line_comments('#')} 57 | } 58 | 59 | return M 60 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/template.txt: -------------------------------------------------------------------------------- 1 | -- ? LPeg lexer. 2 | 3 | local l = require('lexer') 4 | local token, word_match = l.token, l.word_match 5 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 6 | 7 | local M = {_NAME = '?'} 8 | 9 | -- Whitespace. 10 | local ws = token(l.WHITESPACE, l.space^1) 11 | 12 | M._rules = { 13 | {'whitespace', ws}, 14 | } 15 | 16 | M._tokenstyles = { 17 | 18 | } 19 | 20 | return M 21 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/tex.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Plain TeX LPeg lexer. 3 | -- Modified by Robert Gieseke. 4 | 5 | local l = require('lexer') 6 | local token, word_match = l.token, l.word_match 7 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 8 | 9 | local M = {_NAME = 'tex'} 10 | 11 | -- Whitespace. 12 | local ws = token(l.WHITESPACE, l.space^1) 13 | 14 | -- Comments. 15 | local comment = token(l.COMMENT, '%' * l.nonnewline^0) 16 | 17 | -- TeX environments. 18 | local environment = token('environment', '\\' * (P('begin') + 'end') * l.word) 19 | 20 | -- Commands. 21 | local command = token(l.KEYWORD, '\\' * (l.alpha^1 + S('#$&~_^%{}'))) 22 | 23 | -- Operators. 24 | local operator = token(l.OPERATOR, S('$&#{}[]')) 25 | 26 | M._rules = { 27 | {'whitespace', ws}, 28 | {'comment', comment}, 29 | {'environment', environment}, 30 | {'keyword', command}, 31 | {'operator', operator}, 32 | } 33 | 34 | M._tokenstyles = { 35 | environment = l.STYLE_KEYWORD 36 | } 37 | 38 | M._foldsymbols = { 39 | _patterns = {'\\begin', '\\end', '[{}]', '%%'}, 40 | [l.COMMENT] = {['%'] = l.fold_line_comments('%')}, 41 | ['environment'] = {['\\begin'] = 1, ['\\end'] = -1}, 42 | [l.OPERATOR] = {['{'] = 1, ['}'] = -1} 43 | } 44 | 45 | return M 46 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/text.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- Text LPeg lexer. 3 | 4 | local M = {_NAME = 'text'} 5 | 6 | return M 7 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/vb.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- VisualBasic LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'vb'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, (P("'") + word_match({'rem'}, nil, true)) * 15 | l.nonnewline^0) 16 | 17 | -- Strings. 18 | local string = token(l.STRING, l.delimited_range('"', true, true)) 19 | 20 | -- Numbers. 21 | local number = token(l.NUMBER, (l.float + l.integer) * S('LlUuFf')^-2) 22 | 23 | -- Keywords. 24 | local keyword = token(l.KEYWORD, word_match({ 25 | -- Control. 26 | 'If', 'Then', 'Else', 'ElseIf', 'While', 'Wend', 'For', 'To', 'Each', 27 | 'In', 'Step', 'Case', 'Select', 'Return', 'Continue', 'Do', 28 | 'Until', 'Loop', 'Next', 'With', 'Exit', 29 | -- Operators. 30 | 'Mod', 'And', 'Not', 'Or', 'Xor', 'Is', 31 | -- Storage types. 32 | 'Call', 'Class', 'Const', 'Dim', 'ReDim', 'Preserve', 'Function', 'Sub', 33 | 'Property', 'End', 'Set', 'Let', 'Get', 'New', 'Randomize', 'Option', 34 | 'Explicit', 'On', 'Error', 'Execute', 35 | -- Storage modifiers. 36 | 'Private', 'Public', 'Default', 37 | -- Constants. 38 | 'Empty', 'False', 'Nothing', 'Null', 'True' 39 | }, nil, true)) 40 | 41 | -- Types. 42 | local type = token(l.TYPE, word_match({ 43 | 'Boolean', 'Byte', 'Char', 'Date', 'Decimal', 'Double', 'Long', 'Object', 44 | 'Short', 'Single', 'String' 45 | }, nil, true)) 46 | 47 | -- Identifiers. 48 | local identifier = token(l.IDENTIFIER, l.word) 49 | 50 | -- Operators. 51 | local operator = token(l.OPERATOR, S('=><+-*^&:.,_()')) 52 | 53 | M._rules = { 54 | {'whitespace', ws}, 55 | {'keyword', keyword}, 56 | {'type', type}, 57 | {'comment', comment}, 58 | {'identifier', identifier}, 59 | {'string', string}, 60 | {'number', number}, 61 | {'operator', operator}, 62 | } 63 | 64 | return M 65 | -------------------------------------------------------------------------------- /ext/scintillua/lexers/vbscript.lua: -------------------------------------------------------------------------------- 1 | -- Copyright 2006-2017 Mitchell mitchell.att.foicica.com. See LICENSE. 2 | -- VisualBasic LPeg lexer. 3 | 4 | local l = require('lexer') 5 | local token, word_match = l.token, l.word_match 6 | local P, R, S = lpeg.P, lpeg.R, lpeg.S 7 | 8 | local M = {_NAME = 'vbscript'} 9 | 10 | -- Whitespace. 11 | local ws = token(l.WHITESPACE, l.space^1) 12 | 13 | -- Comments. 14 | local comment = token(l.COMMENT, (P("'") + word_match({'rem'}, nil, true)) * l.nonnewline^0) 15 | 16 | -- Strings. 17 | local string = token(l.STRING, l.delimited_range('"', true, true)) 18 | 19 | -- Numbers. 20 | local number = token(l.NUMBER, (l.float + l.integer) * S('LlUuFf')^-2) 21 | 22 | -- Keywords. 23 | local keyword = token(l.KEYWORD, word_match({ 24 | -- Control. 25 | 'If', 'Then', 'Else', 'ElseIf', 'While', 'Wend', 'For', 'To', 'Each', 26 | 'In', 'Step', 'Case', 'Select', 'Return', 'Continue', 'Do', 27 | 'Until', 'Loop', 'Next', 'With', 'Exit', 28 | -- Operators. 29 | 'Mod', 'And', 'Not', 'Or', 'Xor', 'Is', 30 | -- Storage types. 31 | 'Call', 'Class', 'Const', 'Dim', 'ReDim', 'Preserve', 'Function', 'Sub', 32 | 'Property', 'End', 'Set', 'Let', 'Get', 'New', 'Randomize', 'Option', 33 | 'Explicit', 'On', 'Error', 'Execute', 34 | -- Storage modifiers. 35 | 'Private', 'Public', 'Default', 36 | -- Constants. 37 | 'Empty', 'False', 'Nothing', 'Null', 'True' 38 | }, nil, true)) 39 | 40 | -- Types. 41 | local type = token(l.TYPE, word_match({ 42 | 'Boolean', 'Byte', 'Char', 'Date', 'Decimal', 'Double', 'Long', 'Object', 43 | 'Short', 'Single', 'String' 44 | }, nil, true)) 45 | 46 | -- Identifiers. 47 | local identifier = token(l.IDENTIFIER, l.word) 48 | 49 | -- Operators. 50 | local operator = token(l.OPERATOR, S('=><+-*^&:.,_()')) 51 | 52 | M._rules = { 53 | {'whitespace', ws}, 54 | {'keyword', keyword}, 55 | {'type', type}, 56 | {'comment', comment}, 57 | {'identifier', identifier}, 58 | {'string', string}, 59 | {'number', number}, 60 | {'operator', operator}, 61 | } 62 | 63 | return M 64 | -------------------------------------------------------------------------------- /ext/scintillua/lpeg-1.0.0.tar.gz.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNATURE----- 2 | Version: GnuPG v1.4.10 (GNU/Linux) 3 | 4 | iQIcBAABAgAGBQJZBkU5AAoJEAsvnFH3iCVZJoEP/inqi3mIFY4quVjW3iuz6Fuq 5 | ZTFw1edCSqDotv7JJshYyMc552HMIZu+xmn+Ar2LaI2TAp+6dbmuXfqfc136ZZZ2 6 | tKRiY+GczVlEmbHOYdpoHWDO0SKGD6KPUqjB5ACHxL0Y8/Fthpxg36w15SJODQss 7 | zOZLW4xgwFZt0Sw4QyBuwVwvjE/mECAnweh4NPR/bQFL+rnnoJV8USQoTgJ9pQ2J 8 | psviEEFbIJhPbS6hhT8+mUVly/noaVhbBwhmJH5+Sl+0/rSqG/RUGSCcOV4rsZRk 9 | JmiSPisqDeNiaql0g0rW9ZEAxpQ49eo6BZXhfwgv4TPzxUZQSm/INr1Yj/hMKr6b 10 | xBWQFl+KgJp6TboS4s/B5AZHEMWPGhvJ3a2lx23KR8x9r/e+5FU2KO9Z2R90Vm+p 11 | luXkva3B9B/ONsJwSjGemxPZA9BQ+tnM5f81K8cQysKhTAkflObhDj+bwJ02djmC 12 | 0+kcqclXPC4xo14vGCD0GHRgNrN4dB4h94XuRxaHNsYBxe0g2FTZaaKyCG9MC8Sr 13 | aGHUTUoTbevniwfFDtpWBwRwgsAjZwF31BneZ1uE5d2wJwvNtEJoV41UrTv0ZBCE 14 | reN3SCbH2bw2Qi32Pf0b0RWfVX7xkiFvj9xVoIyF6cYBLqLn/E5XFbN28Yvdb4MS 15 | tblInQMsh+JN8s3/sws5 16 | =97Eb 17 | -----END PGP SIGNATURE----- 18 | -------------------------------------------------------------------------------- /ext/scintillua/lua-5.1.4.tar.gz.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNATURE----- 2 | Version: GnuPG v1.4.10 (GNU/Linux) 3 | 4 | iQIcBAABAgAGBQJZBkU5AAoJEAsvnFH3iCVZsScQAI6TLfGuhcJ254ZYOzZ8U0NH 5 | UDvumcCfyOq4/lkEZKCCqf04YXuSVV2ymUg+10zjz/DbhD2JzbyHIt6ebsKs7BkB 6 | McCR6/Hjn4agO5ONA82WocTuzWWW68B80WnAsLSvEZn+wZCbM0igff7rTIO2cjTe 7 | RynI67s5dgMdc3rkMAAV6kpURU9/GMMUuua3SxjA3gq6bc6/CNmH0ED0D9VyBdxe 8 | HP4eKw8a5xaUyCwZS4vPizHZY4FSv42iypi7838XtRQUA9jOHC77UXyJqh5Bh9XS 9 | 6IomPw0G4t4rbnz3zfDwOYfKLpll2LZnhLLd2jArGKcrr2+R2ia6JYjPRKqEIy/V 10 | UTzwV5kiSsfjS6ooz9FlmjRpyVvPFVS+XQZNxG+FEwp9Z0Z3TBb7R4yIi3KRz8Yx 11 | f/Ge3qCW3TvXD/C7ELYjf1utnwMqD6yJLl83YRkNLOHGT0e1+eonu6fk+j7wFXKB 12 | 9+8vjyQ0CJopQkYoWuiyscHfdnopse7IsnYqVLGXsUf0qVgeHF8NzpALA66kJlgD 13 | PBQhq7D1Dac5C+8y0Wmzk5Ss/2NZmzAfeLKpjWS6MSM+57hfW0B36ovmmAmHmxMS 14 | B8JsikyDTy5uokdnz/IaM5EV99kByWFNLQ7v55XMt6Uneg7bfX8w8rmzStE/IAov 15 | ULWNUrFFOharslOBGp6U 16 | =WQfp 17 | -----END PGP SIGNATURE----- 18 | -------------------------------------------------------------------------------- /ext/scintillua/scintilla373.tgz.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNATURE----- 2 | Version: GnuPG v1.4.10 (GNU/Linux) 3 | 4 | iQIcBAABAgAGBQJYrl3qAAoJEAsvnFH3iCVZ0K0QAJjjsqFlg3Pzp1CaBY25DrIq 5 | qrR6N8kK0D6Q3KZEAtN3Z0Eqr6GhDaHJOyzyPeXQ2Q2bMwEU9TMx3Al+C+Eg3483 6 | LtQUG1lyZ5GHIwq4k9XXFsFbQRXAC4bHcqk9m51WFypZMICSrcLM9krjaYyQwnUQ 7 | CXQ+dNe8o8WDAKlOtkHAhBKmCUECQEbLdAm7T3/8uQMZOkzlWDhUOuaAmwUVdmff 8 | 4MyaubbhBP5ZOV1HMYK4T363n9JayK1uV6VNmkGINCET1W+mvHBkT1gVgO9wOGhJ 9 | MlEScP7h0rJNQFYdXEf2JkMu4iM9m5mvqcwL/+yUv16tb3CBG331QdqGy1txwfu6 10 | YA3zgQzohI+DhsT+KlAaxINBUdZ2kEY7ZFu8fJWUzWsz0rC9o/pYkuMlAFNY6Z6o 11 | epswoFCfwclQ6+FTvDfYmpiGm/haLNHVPVGPczMpzWX/oW63Y87LPmwb7kbdeBOg 12 | 2eYIEaSePgKpFBrtT1auFtQxtvUbExNBqiUJB9/6MeMtXbSu+9fRgO8+rYOf9gr2 13 | oIU8I5EjG/QWqaditJGxQuvhap+YxUJekaGysEV7HfO9X3JF+kbAyT5GjbZ8SJIa 14 | FVtO2+o+4RQs1xxG3Zda3wz766aucqI3TVYSi0Vw4L7NdmplINvESMoSVCyj0WH5 15 | K98Pm0HJ1onQoLPbCJ2K 16 | =5qYK 17 | -----END PGP SIGNATURE----- 18 | -------------------------------------------------------------------------------- /make_release.ps1: -------------------------------------------------------------------------------- 1 | Write-Host "Creating Scintillua++ Releases" 2 | 3 | function make_release($build, $postfix) 4 | { 5 | Remove-Item .\ScintilluaPlusPlus$postfix.zip -ErrorAction SilentlyContinue 6 | Remove-Item .\release\* -Force -Recurse -ErrorAction SilentlyContinue 7 | 8 | New-Item -ItemType directory -Path .\release\Scintillua++ 9 | 10 | Copy-Item .\bin\Release_$build\Scintillua++$postfix.dll .\release 11 | Copy-Item .\bin\Release_$build\LexLPeg$postfix.dll .\release\Scintillua++ 12 | 13 | Copy-Item .\extra\default.ini .\release\Scintillua++ 14 | Copy-Item .\ext\Scintillua\lexers\* .\release\Scintillua++ -recurse 15 | Copy-Item .\extra\npp.lua .\release\Scintillua++\themes 16 | 17 | Compress-Archive -Path .\release\* -DestinationPath .\ScintilluaPlusPlus$postfix.zip 18 | 19 | Remove-Item .\release\ -Force -Recurse 20 | } 21 | 22 | make_release "Win32" "" 23 | make_release "x64" "_64" 24 | -------------------------------------------------------------------------------- /projects/scintillua.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {17ccdf12-64b9-4b5d-b1ee-bb082840c813} 6 | 7 | 8 | {b058f03d-b3b5-41f6-b5f5-e5a9e2ccf02c} 9 | 10 | 11 | 12 | 13 | Source Files 14 | 15 | 16 | Source Files 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/AboutDialog.h: -------------------------------------------------------------------------------- 1 | // This file is part of Scintillua++. 2 | // 3 | // Copyright (C)2017 Justin Dailey 4 | // 5 | // Scintillua++ is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either 8 | // version 2 of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program; if not, write to the Free Software 17 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | 19 | #pragma once 20 | 21 | void ShowAboutDialog(HINSTANCE hInstance, const wchar_t *lpTemplateName, HWND hWndParent); 22 | -------------------------------------------------------------------------------- /src/Config.h: -------------------------------------------------------------------------------- 1 | // This file is part of Scintillua++. 2 | // 3 | // Copyright (C)2017 Justin Dailey 4 | // 5 | // Scintillua++ is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either 8 | // version 2 of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program; if not, write to the Free Software 17 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | 19 | #pragma once 20 | 21 | #include "PluginDefinition.h" 22 | #include "NotepadPPGateway.h" 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | typedef struct Configuration { 29 | bool over_ride; 30 | std::string theme; 31 | std::map> file_extensions; 32 | } Configuration; 33 | 34 | bool MatchWild(const char *pattern, size_t lenPattern, const char *fileName, bool caseSensitive); 35 | const wchar_t *GetIniFilePath(const NotepadPPGateway &npp); 36 | void ConfigLoad(const NotepadPPGateway &npp, Configuration *config); 37 | void ConfigSave(const NppData *nppData, const Configuration *config); 38 | -------------------------------------------------------------------------------- /src/Hyperlinks.h: -------------------------------------------------------------------------------- 1 | // Hyperlinks.h 2 | // 3 | // Copyright 2002 Neal Stublen 4 | // All rights reserved. 5 | // 6 | // http://www.awesoftware.com 7 | // 8 | 9 | #ifndef HYPERLINKS_H 10 | #define HYPERLINKS_H 11 | 12 | BOOL ConvertStaticToHyperlink(HWND hwndCtl); 13 | BOOL ConvertStaticToHyperlink(HWND hwndParent, UINT uiCtlId); 14 | 15 | #endif -------------------------------------------------------------------------------- /src/LanguageDialog.h: -------------------------------------------------------------------------------- 1 | // This file is part of Scintillua++. 2 | // 3 | // Copyright (C)2017 Justin Dailey 4 | // 5 | // Scintillua++ is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either 8 | // version 2 of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program; if not, write to the Free Software 17 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | 19 | #pragma once 20 | 21 | #include "Config.h" 22 | 23 | std::string ShowLanguageDialog(HINSTANCE hInstance, const wchar_t *lpTemplateName, HWND hWndParent, const Configuration *cfg); 24 | -------------------------------------------------------------------------------- /src/PluginDefinition.h: -------------------------------------------------------------------------------- 1 | // This file is part of Scintillua++. 2 | // 3 | // Copyright (C)2017 Justin Dailey 4 | // 5 | // Scintillua++ is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either 8 | // version 2 of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program; if not, write to the Free Software 17 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | 19 | #pragma once 20 | 21 | #include "PluginInterface.h" 22 | 23 | #define SCI_UNUSED 0 24 | 25 | const wchar_t NPP_PLUGIN_NAME[] = TEXT("Scintillua++"); 26 | -------------------------------------------------------------------------------- /src/Utilities.h: -------------------------------------------------------------------------------- 1 | // This file is part of Scintillua++. 2 | // 3 | // Copyright (C)2017 Justin Dailey 4 | // 5 | // Scintillua++ is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either 8 | // version 2 of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program; if not, write to the Free Software 17 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | std::string UTF8FromString(const std::wstring &s); 25 | std::wstring StringFromUTF8(const std::string &s); 26 | void trim(std::string &s); 27 | std::vector split(const std::string &s, char delim); 28 | -------------------------------------------------------------------------------- /src/Version.h: -------------------------------------------------------------------------------- 1 | // This file is part of Scintillua++. 2 | // 3 | // Copyright (C)2017 Justin Dailey 4 | // 5 | // Scintillua++ is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either 8 | // version 2 of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program; if not, write to the Free Software 17 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | 19 | #define VERSION_NUM 1,2,0,0 20 | #define VERSION_LINEAR 1200 21 | #define VERSION_LINEAR_TEXT TEXT("1200") 22 | #define VERSION_TEXT TEXT("1.2") // This must match the tag pushed on the server minus the "v" 23 | #define VERSION_STAGE TEXT("") // "alpha", "beta", "" 24 | -------------------------------------------------------------------------------- /src/Version.rc: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include "Version.h" 4 | 5 | 6 | // 7 | // Version Information resources 8 | // 9 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 10 | 1 VERSIONINFO 11 | FILEVERSION VERSION_NUM 12 | PRODUCTVERSION VERSION_NUM 13 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 14 | FILEFLAGS VS_FF_SPECIALBUILD 15 | FILEOS VOS__WINDOWS32 16 | FILETYPE VFT_DLL 17 | FILESUBTYPE VFT2_UNKNOWN 18 | { 19 | BLOCK "StringFileInfo" 20 | { 21 | BLOCK "040904b0" 22 | { 23 | VALUE "Comments", "Scintillua++ for Notepad++" 24 | VALUE "CompanyName", "Justin Dailey " 25 | VALUE "FileDescription", "Scintillua++ for Notepad++" 26 | VALUE "FileVersion", VERSION_TEXT 27 | VALUE "InternalName", "Scintillua++" 28 | VALUE "OriginalFilename", "Scintillua++.dll" 29 | VALUE "ProductName", "Scintillua++" 30 | VALUE "ProductVersion", VERSION_TEXT 31 | } 32 | } 33 | BLOCK "VarFileInfo" 34 | { 35 | VALUE "Translation", 0x0409, 0x01B5 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/resource.h: -------------------------------------------------------------------------------- 1 | 2 | #define IDD_ABOUTDLG 101 3 | #define IDD_LANGUAGEDLG 102 4 | #define IDC_GITHUB 1000 5 | #define IDC_COMBOLANGUAGE 1003 6 | #define IDC_VERSION 1001 7 | #define IDC_README 1002 8 | #define IDC_STATIC -1 9 | 10 | -------------------------------------------------------------------------------- /src/resource.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #include "resource.h" 3 | 4 | IDD_ABOUTDLG DIALOGEX 0, 0, 223, 130 5 | STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_BORDER | WS_SYSMENU 6 | FONT 8, "MS Shell Dlg", 0, 0, 0x1 7 | BEGIN 8 | PUSHBUTTON "Close",IDOK,86,109,50,14 9 | GROUPBOX "",IDC_VERSION,10,9,201,93,BS_CENTER 10 | LTEXT "Author: Justin Dailey ",IDC_STATIC,30,26,180,8 11 | LTEXT "The Scintillua++ code is hosted on",IDC_STATIC,30,43,180,8 12 | LTEXT "GitHub",IDC_GITHUB,142,43,27,8,SS_NOTIFY 13 | LTEXT "This code is licensed under GPLv2",IDC_STATIC,30,80,180,8 14 | END 15 | 16 | IDD_LANGUAGEDLG DIALOGEX 0, 0, 245, 74 17 | STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU 18 | CAPTION "Select Language" 19 | FONT 8, "MS Shell Dlg", 400, 0, 0x1 20 | BEGIN 21 | DEFPUSHBUTTON "OK",IDOK,120,53,50,14 22 | PUSHBUTTON "Cancel",IDCANCEL,174,53,50,14 23 | LTEXT "Language:",IDC_STATIC,15,12,90,8 24 | COMBOBOX IDC_COMBOLANGUAGE,15,25,206,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP 25 | END 26 | 27 | 28 | --------------------------------------------------------------------------------