├── .gitattributes ├── .github └── workflows │ └── CI.yaml ├── .gitignore ├── .obs └── workflows.yml ├── .travis.yml ├── COPYING ├── Dockerfile ├── Jenkinsfile ├── Makefile ├── README.md ├── README.txt ├── builds ├── gsl.pro └── msvc │ ├── .gitignore │ ├── README.md │ ├── build │ ├── buildall.bat │ └── buildbase.bat │ ├── properties │ ├── Common.props │ ├── Debug.props │ ├── DebugDEXE.props │ ├── DebugLEXE.props │ ├── DebugSEXE.props │ ├── EXE.props │ ├── Link.props │ ├── Messages.props │ ├── Output.props │ ├── Release.props │ ├── ReleaseDEXE.props │ ├── ReleaseLEXE.props │ ├── ReleaseSEXE.props │ ├── Win32.props │ └── x64.props │ ├── resource.h │ ├── resource.rc │ ├── vs2010 │ ├── gsl.sln │ └── gsl │ │ ├── gsl.props │ │ ├── gsl.vcxproj │ │ ├── gsl.vcxproj.filters │ │ └── packages.config │ └── vs2012 │ ├── gsl.sln │ └── gsl │ ├── gsl.props │ ├── gsl.vcxproj │ ├── gsl.vcxproj.filters │ └── packages.config ├── ci_build.sh ├── doc ├── denormalizing.md ├── denormalizing.txt ├── examples │ ├── directory-iteration.gsl │ ├── error-parameter.gsl │ ├── fruits-denormalized.xml │ ├── fruits.gsl │ ├── fruits.xml │ ├── regression-case1.xml │ ├── regression-case2.xml │ ├── regression-gsl.gsl │ └── zones.xml └── modules │ ├── ggconv.txt │ ├── ggdiag.txt │ ├── ggenvt.txt │ ├── ggfile.txt │ ├── gggsl.txt │ ├── ggmath.txt │ ├── ggpcre.txt │ ├── ggproc.txt │ ├── ggscrp.txt │ ├── ggsock.txt │ ├── ggstrn.txt │ ├── ggsymb.txt │ ├── ggthrd.txt │ ├── ggtime.txt │ └── ggxml.txt ├── examples ├── fsm_c.gsl ├── zs_lex.c ├── zs_lex.h ├── zs_lex.xml └── zs_lex_fsm.h ├── images └── README_1.png ├── packaging ├── debian │ ├── .gitignore │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── generator-scripting-language-examples.install │ ├── generator-scripting-language.docs │ ├── generator-scripting-language.dsc │ ├── generator-scripting-language.install │ ├── generator-scripting-language.manpages │ ├── rules │ └── source │ │ ├── format │ │ └── lintian-overrides ├── docker │ └── run_gsl.sh ├── linux │ ├── create_tarball.sh │ └── rpm │ │ └── SPECS │ │ └── generator-scripting-language.spec ├── nuget │ ├── .gitignore │ ├── package.bat │ ├── package.config │ ├── package.gsl │ └── package.nuspec ├── obs │ └── _service └── redhat │ └── generator-scripting-language.spec └── src ├── .gitignore ├── Makefile ├── c ├── c.bat ├── console.gsl ├── ggcode.c ├── ggcode.d ├── ggcode.h ├── ggcode.i ├── ggcode.l ├── ggcode.xml ├── ggcodem.c ├── ggcodem.h ├── ggcomm.c ├── ggcomm.h ├── ggconv.c ├── ggconv.gxl ├── ggconv.h ├── ggdiag.c ├── ggdiag.gxl ├── ggdiag.h ├── ggdoc.gsl ├── ggenvt.c ├── ggenvt.gxl ├── ggenvt.h ├── ggfile.c ├── ggfile.gxl ├── ggfile.h ├── ggfunc.inc ├── gggsl.c ├── gggsl.d ├── gggsl.gxl ├── gggsl.h ├── gggsl.i ├── gggsl.l ├── gghead.h ├── ggmacro.gsl ├── ggmath.c ├── ggmath.gxl ├── ggmath.h ├── ggobjt.c ├── ggobjt.gsl ├── ggobjt.h ├── ggpars.c ├── ggpars.d ├── ggpars.h ├── ggpars.i ├── ggpars.l ├── ggpars.xml ├── ggparsm.c ├── ggparsm.h ├── ggpcre.c ├── ggpcre.gxl ├── ggpcre.h ├── ggpriv.h ├── ggproc.c ├── ggproc.gxl ├── ggproc.h ├── ggreport.gsl ├── ggscop.c ├── ggscop.h ├── ggscrp.c ├── ggscrp.d ├── ggscrp.gxl ├── ggscrp.h ├── ggscrp.i ├── ggscrp.l ├── ggsock.c ├── ggsock.d ├── ggsock.gxl ├── ggsock.h ├── ggsock.i ├── ggsock.l ├── ggstrn.c ├── ggstrn.gxl ├── ggstrn.h ├── ggsymb.c ├── ggsymb.gxl ├── ggsymb.h ├── ggthrd.c ├── ggthrd.d ├── ggthrd.gxl ├── ggthrd.h ├── ggthrd.i ├── ggthrd.l ├── ggtime.c ├── ggtime.gxl ├── ggtime.h ├── ggxml.c ├── ggxml.gxl ├── ggxml.h ├── gsl.1 ├── gsl.c ├── gsl.d ├── gsl.h ├── gsl.i ├── gsl.l ├── prelude.h ├── sfl.h ├── sflbits.c ├── sflbits.h ├── sflcomp.c ├── sflcomp.h ├── sflcons.c ├── sflcons.h ├── sflconv.c ├── sflconv.h ├── sflcryp.c ├── sflcryp.h ├── sflcvbs.c ├── sflcvdp.c ├── sflcvds.c ├── sflcvns.c ├── sflcvsb.c ├── sflcvsd.c ├── sflcvsn.c ├── sflcvst.c ├── sflcvst.d ├── sflcvst.i ├── sflcvtp.c ├── sflcvts.c ├── sfldate.c ├── sfldate.h ├── sfldes.c ├── sfldes.h ├── sfldescr.c ├── sfldescr.h ├── sfldir.c ├── sfldir.h ├── sflenv.c ├── sflenv.h ├── sflexdr.c ├── sflexdr.h ├── sflfile.c ├── sflfile.h ├── sflfind.c ├── sflfind.h ├── sflfort.c ├── sflfort.h ├── sflhead.h ├── sflheap.c ├── sflheap.h ├── sflhttp.c ├── sflhttp.h ├── sflini.c ├── sflini.h ├── sfllang.c ├── sfllang.h ├── sfllbuf.c ├── sfllbuf.h ├── sfllist.c ├── sfllist.h ├── sflmail.c ├── sflmail.h ├── sflmath.c ├── sflmath.h ├── sflmem.c ├── sflmem.h ├── sflmesg.c ├── sflmesg.h ├── sflmime.c ├── sflmime.h ├── sflnode.c ├── sflnode.h ├── sflprint.c ├── sflprint.h ├── sflproc.c ├── sflproc.h ├── sflproco.imp ├── sflprocu.imp ├── sflprocv.imp ├── sflprocw.imp ├── sflprocx.h ├── sflprocx.imp ├── sflscrit.c ├── sflscrit.d ├── sflscrit.i ├── sflsearch.c ├── sflsearch.h ├── sflsha.c ├── sflsha.h ├── sflslot.c ├── sflslot.h ├── sflsock.c ├── sflsock.h ├── sflsort.c ├── sflsort.h ├── sflstr.c ├── sflstr.h ├── sflsymb.c ├── sflsymb.h ├── sflsyst.c ├── sflsyst.h ├── sfltok.c ├── sfltok.h ├── sfltree.c ├── sfltree.h ├── sfltron.c ├── sfltron.h ├── sfluid.c ├── sfluid.h ├── sflxml.c ├── sflxml.h ├── sflxmll.c ├── sflxmll.h ├── sflxmls.c ├── sflxmls.h ├── smt3.h ├── smtdefn.h ├── smtecho.c ├── smtecho.d ├── smtecho.i ├── smthead.h ├── smtlib.c ├── smtlib.h ├── smtlog.c ├── smtlog.d ├── smtlog.i ├── smtmem.h ├── smtmsg.c ├── smtmsg.h ├── smtoper.c ├── smtoper.d ├── smtoper.i ├── smtpipe.c ├── smtpipe.d ├── smtpipe.i ├── smtpop.c ├── smtpop.d ├── smtpop.i ├── smtpriv.h ├── smtrdns.c ├── smtrdns.d ├── smtrdns.i ├── smtrdnsl.c ├── smtrdnsl.h ├── smtserv.c ├── smtserv.h ├── smtsimu.c ├── smtsimu.d ├── smtsimu.h ├── smtsimu.i ├── smtslot.c ├── smtslot.d ├── smtslot.i ├── smtsmtp.c ├── smtsmtp.d ├── smtsmtp.i ├── smtsock.c ├── smtsock.d ├── smtsock.i ├── smtsslm.h ├── smttime.c ├── smttime.h ├── smttran.c ├── smttran.d ├── smttran.i ├── smttst1.c ├── smttst1.d ├── smttst1.i ├── smttst2.c ├── smttst2.d ├── smttst2.i ├── smttst3.c ├── smttst3.d ├── smttst3.i ├── smtxlog.c ├── smtxlog.d ├── smtxlog.h ├── smtxlog.i ├── syscli.c ├── sysclia.c ├── sysclia.d ├── sysclia.i ├── sysman.c ├── sysman.h ├── sysmana.c ├── sysmana.d ├── sysmana.i ├── testabort.gsl ├── testall.gsl ├── testall.inc ├── testchi2.gsl ├── testconv.gsl ├── testdate.gsl ├── testdb.gsl ├── testdir.gsl ├── testdir.xml ├── testdir2.gsl ├── testecho.gsl ├── testesc.gsl ├── testfile.gsl ├── testmath.gsl ├── testscope.gsl ├── testsort.gsl ├── teststr.gsl └── version.h /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.github/workflows/CI.yaml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | pull_request: 5 | 6 | 7 | jobs: 8 | build: 9 | runs-on: ${{ matrix.os }} 10 | strategy: 11 | fail-fast: false 12 | matrix: 13 | include: 14 | - os: ubuntu-latest 15 | BUILD_TYPE: default 16 | PACKAGES: libpcre3-dev 17 | env: 18 | # Set CI_TIME: true to enable build-step profiling 19 | # Set CI_TRACE: true to enable shell script tracing 20 | # Set CI_CONFIG_QUIET: true to enable "configure --quiet" (only report stderr) 21 | # Set CI_REQUIRE_GOOD_GITIGNORE: false to NOT fail if "git status -s" is not clean 22 | # Set CI_REQUIRE_GOOD_CLANG_FORMAT: true to fail if "clang-format" check is not clean 23 | CI_TIME: false 24 | CI_TRACE: false 25 | CI_CONFIG_QUIET: true 26 | CI_REQUIRE_GOOD_GITIGNORE: false 27 | platform: ${{ matrix.platform }} 28 | configuration: ${{ matrix.configuration }} 29 | BUILD_TYPE: ${{ matrix.BUILD_TYPE }} 30 | steps: 31 | - uses: actions/checkout@v2 32 | with: 33 | path: gsl 34 | - name: build 35 | shell: bash 36 | working-directory: gsl 37 | run: ./ci_build.sh 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | 11 | [Dd]ebug/ 12 | [Rr]elease/ 13 | x64/ 14 | build/ 15 | [Bb]in/ 16 | [Oo]bj/ 17 | 18 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets 19 | !packages/*/build/ 20 | 21 | # MSTest test Results 22 | [Tt]est[Rr]esult*/ 23 | [Bb]uild[Ll]og.* 24 | 25 | # Jenkins temp dir 26 | src@tmp/ 27 | 28 | *_i.c 29 | *_p.c 30 | *.ilk 31 | *.meta 32 | *.obj 33 | *.pch 34 | *.pdb 35 | *.pgc 36 | *.pgd 37 | *.rsp 38 | *.sbr 39 | *.tlb 40 | *.tli 41 | *.tlh 42 | *.tmp 43 | *.tmp_proj 44 | *.log 45 | *.vspscc 46 | *.vssscc 47 | .builds 48 | *.pidb 49 | *.log 50 | *.scc 51 | 52 | # Visual C++ cache files 53 | ipch/ 54 | *.aps 55 | *.ncb 56 | *.opensdf 57 | *.sdf 58 | *.cachefile 59 | 60 | # Visual Studio profiler 61 | *.psess 62 | *.vsp 63 | *.vspx 64 | 65 | # Guidance Automation Toolkit 66 | *.gpState 67 | 68 | # ReSharper is a .NET coding add-in 69 | _ReSharper*/ 70 | *.[Rr]e[Ss]harper 71 | 72 | # TeamCity is a build add-in 73 | _TeamCity* 74 | 75 | # DotCover is a Code Coverage Tool 76 | *.dotCover 77 | 78 | # NCrunch 79 | *.ncrunch* 80 | .*crunch*.local.xml 81 | 82 | # Installshield output folder 83 | [Ee]xpress/ 84 | 85 | # DocProject is a documentation generator add-in 86 | DocProject/buildhelp/ 87 | DocProject/Help/*.HxT 88 | DocProject/Help/*.HxC 89 | DocProject/Help/*.hhc 90 | DocProject/Help/*.hhk 91 | DocProject/Help/*.hhp 92 | DocProject/Help/Html2 93 | DocProject/Help/html 94 | 95 | # Click-Once directory 96 | publish/ 97 | 98 | # Publish Web Output 99 | *.Publish.xml 100 | 101 | # NuGet Packages Directory 102 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 103 | #packages/ 104 | 105 | # Windows Azure Build Output 106 | csx 107 | *.build.csdef 108 | 109 | # Windows Store app package directory 110 | AppPackages/ 111 | 112 | # Others 113 | sql/ 114 | tmp/ 115 | *.Cache 116 | ClientBin/ 117 | [Ss]tyle[Cc]op.* 118 | ~$* 119 | *~ 120 | *.dbmdl 121 | *.[Pp]ublish.xml 122 | *.pfx 123 | *.publishsettings 124 | 125 | # RIA/Silverlight projects 126 | Generated_Code/ 127 | 128 | # Backup & report files from converting an old project file to a newer 129 | # Visual Studio version. Backup files are not needed, because we have git ;-) 130 | _UpgradeReport_Files/ 131 | Backup*/ 132 | UpgradeLog*.XML 133 | UpgradeLog*.htm 134 | 135 | # SQL Server files 136 | App_Data/*.mdf 137 | App_Data/*.ldf 138 | 139 | 140 | #LightSwitch generated files 141 | GeneratedArtifacts/ 142 | _Pvt_Extensions/ 143 | ModelManifest.xml 144 | 145 | # ========================= 146 | # Windows detritus 147 | # ========================= 148 | 149 | # Windows image file caches 150 | Thumbs.db 151 | ehthumbs.db 152 | 153 | # Folder config file 154 | Desktop.ini 155 | 156 | # Recycle Bin used on file shares 157 | $RECYCLE.BIN/ 158 | 159 | # Mac desktop service store files 160 | .DS_Store 161 | -------------------------------------------------------------------------------- /.obs/workflows.yml: -------------------------------------------------------------------------------- 1 | pull_request: 2 | steps: 3 | - branch_package: 4 | source_project: network:messaging:zeromq:git-draft 5 | source_package: generator-scripting-language 6 | target_project: network:messaging:zeromq:ci 7 | filters: 8 | event: pull_request 9 | merge: 10 | steps: 11 | - trigger_services: 12 | project: network:messaging:zeromq:git-stable 13 | package: generator-scripting-language 14 | filters: 15 | event: push 16 | branches: 17 | only: 18 | - master 19 | release: 20 | steps: 21 | - trigger_services: 22 | project: network:messaging:zeromq:release-stable 23 | package: generator-scripting-language 24 | - trigger_services: 25 | project: network:messaging:zeromq:release-draft 26 | package: generator-scripting-language 27 | filters: 28 | event: tag_push 29 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Travis CI script 2 | language: c 3 | 4 | cache: ccache 5 | 6 | os: 7 | - linux 8 | - osx 9 | 10 | sudo: false 11 | 12 | # Set CI_TIME=true to enable build-step profiling in Travis 13 | # Set CI_TRACE=true to enable shell script tracing in Travis 14 | # Set CI_CONFIG_QUIET=true to enable "configure --quiet" (only report stderr) 15 | env: 16 | global: 17 | - CI_TIME=true 18 | - CI_TRACE=false 19 | - CI_CONFIG_QUIET=true 20 | matrix: 21 | - BUILD_TYPE=default 22 | 23 | script: 24 | - ./ci_build.sh 25 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | MAINTAINER Godefroid Chapelle 3 | 4 | RUN DEBIAN_FRONTEND=noninteractive apt-get update -y -q 5 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --force-yes build-essential 6 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --force-yes libpcre3-dev 7 | 8 | RUN mkdir /tmp/gsl 9 | COPY src /tmp/gsl/src 10 | COPY packaging/docker/run_gsl.sh /usr/local/bin/run_gsl.sh 11 | WORKDIR /tmp/gsl/src 12 | RUN make 13 | RUN make install 14 | ENTRYPOINT ["run_gsl.sh"] 15 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for iMatix GSL/4.1 3 | # 4 | # Basic Makefile to build GSL starting from project root directory, 5 | # allowing a simple build against system or bundled libpcre. 6 | # 7 | # Copyright (C) 2017 by the GSL community 8 | # 9 | # This file is licensed under the BSD license as follows: 10 | # 11 | # Redistribution and use in source and binary forms, with or without 12 | # modification, are permitted provided that the following conditions 13 | # are met: 14 | # 15 | # * Redistributions of source code must retain the above copyright 16 | # notice, this list of conditions and the following disclaimer. 17 | # * Redistributions in binary form must reproduce the above copyright 18 | # notice, this list of conditions and the following disclaimer in 19 | # the documentation and/or other materials provided with the 20 | # distribution. 21 | # * Neither the name of iMatix Corporation nor the names of its 22 | # contributors may be used to endorse or promote products derived 23 | # from this software without specific prior written permission. 24 | # 25 | # THIS SOFTWARE IS PROVIDED BY IMATIX CORPORATION "AS IS" AND ANY 26 | # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IMATIX CORPORATION BE 29 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 32 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 33 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | # 37 | 38 | all check clean install uninstall: 39 | cd src && $(MAKE) $@ 40 | -------------------------------------------------------------------------------- /builds/msvc/.gitignore: -------------------------------------------------------------------------------- 1 | *.opensdf 2 | *.suo 3 | *.sdf 4 | *.user 5 | *.aps 6 | *.log 7 | */packages/ 8 | !build 9 | build/pcre.*/ -------------------------------------------------------------------------------- /builds/msvc/README.md: -------------------------------------------------------------------------------- 1 | These builds do not use the `pcre` sources contained within the GSL repository. Instead they rely on the [NuGet PCRE](https://www.nuget.org/packages/pcre) and [NuGet PCRE.redist](https://www.nuget.org/packages/pcre.redist) packages. This package currently supports only **Visual Studio 2012** and **Visual Studio 2010**. As a consequence there is currently no GSL build provided for **Visual Studio 2013**. 2 | -------------------------------------------------------------------------------- /builds/msvc/build/buildall.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | ECHO. 3 | ECHO Downloading gsl dependencies from NuGet 4 | REM Yes this is redundant, but much simpler then a central repo. 5 | CALL nuget.exe install ..\vs2012\gsl\packages.config -o ..\vs2012\packages 6 | CALL nuget.exe install ..\vs2010\gsl\packages.config -o ..\vs2010\packages 7 | ECHO. 8 | CALL buildbase.bat ..\vs2012\gsl.sln 11 9 | ECHO. 10 | CALL buildbase.bat ..\vs2010\gsl.sln 10 11 | ECHO. 12 | PAUSE -------------------------------------------------------------------------------- /builds/msvc/build/buildbase.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM Usage: [buildbase.bat ..\vs2013\mysolution.sln 12] 3 | 4 | SET solution=%1 5 | SET version=%2 6 | SET log=build_%version%.log 7 | SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat 8 | SET environment="%programfiles(x86)%\%tools%" 9 | IF NOT EXIST %environment% SET environment="%programfiles%\%tools%" 10 | IF NOT EXIST %environment% GOTO no_tools 11 | 12 | ECHO Building: %solution% 13 | 14 | CALL %environment% x86 > nul 15 | ECHO Platform=x86 16 | 17 | ECHO Configuration=StaticDebug 18 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% >> %log% 19 | IF errorlevel 1 GOTO error 20 | ECHO Configuration=StaticRelease 21 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log% 22 | IF errorlevel 1 GOTO error 23 | 24 | CALL %environment% x86_amd64 > nul 25 | ECHO Platform=x64 26 | 27 | ECHO Configuration=StaticDebug 28 | msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log% 29 | IF errorlevel 1 GOTO error 30 | ECHO Configuration=StaticRelease 31 | msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log% 32 | IF errorlevel 1 GOTO error 33 | 34 | ECHO Complete: %solution% 35 | GOTO end 36 | 37 | :error 38 | ECHO *** ERROR, build terminated early, see: %log% 39 | GOTO end 40 | 41 | :no_tools 42 | ECHO *** ERROR, build tools not found: %tools% 43 | 44 | :end 45 | 46 | -------------------------------------------------------------------------------- /builds/msvc/properties/Common.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Common Settings 6 | Unicode 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | true 16 | 17 | Level3 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/Debug.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | <_PropertySheetDisplayName>Debug Settings 10 | Debug 11 | 12 | 13 | 14 | 15 | EnableFastChecks 16 | ProgramDatabase 17 | true 18 | Disabled 19 | _DEBUG;%(PreprocessorDefinitions) 20 | 21 | 22 | _DEBUG;%(PreprocessorDefinitions) 23 | 24 | 25 | true 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugDEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Debug Dynamic 6 | dynamic 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDebugDLL 17 | true 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugLEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Debug Link Time Code Generation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDebug 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/DebugSEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Debug Static 6 | static 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDebug 17 | true 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/EXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Application 6 | true 7 | 8 | 9 | 10 | 11 | _CONSOLE;%(PreprocessorDefinitions) 12 | 13 | 14 | Console 15 | 16 | 17 | -------------------------------------------------------------------------------- /builds/msvc/properties/Link.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Link Time Code Generation Settings 6 | ltcg 7 | 8 | 9 | 10 | 11 | true 12 | 13 | 14 | UseLinkTimeCodeGeneration 15 | 16 | 17 | true 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /builds/msvc/properties/Messages.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Build Messages 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /builds/msvc/properties/Output.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Output Settings 6 | 7 | $(ProjectDir)..\..\ 8 | $(ProjectDir)..\..\..\..\ 9 | $(ProjectDir)..\..\..\..\..\ 10 | $(ProjectDir)..\..\..\..\bin\$(PlatformName)\$(DebugOrRelease)\$(PlatformToolset)\$(DefaultLinkage)\ 11 | $(ProjectDir)..\..\..\..\obj\$(TargetName)\$(PlatformName)\$(DebugOrRelease)\$(PlatformToolset)\$(DefaultLinkage)\ 12 | $(OutDir) 13 | $(TargetName) 14 | $(TargetDir)$(TargetName)$(TargetExt) 15 | 16 | 17 | 18 | 19 | $(OutDir)$(TargetName).lib 20 | 21 | 22 | $(OutDir)$(TargetName).log 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /builds/msvc/properties/Release.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | <_PropertySheetDisplayName>Release Settings 10 | Release 11 | false 12 | 13 | 14 | 15 | 16 | /Oy- %(AdditionalOptions) 17 | 18 | true 19 | true 20 | OnlyExplicitInline 21 | false 22 | MaxSpeed 23 | NDEBUG;%(PreprocessorDefinitions) 24 | 25 | 26 | NDEBUG;%(PreprocessorDefinitions) 27 | 28 | 29 | true 30 | 31 | true 32 | 33 | 34 | 35 | 36 | 37 | StreamingSIMDExtensions2 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseDEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Release Dynamic 6 | dynamic 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreadedDLL 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseLEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Release Link Time Code Generation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreaded 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/ReleaseSEXE.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>Console Release Static 6 | static 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | MultiThreaded 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/Win32.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>x86 Settings 6 | 7 | 8 | 9 | 10 | WIN32;_WIN32;%(PreprocessorDefinitions) 11 | 12 | 13 | MachineX86 14 | 15 | 16 | /MACHINE:X86 %(AdditionalOptions) 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /builds/msvc/properties/x64.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>x64 Settings 6 | 7 | 8 | 9 | 10 | 13 | WIN32;_WIN32;WIN64;_WIN64;%(PreprocessorDefinitions) 14 | 15 | 16 | MachineX64 17 | 18 | 19 | /MACHINE:X64 %(AdditionalOptions) 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /builds/msvc/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by resource.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /builds/msvc/resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeromq/gsl/2611b3a29ee11e381a6747775046aa4a5f71ae55/builds/msvc/resource.rc -------------------------------------------------------------------------------- /builds/msvc/vs2010/gsl.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsl", "gsl\gsl.vcxproj", "{AD4A2E37-0B82-457C-995E-B9FA74A43472}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | LtcgDebug|Win32 = LtcgDebug|Win32 9 | LtcgDebug|x64 = LtcgDebug|x64 10 | LtcgRelease|Win32 = LtcgRelease|Win32 11 | LtcgRelease|x64 = LtcgRelease|x64 12 | StaticDebug|Win32 = StaticDebug|Win32 13 | StaticDebug|x64 = StaticDebug|x64 14 | StaticRelease|Win32 = StaticRelease|Win32 15 | StaticRelease|x64 = StaticRelease|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|Win32.ActiveCfg = DebugDEXE|Win32 19 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|Win32.Build.0 = DebugDEXE|Win32 20 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|x64.ActiveCfg = DebugDEXE|x64 21 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|x64.Build.0 = DebugDEXE|x64 22 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|Win32.ActiveCfg = ReleaseDEXE|Win32 23 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|Win32.Build.0 = ReleaseDEXE|Win32 24 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|x64.ActiveCfg = ReleaseDEXE|x64 25 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|x64.Build.0 = ReleaseDEXE|x64 26 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|Win32.ActiveCfg = DebugLEXE|Win32 27 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|Win32.Build.0 = DebugLEXE|Win32 28 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|x64.ActiveCfg = DebugLEXE|x64 29 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|x64.Build.0 = DebugLEXE|x64 30 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|Win32.ActiveCfg = ReleaseLEXE|Win32 31 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|Win32.Build.0 = ReleaseLEXE|Win32 32 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|x64.ActiveCfg = ReleaseLEXE|x64 33 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|x64.Build.0 = ReleaseLEXE|x64 34 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|Win32.ActiveCfg = DebugSEXE|Win32 35 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|Win32.Build.0 = DebugSEXE|Win32 36 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|x64.ActiveCfg = DebugSEXE|x64 37 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|x64.Build.0 = DebugSEXE|x64 38 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|Win32.ActiveCfg = ReleaseSEXE|Win32 39 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|Win32.Build.0 = ReleaseSEXE|Win32 40 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|x64.ActiveCfg = ReleaseSEXE|x64 41 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|x64.Build.0 = ReleaseSEXE|x64 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/gsl/gsl.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>GSL Common Settings 6 | AllRules.ruleset 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | $(RepoRoot)src\;%(AdditionalIncludeDirectories) 15 | 4996;%(DisableSpecificWarnings) 16 | false 17 | _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 18 | 19 | 20 | PCRE_STATIC;%(PreprocessorDefinitions) 21 | 22 | 23 | 24 | 25 | 26 | 27 | dynamic 28 | 29 | 30 | ltcg 31 | 32 | 33 | static 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /builds/msvc/vs2010/gsl/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/gsl.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Express 2012 for Windows Desktop 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsl", "gsl\gsl.vcxproj", "{AD4A2E37-0B82-457C-995E-B9FA74A43472}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | LtcgDebug|Win32 = LtcgDebug|Win32 9 | LtcgDebug|x64 = LtcgDebug|x64 10 | LtcgRelease|Win32 = LtcgRelease|Win32 11 | LtcgRelease|x64 = LtcgRelease|x64 12 | StaticDebug|Win32 = StaticDebug|Win32 13 | StaticDebug|x64 = StaticDebug|x64 14 | StaticRelease|Win32 = StaticRelease|Win32 15 | StaticRelease|x64 = StaticRelease|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|Win32.ActiveCfg = DebugDEXE|Win32 19 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|Win32.Build.0 = DebugDEXE|Win32 20 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|x64.ActiveCfg = DebugDEXE|x64 21 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynDebug|x64.Build.0 = DebugDEXE|x64 22 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|Win32.ActiveCfg = ReleaseDEXE|Win32 23 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|Win32.Build.0 = ReleaseDEXE|Win32 24 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|x64.ActiveCfg = ReleaseDEXE|x64 25 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.DynRelease|x64.Build.0 = ReleaseDEXE|x64 26 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|Win32.ActiveCfg = DebugLEXE|Win32 27 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|Win32.Build.0 = DebugLEXE|Win32 28 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|x64.ActiveCfg = DebugLEXE|x64 29 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgDebug|x64.Build.0 = DebugLEXE|x64 30 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|Win32.ActiveCfg = ReleaseLEXE|Win32 31 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|Win32.Build.0 = ReleaseLEXE|Win32 32 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|x64.ActiveCfg = ReleaseLEXE|x64 33 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.LtcgRelease|x64.Build.0 = ReleaseLEXE|x64 34 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|Win32.ActiveCfg = DebugSEXE|Win32 35 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|Win32.Build.0 = DebugSEXE|Win32 36 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|x64.ActiveCfg = DebugSEXE|x64 37 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticDebug|x64.Build.0 = DebugSEXE|x64 38 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|Win32.ActiveCfg = ReleaseSEXE|Win32 39 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|Win32.Build.0 = ReleaseSEXE|Win32 40 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|x64.ActiveCfg = ReleaseSEXE|x64 41 | {AD4A2E37-0B82-457C-995E-B9FA74A43472}.StaticRelease|x64.Build.0 = ReleaseSEXE|x64 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/gsl/gsl.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <_PropertySheetDisplayName>GSL Common Settings 6 | AllRules.ruleset 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | $(RepoRoot)src\;%(AdditionalIncludeDirectories) 15 | 4996;%(DisableSpecificWarnings) 16 | false 17 | _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) 18 | 19 | 20 | PCRE_STATIC;%(PreprocessorDefinitions) 21 | 22 | 23 | 24 | 25 | 26 | 27 | dynamic 28 | 29 | 30 | ltcg 31 | 32 | 33 | static 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /builds/msvc/vs2012/gsl/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ci_build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # This script is used by travis ci to test updates for zproject itself: 5 | # it builds a latest GSL, then zproject, and tests it by regenerating 6 | # a stable consumer project (CZMQ) which is expected to pass well. 7 | # Optionally speeds up the compilation steps using ccache (stashed). 8 | # 9 | 10 | set -e 11 | 12 | # Set this to enable verbose profiling 13 | [ -n "${CI_TIME-}" ] || CI_TIME="" 14 | case "$CI_TIME" in 15 | [Yy][Ee][Ss]|[Oo][Nn]|[Tt][Rr][Uu][Ee]) 16 | CI_TIME="time -p " ;; 17 | [Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee]) 18 | CI_TIME="" ;; 19 | esac 20 | 21 | # Set this to enable verbose tracing 22 | [ -n "${CI_TRACE-}" ] || CI_TRACE="no" 23 | case "$CI_TRACE" in 24 | [Nn][Oo]|[Oo][Ff][Ff]|[Ff][Aa][Ll][Ss][Ee]) 25 | set +x ;; 26 | [Yy][Ee][Ss]|[Oo][Nn]|[Tt][Rr][Uu][Ee]) 27 | set -x ;; 28 | esac 29 | 30 | case "$BUILD_TYPE" in 31 | "default") 32 | mkdir tmp 33 | BUILD_PREFIX="$PWD/tmp" 34 | 35 | CCACHE_PATH="$PATH" 36 | CCACHE_DIR="${HOME}/.ccache" 37 | export CCACHE_PATH CCACHE_DIR 38 | # ccache -s 2>/dev/null || true 39 | 40 | [ -z "$CI_TIME" ] || echo "`date`: Starting build of gsl..." 41 | ( EXTRA_MAKE_OPTS="" 42 | cd ./src && \ 43 | CCACHE_BASEDIR=${PWD} && \ 44 | export CCACHE_BASEDIR && \ 45 | $CI_TIME make $EXTRA_MAKE_OPTS -j4 test && \ 46 | DESTDIR="${BUILD_PREFIX}" $CI_TIME make $EXTRA_MAKE_OPTS install \ 47 | ) || exit 1 48 | 49 | [ -z "$CI_TIME" ] || echo "`date`: Builds completed without fatal errors!" 50 | 51 | echo "=== What is the GSL binary linked against (note libpcre in particular)?" 52 | if [ $TRAVIS_OS_NAME == "linux" ]; then 53 | ldd src/gsl || true 54 | elif [ $TRAVIS_OS_NAME == "osx" ]; then 55 | otool -L src/gsl || true 56 | else 57 | echo "Unsupported platform $TRAVIS_OS_NAME" 58 | fi 59 | 60 | echo "=== Self-test GSL parser" 61 | (cd src && $CI_TIME make check) || exit $? 62 | 63 | echo "=== How well did ccache help on this platform?" 64 | ccache -s 2>/dev/null || true 65 | echo "===" 66 | ;; 67 | *) 68 | pushd "./builds/${BUILD_TYPE}" && \ 69 | REPO_DIR="$(dirs -l +1)" $CI_TIME ./ci_build.sh \ 70 | || exit 1 71 | ;; 72 | esac 73 | 74 | echo "=== Are GitIgnores good after making zproject '$BUILD_TYPE'? (should have no output below)" 75 | git status -s || true 76 | echo "===" 77 | -------------------------------------------------------------------------------- /doc/denormalizing.txt: -------------------------------------------------------------------------------- 1 | Denormalizing Trees 2 | =================== 3 | 4 | In code generating, it is useful to work with a single tree in memory. However if the data sources are disparate, 5 | a useful first step is to combine the data sources into a single tree before starting code generation. 6 | 7 | This "denormalizing" step is accomplished by essentially "looking up" each normalized attribute and appending it to the target. 8 | 9 | Here is an example. Suppose you had an XML file listing fruits and the zones where they grow and 10 | another file describing the zones, and your task is to generate a set of data where each fruit 11 | is listed with its corresponding zone description. 12 | 13 | #File: fruits.xml 14 | 15 | .pull examples/fruits.xml,code 16 | 17 | #File: zones.xml 18 | 19 | .pull examples/zones.xml,code 20 | 21 | The easiest method is to generate a third file, say, "fruits-denormalized.xml", containing the desired data, 22 | and use that to drive the generation step. 23 | 24 | Here is the GSL script to accomplish that: 25 | 26 | 1 .template 0 27 | 2 zones = XML.load_file("zones.xml") 28 | 3 for fruit 29 | 4 .zone_desc = zones->zone(name = .zone).description ? "" 30 | 5 endfor 31 | 6 root.save("fruits-denormalized.xml") 32 | 7 .endtemplate 33 | 34 | 35 | This script is invoked as: 36 | 37 | gsl -script:fruits.gsl fruits.xml 38 | 39 | which will start off in template mode. However, since this script does not generate template output, 40 | line 1 turns off template mode so each line does not have to be prefixed with a dot. 41 | 42 | Line 2 loads the lookup file into a variable named `zones`. The line executes at the top level scope, so 43 | the variable is really named 'global.zones'. While it is not necessary to be explicit here, a more complicated 44 | script that loads the data in a different scope may need to be explicit. Note that the xml file must be valid XML. 45 | It may help to run all xml files through xmllint to be sure. Otherwise gsl will complain with a misleading error. 46 | This will be fixed in future version. 47 | 48 | 49 | Lines 3 to 5 loop over the input file `fruits.xml` and for each fruit item, does a lookup for the corresponding zone 50 | and appends the associated description. Normally, if the item were not found, GSL would complain and stop. However, default operator '?' is used to suppress that behaviour and instead assign an empty string in that case. 51 | 52 | Finally, the modified tree is saved to a file, ready to be used for a generation task. 53 | 54 | File: fruits-denormalized.xml 55 | 56 | .pull examples/fruits-denormalized.xml,code 57 | 58 | This lookup mechanism could be used directly during the generation step, of course. 59 | However, I generally decompose steps into discrete pieces whenever possible so I can keep track of one step at a time. 60 | -------------------------------------------------------------------------------- /doc/examples/directory-iteration.gsl: -------------------------------------------------------------------------------- 1 | dir = directory.open(".", error_text) ? 2 | 3 | if defined(dir) 4 | for dir.file as f 5 | echo "file:$(f.name) has size: $(f.size)" 6 | endfor 7 | else 8 | abort "Error: " + error_text 9 | endif -------------------------------------------------------------------------------- /doc/examples/error-parameter.gsl: -------------------------------------------------------------------------------- 1 | dir = directory.open(".", error_text) ? 2 | 3 | if ! defined(dir) 4 | abort "E: cannot open directory: " + error_text 5 | endif -------------------------------------------------------------------------------- /doc/examples/fruits-denormalized.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /doc/examples/fruits.gsl: -------------------------------------------------------------------------------- 1 | .template 0 2 | global.zones = XML.load_file("zones.xml", err) 3 | 4 | for fruit 5 | .zone_desc = zones->zone(name = .zone).description ? "unknown" 6 | endfor 7 | 8 | root.save("fruits-denormalized.xml") 9 | .endtemplate 10 | -------------------------------------------------------------------------------- /doc/examples/fruits.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/examples/regression-case1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/examples/regression-case2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Test 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/examples/regression-gsl.gsl: -------------------------------------------------------------------------------- 1 | .template 0 2 | if defined(options->code->BEGIN) 3 | echo "not empty" 4 | >$(options->code->BEGIN.) 5 | else 6 | echo "is empty" 7 | endif 8 | endtemplate 9 | -------------------------------------------------------------------------------- /doc/examples/zones.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/modules/ggconv.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/conv package 2 | 3 | Class: Conversion Functions 4 | 5 | Function: conv . chr (arg) 6 | Converts ascii code to character. 7 | If the argument is a number between 1 and 255, inclusive, 8 | returns the character represented by the ascii code. 9 | If the argument is a number is outside the range, 10 | returns the empty string. 11 | 12 | Function: conv . number (arg) 13 | Converts numeric looking input to number value. 14 | If the argument looks like a number, returns the numeric value. 15 | 16 | Function: conv . ord (arg) 17 | Converts character to ascii code. 18 | If the argument is a string, returns the ascii 19 | code of the first character, only. 20 | 21 | Function: conv . string (arg) 22 | Converts input to string value. 23 | If the argument is defined, returns string value. 24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/modules/ggdiag.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/diag package 2 | 3 | Class: Diagnostic Functions 4 | 5 | Function: diag . used () 6 | Shows amount (bytes) of memory allocated. 7 | 8 | Function: diag . allocs () 9 | Shows number of memory allocations. 10 | 11 | Function: diag . frees () 12 | Shows number of memory deallocations. Should equal allocs. 13 | 14 | Function: diag . display (filename) 15 | Writes the contents of the memory allocation list to the specified file. 16 | 17 | Function: diag . checkall () 18 | Checks all allocated memory blocks for corruption and terminates 19 | the program if any are found. 20 | 21 | Function: diag . raise (signal) 22 | Send a signal corresponding to the numeric argument to the gsl process. 23 | See signal(2) for numeric signal values. 24 | 25 | Function: diag . animate (value) 26 | Control GSL finite state machine progress where applicable. 27 | Use non-zero numeric argument to enable and a zero to disable. 28 | 29 | Function: diag . console_set_mode (mode) 30 | Sets console display mode; the argument can be one of: 31 | 32 | 0 - Output text exactly as specified. (Default). 33 | 1 - Prefix text by "yy/mm/dd hh:mm:ss " 34 | 2 - Prefix text by "hh:mm:ss " 35 | 3 - Same as #2 but output is fully flushed 36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/modules/ggenvt.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/environment package 2 | 3 | Class: Environment Functions 4 | 5 | Function: env . get (name) 6 | Returns value of environment variable `name`, if it exists. 7 | 8 | Function: env . set (name,[value]) 9 | If value is provided, sets environment variable `name` to `value`. 10 | Otherwise, clears environment variable `name`. 11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/modules/gggsl.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/gsl control package 2 | 3 | Class: GSL Control Class 4 | 5 | Function: gsl . include (filename,[template]) 6 | Includes a GSL script file. 7 | 8 | Uses the current template mode unless over-ridden by the optional argument. 9 | 10 | Function: gsl . exec (command,[template]) 11 | Executes a GSL script. If the script does not open an output file, 12 | its output is returned as the result of this function. 13 | 14 | Uses the current template mode unless over-ridden by the optional argument. 15 | 16 | 17 | -------------------------------------------------------------------------------- /doc/modules/ggmath.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/math package 2 | 3 | Class: Math Functions 4 | 5 | Function: math . abs (parm) 6 | 7 | Function: math . ceil (parm) 8 | 9 | Function: math . floor (parm) 10 | 11 | Function: math . mod (x,y) 12 | 13 | Function: math . rand () 14 | 15 | Function: math . sqrt (parm) 16 | 17 | Function: math . exp (parm) 18 | 19 | Function: math . log (parm) 20 | 21 | Function: math . log10 (parm) 22 | 23 | Function: math . pow (x,y) 24 | 25 | Function: math . sin (parm) 26 | 27 | Function: math . cos (parm) 28 | 29 | Function: math . tan (parm) 30 | 31 | Function: math . sinh (parm) 32 | 33 | Function: math . cosh (parm) 34 | 35 | Function: math . tanh (parm) 36 | 37 | Function: math . asin (parm) 38 | 39 | Function: math . acos (parm) 40 | 41 | Function: math . atan (parm) 42 | 43 | Function: math . atan2 (x,y) 44 | 45 | Function: math . pi () 46 | 47 | Function: math . asinh (parm) 48 | 49 | Function: math . acosh (parm) 50 | 51 | Function: math . atanh (parm) 52 | 53 | 54 | -------------------------------------------------------------------------------- /doc/modules/ggpcre.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/regexp package 2 | 3 | Class: Regular Expression Functions 4 | 5 | Function: regexp . match (pattern,subject,[match]) 6 | 7 | 8 | -------------------------------------------------------------------------------- /doc/modules/ggproc.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/process management 2 | package 3 | 4 | Class: Process 5 | 6 | Function: proc . new (command,[workdir],[inname],[outname],[errname]) 7 | Creates a process object. The command is a native system command. Does 8 | not execute the command. 9 | 10 | The `command` argument names a file to execute along with possible arguments. 11 | The command will be searched for in the directories specified by the 12 | PATH environment variable. 13 | 14 | If `workdir` is provided, a chdir will be performed before the process is run. 15 | 16 | If `inname`, `outname`, `errname` are provided, 17 | the stdin, stdout, and stderr for the process will be 18 | respectively redirected to the named files. 19 | 20 | Returns the process object. 21 | 22 | 23 | Class: Process handle 24 | 25 | Function: . setenv (name,[value]) 26 | Sets an environment variable for the process. Can only be called before 27 | the process is started with proc_handle.run () 28 | 29 | Function: . getenv (name) 30 | Gets an environment variable from the process. 31 | Can only be called before the process is started with proc_handle.run () 32 | 33 | Function: . run ([error]) 34 | Runs a process created with proc.new () 35 | 36 | Returns -1 if there was an error creating the object. 37 | Also places an error message into the parameter error. 38 | 39 | 40 | -------------------------------------------------------------------------------- /doc/modules/ggscrp.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/script package 2 | 3 | Class: GSL Script Line 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/modules/ggsock.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/socket package 2 | 3 | Class: Socket 4 | 5 | Function: sock . passive (service,[error]) 6 | 7 | Function: sock . connect ([host],service,[timeout],[error]) 8 | 9 | 10 | Class: Socket handle 11 | 12 | Function: . accept ([timeout],[error]) 13 | 14 | Function: . close ([timeout],[error]) 15 | 16 | Function: . read (buffer,[minimum],[timeout],[error]) 17 | 18 | Function: . write (buffer,[timeout],[error]) 19 | 20 | 21 | -------------------------------------------------------------------------------- /doc/modules/ggstrn.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/string package 2 | 3 | Class: String Functions 4 | 5 | Function: string . length (string) 6 | 7 | Function: string . locate (haystack,needle) 8 | 9 | Function: string . locate_last (haystack,needle) 10 | 11 | Function: string . substr (string,[start],[end],[length]) 12 | 13 | Function: string . trim (string) 14 | 15 | Function: string . justify (string,width,[prefix]) 16 | 17 | Function: string . certify (number,[language]) 18 | 19 | Function: string . replace (strbuf,strpattern) 20 | 21 | Function: string . match (string1,string2) 22 | 23 | Function: string . prefixed (string,prefix) 24 | 25 | Function: string . prefix (string,delims) 26 | 27 | Function: string . defix (string,delims) 28 | 29 | Function: string . hash (string) 30 | 31 | Function: string . convch (string,from,to) 32 | 33 | Function: string . lexcmp (string1,string2) 34 | 35 | Function: string . lexncmp (string1,string2,count) 36 | 37 | Function: string . lexwcmp (string1,pattern) 38 | 39 | Function: string . matchpat (string1,pattern,[ic]) 40 | 41 | Function: string . soundex (string) 42 | 43 | Function: string . cntch (string,value) 44 | 45 | 46 | -------------------------------------------------------------------------------- /doc/modules/ggsymb.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/symb package 2 | 3 | Class: Symbol 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/modules/ggthrd.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/thrd package 2 | 3 | Class: Thread 4 | 5 | Function: thread . parse (command,[error]) 6 | Parses the command, placing any error message in the parameter 'error'. 7 | Errors can also be recovered via thread class attributes. 8 | If successful, returns an object of type 'parsed item' which can 9 | then be run as many times as necessary, saving the need to re-parse 10 | each time. 11 | 12 | Function: thread . new (command,[error]) 13 | Parses and runs the command, placing any error message in the parameter 14 | 'error'. Errors can also be recovered via thread class and child thread 15 | object attributes. If the parsing was successful, returns an object 16 | of type 'child thread'. 17 | 18 | Function: thread . sleep (csecs) 19 | Puts the current thread to sleep for the specified number of centiseconds. 20 | Returns -1 if csecs is invalid. 21 | 22 | Function: thread . receive ([receive]) 23 | Receives a message from the thread's message queue. If the queue is empty, 24 | the thread sleeps until a message is available. 25 | 26 | Places a reference to the sending thread in the first parameter. Places 27 | arbitrary values from the message into successive parameters. 28 | 29 | 30 | Class: Thread 31 | 32 | Function: . send () 33 | Sends a message with an arbitrary number of arguments to the thread. 34 | 35 | 36 | Class: Thread 37 | 38 | Function: . interrupt () 39 | Shuts down the thread. 40 | 41 | Function: . send () 42 | Sends a message with an arbitrary number of arguments to the thread. 43 | 44 | 45 | Class: Thread 46 | 47 | Function: . run ([error]) 48 | 49 | 50 | -------------------------------------------------------------------------------- /doc/modules/ggtime.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/time package 2 | 3 | Class: Time Functions 4 | 5 | Function: time . picture ([time],[picture]) 6 | 7 | Function: time . number (time) 8 | 9 | Function: time . now ([date],[time]) 10 | Assigns date and time to the passed parameters. Also returns the time. 11 | 12 | Function: time . diff (date1,time1,date2,time2) 13 | Returns the difference (in csecs) between two date/times. 14 | 15 | 16 | Class: Date Functions 17 | 18 | Function: date . picture ([date],[picture]) 19 | 20 | Function: date . number (date) 21 | 22 | 23 | -------------------------------------------------------------------------------- /doc/modules/ggxml.txt: -------------------------------------------------------------------------------- 1 | MODULE: GSL/XML package 2 | 3 | Class: XML 4 | 5 | Function: XML . new ([name]) 6 | Creates a free 'unattached' XML item. In reality it is attached to the 7 | global variable ancestor, but only so that GSL can de-allocate it on 8 | termination. 9 | 10 | Therefore if the GSL script does not deallocate the item, it will remain 11 | until GSL shuts down. 12 | 13 | Function: XML . load_string (string,[error]) 14 | Loads the supplied string as an XML item. 15 | Returns a pointer to the (first) resulting XML item or undefined if there 16 | was an error. In the latter case, an error message is placed in the 17 | parameter 'error' and in the XML thread context. 18 | 19 | Function: XML . load_file (filename,[error]) 20 | Loads the file with the supplied name as an XML item. 21 | Returns a pointer to the (first) resulting XML item or undefined if there 22 | was an error. In the latter case, an error message is placed in the 23 | parameter 'error' and in the XML thread context. 24 | 25 | 26 | Class: XML item 27 | 28 | Function: . deleted () 29 | Returns TRUE if the XML item has been deleted. 30 | 31 | Function: . prev () 32 | Returns the previous XML item. 33 | 34 | Function: . string () 35 | Returns the XML item formatted as a string. 36 | 37 | Function: . load_string (string,[error]) 38 | Loads the supplied string as a child of the item. 39 | Returns a pointer to the (first) resulting XML item or undefined if there 40 | was an error. In the latter case, an error messa ge is placed in the 41 | parameter 'error' and in the XML thread context. 42 | 43 | Function: . load_file (filename,[error]) 44 | Loads the file with the supplied name as a child of the item. 45 | Returns a pointer to the (first) resulting XML item or undefined if there 46 | was an error. In the latter case, an error message is placed in the 47 | parameter 'error' and in the XML thread context. 48 | 49 | Function: . save (filename,[error]) 50 | Saves the XML item to a file with the given name. Any file errors are 51 | places in the parameter 'error' and in the XML thread context. Returns 52 | zero if no error occurred, errno otherwise. 53 | 54 | 55 | Class: XML value 56 | 57 | 58 | -------------------------------------------------------------------------------- /examples/zs_lex.h: -------------------------------------------------------------------------------- 1 | /* ========================================================================= 2 | zs_lex - the ZeroScript lexer 3 | 4 | Copyright (c) the Contributors as noted in the AUTHORS file. 5 | This file is part of the ZeroScript language, http://zeroscript.org. 6 | 7 | This Source Code Form is subject to the terms of the Mozilla Public 8 | License, v. 2.0. If a copy of the MPL was not distributed with this 9 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | ========================================================================= 11 | */ 12 | 13 | #ifndef ZS_LEX_H_INCLUDED 14 | #define ZS_LEX_H_INCLUDED 15 | 16 | #include 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | // Opaque class structure 23 | typedef struct _zs_lex_t zs_lex_t; 24 | 25 | typedef enum { 26 | zs_lex_function, // function name 27 | zs_lex_compose, // function name followed by : 28 | zs_lex_string, // string 29 | zs_lex_number, // number expression 30 | zs_lex_open, // open list 31 | zs_lex_close, // close list 32 | zs_lex_invalid, // Syntax error 33 | zs_lex_null, // Nothing to return 34 | zs_lex_tokens // Size of this set 35 | } zs_lex_token_t; 36 | 37 | 38 | // @interface 39 | // Create a new zs_lex, return the reference if successful, or NULL 40 | // if construction failed due to lack of available memory. 41 | zs_lex_t * 42 | zs_lex_new (void); 43 | 44 | // Destroy the zs_lex and free all memory used by the object. 45 | void 46 | zs_lex_destroy (zs_lex_t **self_p); 47 | 48 | // Enable verbose tracing of lexer 49 | void 50 | zs_lex_verbose (zs_lex_t *self, bool verbose); 51 | 52 | // Start parsing buffer, return type of first token 53 | zs_lex_token_t 54 | zs_lex_first (zs_lex_t *self, const char *input); 55 | 56 | // Continue parsing buffer, return type of next token 57 | zs_lex_token_t 58 | zs_lex_next (zs_lex_t *self); 59 | 60 | // Return actual token value, if any 61 | const char * 62 | zs_lex_token (zs_lex_t *self); 63 | 64 | // Return position of last processed character in text 65 | uint 66 | zs_lex_offset (zs_lex_t *self); 67 | 68 | // Return number of processing cycles used so far 69 | uint64_t 70 | zs_lex_cycles (zs_lex_t *self); 71 | 72 | // Self test of this class 73 | void 74 | zs_lex_test (bool animate); 75 | // @end 76 | 77 | #ifdef __cplusplus 78 | } 79 | #endif 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /images/README_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeromq/gsl/2611b3a29ee11e381a6747775046aa4a5f71ae55/images/README_1.png -------------------------------------------------------------------------------- /packaging/debian/.gitignore: -------------------------------------------------------------------------------- 1 | debhelper-* 2 | .debhelper/* 3 | files 4 | *.substvars 5 | generator-scripting-language-dbg/* 6 | generator-scripting-language-examples/* 7 | generator-scripting-language/* 8 | -------------------------------------------------------------------------------- /packaging/debian/changelog: -------------------------------------------------------------------------------- 1 | generator-scripting-language (4.1.5-0.1) UNRELEASED; urgency=low 2 | 3 | * Initial packaging. 4 | 5 | -- GSL Developers Sun, 21 Aug 2016 00:00:00 +0000 6 | -------------------------------------------------------------------------------- /packaging/debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /packaging/debian/control: -------------------------------------------------------------------------------- 1 | Source: generator-scripting-language 2 | Section: devel 3 | Priority: optional 4 | Maintainer: GSL Developers 5 | Standards-Version: 4.1.0 6 | Build-Depends: debhelper (>= 9), 7 | libpcre3-dev, 8 | Homepage: https://github.com/zeromq/gsl 9 | 10 | Package: generator-scripting-language 11 | Architecture: any 12 | Depends: ${misc:Depends}, 13 | ${shlibs:Depends}, 14 | Description: Generator Scripting Language code generator 15 | GSL/4.1 is a code construction tool. It will generate code in all 16 | languages and for all purposes. If this sounds too good to be true, 17 | welcome to 1996, when we invented these techniques. Magic is simply 18 | technology that is twenty years ahead of its time. In addition to 19 | code construction, GSL has been used to generate database schema 20 | definitions, user interfaces, reports, system administration tools 21 | and much more. 22 | 23 | Package: generator-scripting-language-dbg 24 | Architecture: any 25 | Section: debug 26 | Depends: 27 | generator-scripting-language (= ${binary:Version}), 28 | ${misc:Depends}, 29 | Description: debugging symbols for generator-scripting-language 30 | This package contains the debugging symbols for generator-scripting-language. 31 | 32 | Package: generator-scripting-language-examples 33 | Architecture: all 34 | Depends: ${misc:Depends}, 35 | generator-scripting-language (>= ${source:Version}), 36 | Description: Examples for the Generator Scripting Language code generator 37 | GSL/4.1 is a code construction tool. It will generate code in all 38 | languages and for all purposes. If this sounds too good to be true, 39 | welcome to 1996, when we invented these techniques. Magic is simply 40 | technology that is twenty years ahead of its time. In addition to 41 | code construction, GSL has been used to generate database schema 42 | definitions, user interfaces, reports, system administration tools 43 | and much more. 44 | . 45 | This package contains examples to get started with gsl. 46 | -------------------------------------------------------------------------------- /packaging/debian/generator-scripting-language-examples.install: -------------------------------------------------------------------------------- 1 | examples/* usr/share/generator-scripting-language/examples/ 2 | doc/examples/* usr/share/generator-scripting-language/examples/ 3 | -------------------------------------------------------------------------------- /packaging/debian/generator-scripting-language.docs: -------------------------------------------------------------------------------- 1 | doc/denormalizing.md 2 | doc/denormalizing.txt 3 | doc/modules/* 4 | images/README*.png 5 | README.md 6 | README.txt 7 | -------------------------------------------------------------------------------- /packaging/debian/generator-scripting-language.dsc: -------------------------------------------------------------------------------- 1 | Format: 3.0 (quilt) 2 | Binary: generator-scripting-language 3 | Source: generator-scripting-language 4 | Version: 4.1.5-0.1 5 | Maintainer: GSL Developers 6 | Architecture: any 7 | Standards-Version: 4.1.0 8 | Build-Depends: debhelper (>= 9), 9 | libpcre3-dev, 10 | Homepage: https://github.com/zeromq/gsl 11 | 12 | Files: 13 | 7697688bf65a35bc33ae2db51ebb0e3b 818110 generator-scripting-language.tar.gz 14 | -------------------------------------------------------------------------------- /packaging/debian/generator-scripting-language.install: -------------------------------------------------------------------------------- 1 | usr/bin 2 | -------------------------------------------------------------------------------- /packaging/debian/generator-scripting-language.manpages: -------------------------------------------------------------------------------- 1 | debian/tmp/usr/share/man/man1/gsl.1 2 | -------------------------------------------------------------------------------- /packaging/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | #export DH_VERBOSE=1 3 | export DEB_BUILD_MAINT_OPTIONS = hardening=+all 4 | export PREFIX=/usr 5 | 6 | ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) 7 | PAR := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) 8 | MAKEFLAGS += -j$(PAR) 9 | endif 10 | 11 | %: 12 | dh $@ --parallel 13 | 14 | override_dh_strip: 15 | dh_strip --dbg-package=generator-scripting-language-dbg 16 | -------------------------------------------------------------------------------- /packaging/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /packaging/debian/source/lintian-overrides: -------------------------------------------------------------------------------- 1 | generator-scripting-language: outdated-autotools-helper-file 2 | -------------------------------------------------------------------------------- /packaging/docker/run_gsl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # $GSL_BUILD_DIR points to directory holding sources 4 | SCRIPTS_PATH=${GSL_SCRIPTS_PATH-/scripts} 5 | export PATH=$PATH:$SCRIPTS_PATH 6 | BUILD_DIR=${GSL_BUILD_DIR-/gsl} 7 | cd "$BUILD_DIR" || exit 1 8 | gsl "$@" 9 | -------------------------------------------------------------------------------- /packaging/linux/create_tarball.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PACKAGE_TMP="/tmp" 4 | PACKAGE_NAME="imatix-gsl" 5 | PACKAGE_VERSION="4.1.5" 6 | 7 | SCRIPTS_DIR=$(dirname $(cd ${0%/*} 2>>/dev/null ; echo `pwd`/${0##*/})) 8 | PROJECT_DIR="$(realpath ${SCRIPTS_DIR}/../../)" 9 | PROJECT_NAME=$(basename $PROJECT_DIR) 10 | 11 | rm -rf $PACKAGE_TMP/$PACKAGE_NAME-$PACKAGE_VERSION 12 | cd $PROJECT_DIR/.. 13 | cp -r $PROJECT_NAME ${PACKAGE_TMP}/${PACKAGE_NAME}-${PACKAGE_VERSION} 14 | cd $PACKAGE_TMP/${PACKAGE_NAME}-${PACKAGE_VERSION}/ 15 | rm -rf .git 16 | cd ../ 17 | tar cfz ${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz ${PACKAGE_NAME}-${PACKAGE_VERSION} 18 | cd $SCRIPTS_DIR 19 | pwd 20 | echo "File was created at ${PACKAGE_TMP}/${PACKAGE_NAME}-${PACKAGE_VERSION}.tar.gz" 21 | -------------------------------------------------------------------------------- /packaging/linux/rpm/SPECS/generator-scripting-language.spec: -------------------------------------------------------------------------------- 1 | %define revision 0 2 | %undefine _debugsource_packages 3 | 4 | Summary: imatix GSL is a code construction tool 5 | Name: generator-scripting-language 6 | Version: 4.1.5 7 | Release: %{revision}%{?dist} 8 | License: GPL-3.0-or-later 9 | Group: Libraries 10 | Source0: http://download.zeromq.org/%{name}-%{version}.tar.gz 11 | URL: http://zeromq.org/ 12 | BuildRequires: pcre-devel 13 | 14 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) 15 | 16 | %description 17 | GSL/4.1 is a code construction tool. It will generate code in all languages 18 | and for all purposes. If this sounds too good to be true, welcome to 1996, 19 | when we invented these techniques. Magic is simply technology that is twenty 20 | years ahead of its time. In addition to code construction, GSL has been used 21 | to generate database schema definitions, user interfaces, reports, system 22 | administration tools and much more. 23 | 24 | %prep 25 | %setup -q -n %{name}-%{version} 26 | %build 27 | make %{?_smp_mflags} 28 | %install 29 | %{__rm} -rf $RPM_BUILD_ROOT 30 | %{__make} install \ 31 | DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr 32 | %post -p /sbin/ldconfig 33 | 34 | %postun -p /sbin/ldconfig 35 | 36 | %clean 37 | %{__rm} -rf $RPM_BUILD_ROOT 38 | 39 | %files 40 | %defattr(644,root,root,755) 41 | %doc doc/denormalizing.md 42 | %doc doc/denormalizing.txt 43 | %doc doc/modules/* 44 | %doc README.md 45 | %doc README.txt 46 | %{_mandir}/man1/* 47 | %attr(755,root,root) %{_bindir}/gsl 48 | 49 | %package -n %{name}-examples 50 | Summary: imatix GSL is a code construction tool 51 | Requires: %{name} = %{version} 52 | 53 | %description -n %{name}-examples 54 | This package contains examples to get started with gsl. 55 | 56 | %files -n %{name}-examples 57 | %defattr(-,root,root) 58 | %doc examples/* 59 | %doc doc/examples/* 60 | 61 | %changelog 62 | * Wed Dec 31 2014 GSL Developers 2 | 3 | -------------------------------------------------------------------------------- /packaging/nuget/package.gsl: -------------------------------------------------------------------------------- 1 | .# Generate NuGet nuspec file (for subsequent packing). 2 | .# 3 | .# This is a code generator built using the iMatix GSL code generation 4 | .# language. See https://github.com/imatix/gsl for details. This script 5 | .# is licensed under MIT/X11. 6 | .# 7 | .echo "Generating package.nuspec from template." 8 | .output "package.nuspec" 9 | 10 | 15 | 16 | 17 | $(package.id) 18 | $(package.version) 19 | $(package.id) 20 | Pieter Hintjens and others 21 | Eric Voskuil 22 | https://raw.github.com/imatix/gsl/master/COPYING 23 | https://github.com/imatix/gsl 24 | http://upload.wikimedia.org/wikipedia/en/e/ef/Command_prompt_icon_%28windows%29.png 25 | true 26 | false 27 | GSL is a single file executable tool for generating or transforming source code in all languages. GSL is a simple language and you'll not have any difficulty understanding its syntax. 28 | GSL is a code construction tool based on GSL/4.1. 29 | https://github.com/imatix/gsl 30 | GPL v3 31 | gsl, gslgen, codegen, T4, template, iMatix, model 32 | 33 | .for dependency 34 | 35 | .endfor 36 | 37 | 38 | 39 | 40 | 41 | 46 | -------------------------------------------------------------------------------- /packaging/nuget/package.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | gsl 10 | 4.1.5.0 11 | gsl 12 | Pieter Hintjens and others 13 | Eric Voskuil 14 | https://raw.github.com/imatix/gsl/master/COPYING 15 | https://github.com/imatix/gsl 16 | http://upload.wikimedia.org/wikipedia/en/e/ef/Command_prompt_icon_%28windows%29.png 17 | true 18 | true 19 | GSL is a single file executable tool for generating or transforming source code in all languages. GSL is a simple language and you'll not have any difficulty understanding its syntax. 20 | GSL is a code construction tool based on GSL/4.1. 21 | https://github.com/imatix/gsl 22 | GPL v3 23 | gsl, gslgen, codegen, T4, template, iMatix, model 24 | 25 | 26 | 27 | 28 | 33 | -------------------------------------------------------------------------------- /packaging/redhat/generator-scripting-language.spec: -------------------------------------------------------------------------------- 1 | ../linux/rpm/SPECS/generator-scripting-language.spec -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | gsl 3 | *.a 4 | 5 | -------------------------------------------------------------------------------- /src/console.gsl: -------------------------------------------------------------------------------- 1 | # Trivial GSL console 2 | # Just to show the idea 3 | # 4 | console.put (console.version ()) 5 | console.put ( 'Welcome to the GSL console. 6 | From here you can run GSL commands interactively. 7 | Type any GSL command and press [Enter] to execute it. 8 | Type \'exit\' to leave the command console. 9 | ') 10 | 11 | while 1 12 | string = console.get ("> ") 13 | if string = "exit" 14 | last 15 | endif 16 | gsl string 17 | endwhile 18 | 19 | -------------------------------------------------------------------------------- /src/ggcode.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * ggcode.i - LIBERO dialog interpreter for ggcode.c. * 3 | * Generated by LIBERO 2.4 on 9 Sep, 2014, 21:58. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 92; 19 | agent-> maxmodule = 131; 20 | agent-> maxstate = 25; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 24; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/ggconv.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggconv.h - GSL/conv package header 3 | * 4 | * Generated from ggconv by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGCONV_INCLUDED 11 | #define GGCONV_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | conv_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_conv_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggdiag.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggdiag.h - GSL/diag package header 3 | * 4 | * Generated from ggdiag by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGDIAG_INCLUDED 11 | #define GGDIAG_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | diag_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_diag_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggdoc.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- ggdoc.gsl - Object module documentation generator 4 | .- 5 | .- 6 | .- Copyright (c) 1996-2010 iMatix Corporation 7 | .- 8 | .- This program is free software; you can redistribute it and/or modify 9 | .- it under the terms of the GNU General Public License as published by 10 | .- the Free Software Foundation; either version 3 of the License, or (at 11 | .- your option) any later version. 12 | .- 13 | .- This program is distributed in the hope that it will be useful, but 14 | .- WITHOUT ANY WARRANTY; without even the implied warranty of 15 | .- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | .- General Public License for more details. 17 | .- 18 | .- For information on alternative licensing for OEMs, please contact 19 | .- iMatix Corporation. 20 | .- 21 | .------------------------------------------------------------------------------ 22 | .- 23 | .xml to root << . 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | . 38 | .- 39 | MODULE: $(title:) 40 | 41 | .for class by - register ? 1 42 | Class: $(title:) 43 | 44 | . for function 45 | Function: $(!register??'<'?)$(class.name:)$(!register??'>'?) . \ 46 | $(name:) (\ 47 | . for parameter 48 | $(compulsory??''?'[')$(name:)$(compulsory??''?']')$(!last()??','?)\ 49 | . endfor 50 | ) 51 | . if defined (-> description) 52 | $(string.trim(->description.)) 53 | . endif 54 | 55 | . endfor 56 | 57 | .endfor 58 | -------------------------------------------------------------------------------- /src/ggenvt.gxl: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | Returns value of environment variable `name`, if it exists. 33 | 34 | 35 | 36 | { 37 | result-> value. s = mem_strdup (getenv (string_value (& name-> value))); 38 | if (result-> value. s) 39 | result-> value. type = TYPE_STRING; 40 | 41 | return 0; 42 | } 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | If value is provided, sets environment variable `name` to `value`. 51 | Otherwise, clears environment variable `name`. 52 | 53 | 54 | 55 | 56 | 57 | { 58 | result-> value. type = TYPE_NUMBER; 59 | if (value 60 | && value-> value. type != TYPE_UNDEFINED) 61 | result-> value. n = env_set (string_value (& name-> value), 62 | string_value (& value-> value), 63 | 1); 64 | else 65 | { 66 | env_clear (string_value (& name-> value)); 67 | result-> value. n = 0; 68 | } 69 | return 0; 70 | } 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /src/ggenvt.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggenvt.h - GSL/environment package header 3 | * 4 | * Generated from ggenvt by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGENVT_INCLUDED 11 | #define GGENVT_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | env_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_env_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggfile.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggfile.h - GSL/fileio package header 3 | * 4 | * Generated from ggfile by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGFILE_INCLUDED 11 | #define GGFILE_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | directory_class; 17 | 18 | extern CLASS_DESCRIPTOR 19 | directory_entry_class; 20 | 21 | extern CLASS_DESCRIPTOR 22 | file_class; 23 | 24 | extern CLASS_DESCRIPTOR 25 | file_entry_class; 26 | 27 | /*- Function prototypes -----------------------------------------------------*/ 28 | 29 | int register_file_classes (void); 30 | 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/gggsl.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * gggsl.h - GSL/gsl control package header 3 | * 4 | * Generated from gggsl by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGGSL_INCLUDED 11 | #define GGGSL_INCLUDED 12 | /*- Public definitions ------------------------------------------------------*/ 13 | 14 | typedef struct { 15 | int 16 | links; 17 | Bool 18 | ignorecase, /* = use case for pretty-print */ 19 | cobol, /* COBOL = 6 char line numbers */ 20 | template; /* Template mode? */ 21 | SCRIPT_LINE 22 | *line; /* script_line item for current line */ 23 | int 24 | shuffle; /* Min whitespace size for shuffle */ 25 | char 26 | *terminator; /* Line terminator string */ 27 | char 28 | *escape; /* Escape symbol, if not '\' */ 29 | char 30 | *substitute; /* Substitute symbol, if not '$' */ 31 | int 32 | argc; /* Command line arguments */ 33 | char 34 | **argv; 35 | SYMTAB_ITEM 36 | *switches; /* Original command-line switches */ 37 | char 38 | *output_file, /* Output file name */ 39 | *input_file; /* Input file name */ 40 | long 41 | output_line; /* Line number in output file. */ 42 | } GSL_CONTROL; 43 | 44 | extern char 45 | *me, /* Module name */ 46 | *version; /* GSL version */ 47 | 48 | 49 | /*- Global variables --------------------------------------------------------*/ 50 | 51 | extern CLASS_DESCRIPTOR 52 | gsl_class; 53 | 54 | /*- Function prototypes -----------------------------------------------------*/ 55 | 56 | int register_gsl_classes (void); 57 | 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/gggsl.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * gggsl.i - LIBERO dialog interpreter for gggsl.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 6; 19 | agent-> maxmodule = 4; 20 | agent-> maxstate = 3; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 2; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/gggsl.l: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------- 2 | ! gggsl.l - GSL/gsl control package dialog 3 | ! 4 | ! Generated from gggsl by ggobjt.gsl using GSL/4. 5 | ! DO NOT MODIFY THIS FILE. 6 | ! 7 | ! For documentation and updates see http://www.imatix.com. 8 | !---------------------------------------------------------------------------- 9 | 10 | -schema=smtschm.c 11 | -nostubs 12 | 13 | 14 | Starting: 15 | (--) Execute -> Executing 16 | + 17 | 18 | Executing: 19 | (--) Ok -> 20 | + Return-Done 21 | + Terminate-The-Thread 22 | (--) Message -> 23 | + Forward-Message-As-Call-Message 24 | (--) Error -> 25 | + Forward-Message-As-Call-Error 26 | + Terminate-The-Thread 27 | (--) Fatal -> 28 | + Forward-Message-As-Call-Error 29 | + Terminate-The-Thread 30 | 31 | Defaults: 32 | (--) Shutdown -> 33 | + Terminate-The-Thread 34 | 35 | -------------------------------------------------------------------------------- /src/gghead.h: -------------------------------------------------------------------------------- 1 | /*===========================================================================* 2 | * * 3 | * gghead.h - Header for generated gsl.h * 4 | * * 5 | * Copyright (c) 1996-2010 iMatix Corporation * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 3 of the License, or (at * 10 | * your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, but * 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * General Public License for more details. * 16 | * * 17 | * For information on alternative licensing for OEMs, please contact * 18 | * iMatix Corporation. * 19 | * * 20 | *===========================================================================*/ 21 | /* ----------------------------------------------------------------- 22 | Synopsis: This header file is GENERATED by the Boom installer. DO NOT 23 | MODIFY THIS FILE. If you change prelude.h, or any of the 24 | other GSL header files, re-run boomake to recreate this file. 25 | -------------------------------------------------------------------*/ 26 | -------------------------------------------------------------------------------- /src/ggmacro.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- ggmacro.gsl - GSL macro examples 4 | .- 5 | .- Copyright (c) 1996-2010 iMatix Corporation 6 | .- 7 | .- This program is free software; you can redistribute it and/or modify 8 | .- it under the terms of the GNU General Public License as published by 9 | .- the Free Software Foundation; either version 3 of the License, or (at 10 | .- your option) any later version. 11 | .- 12 | .- This program is distributed in the hope that it will be useful, but 13 | .- WITHOUT ANY WARRANTY; without even the implied warranty of 14 | .- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | .- General Public License for more details. 16 | .- 17 | .- For information on alternative licensing for OEMs, please contact 18 | .- iMatix Corporation. 19 | .- 20 | .------------------------------------------------------------------------------ 21 | .- 22 | .macro push_outfile (newfile) 23 | . if ! defined (_file_stack) 24 | . define _file_stack 0 25 | . endif 26 | . define _file_stack = _file_stack + 1 27 | . define _file_stack_$(_file_stack) = outfile 28 | . append newfile 29 | .endmacro 30 | .- 31 | .macro pop_outfile 32 | . if ! defined (_file_stack) | _file_stack = 0 33 | . abort "File stack empty." 34 | . endif 35 | . append _file_stack_$(_file_stack) 36 | . define _file_stack_$(_file_stack) 37 | . define _file_stack = _file_stack - 1 38 | .endmacro 39 | .- 40 | -------------------------------------------------------------------------------- /src/ggmath.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggmath.h - GSL/math package header 3 | * 4 | * Generated from ggmath by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGMATH_INCLUDED 11 | #define GGMATH_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | math_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_math_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggobjt.h: -------------------------------------------------------------------------------- 1 | /*===========================================================================* 2 | * * 3 | * ggobjt.h - Object functions * 4 | * * 5 | * Copyright (c) 1996-2010 iMatix Corporation * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 3 of the License, or (at * 10 | * your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, but * 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * General Public License for more details. * 16 | * * 17 | * For information on alternative licensing for OEMs, please contact * 18 | * iMatix Corporation. * 19 | * * 20 | *===========================================================================*/ 21 | 22 | #ifndef GGOBJT_INCLUDED /* Allow multiple inclusions */ 23 | #define GGOBJT_INCLUDED 24 | 25 | /*- Type definitions --------------------------------------------------------*/ 26 | 27 | 28 | /*- Global variables --------------------------------------------------------*/ 29 | 30 | extern char 31 | object_error [LINE_MAX + 1]; 32 | 33 | /*- Functions ---------------------------------------------------------------*/ 34 | 35 | void initialise_objects (void); 36 | void destroy_objects (void); 37 | int object_register (PLUGIN_INITIALISE *init, 38 | function shutdown); 39 | int initialise_classes (THREAD *thread); 40 | GSL_FUNCTION *locate_method (CLASS_DESCRIPTOR *class, 41 | const char *name); 42 | int build_method_arguments (SCRIPT_NODE *fn_node, 43 | RESULT_NODE ***arg); 44 | Bool arguments_are_defined (int argc, 45 | RESULT_NODE **argv, 46 | RESULT_NODE *result); 47 | void *get_class_item (THREAD *gsl_thread, 48 | const char *class); 49 | 50 | /*---------------------------------------------------------------------------*/ 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/ggpars.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * ggpars.i - LIBERO dialog interpreter for ggpars.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 95; 19 | agent-> maxmodule = 113; 20 | agent-> maxstate = 49; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 47; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/ggpars.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 22 | 23 | 26 | 27 | 28 | 29 | 31 | 32 | 34 | 36 | 38 | 39 | 40 | 42 | 44 | 46 | 48 | 49 | 51 | 52 | 53 | 55 | 56 | 58 | 59 | 60 | 62 | 64 | 65 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/ggpcre.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggpcre.h - GSL/regexp package header 3 | * 4 | * Generated from ggpcre by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGPCRE_INCLUDED 11 | #define GGPCRE_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | regexp_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_regexp_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggpriv.h: -------------------------------------------------------------------------------- 1 | /*===========================================================================* 2 | * * 3 | * ggpriv.h - Project header file * 4 | * * 5 | * Copyright (c) 1996-2010 iMatix Corporation * 6 | * * 7 | * This program is free software; you can redistribute it and/or modify * 8 | * it under the terms of the GNU General Public License as published by * 9 | * the Free Software Foundation; either version 3 of the License, or (at * 10 | * your option) any later version. * 11 | * * 12 | * This program is distributed in the hope that it will be useful, but * 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of * 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 15 | * General Public License for more details. * 16 | * * 17 | * For information on alternative licensing for OEMs, please contact * 18 | * iMatix Corporation. * 19 | * * 20 | *===========================================================================*/ 21 | 22 | #ifndef GGPRIV_INCLUDED /* Allow multiple inclusions */ 23 | #define GGPRIV_INCLUDED 24 | 25 | #include "sfl.h" /* SFL functions and definitions */ 26 | #include "smt3.h" /* SMT functions and definitions */ 27 | #if 0 28 | #include "smtmem.h" /* SMT memory accounting */ 29 | #endif 30 | #include "ggcomm.h" /* Common stuff header file */ 31 | #include "ggpars.h" /* Script parser header file */ 32 | #include "ggparsm.h" /* Parser message header file */ 33 | #include "ggscrp.h" /* Script object header file */ 34 | #include "ggsymb.h" /* Symbol object header file */ 35 | #include "gggsl.h" /* GSL control block header file */ 36 | #include "ggscop.h" /* Scope header file */ 37 | #include "ggcode.h" /* Code generator header file */ 38 | #include "ggcodem.h" /* Code generator message file */ 39 | #include "ggobjt.h" /* Object module header file */ 40 | #include "ggxml.h" /* XML object header file */ 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/ggproc.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggproc.h - GSL/process management 3 | package header 4 | * 5 | * Generated from ggproc by ggobjt.gsl using GSL/4. 6 | * DO NOT MODIFY THIS FILE. 7 | * 8 | * For documentation and updates see http://www.imatix.com. 9 | *---------------------------------------------------------------------------*/ 10 | 11 | #ifndef GGPROC_INCLUDED 12 | #define GGPROC_INCLUDED 13 | 14 | /*- Global variables --------------------------------------------------------*/ 15 | 16 | extern CLASS_DESCRIPTOR 17 | proc_class; 18 | 19 | extern CLASS_DESCRIPTOR 20 | proc_handle_class; 21 | 22 | /*- Function prototypes -----------------------------------------------------*/ 23 | 24 | int register_proc_classes (void); 25 | 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/ggreport.gsl: -------------------------------------------------------------------------------- 1 | .------------------------------------------------------------------------------ 2 | .- 3 | .- ggreport.gsl - GSL reporting examples 4 | .- 5 | .- 6 | .- Copyright (c) 1996-2010 iMatix Corporation 7 | .- 8 | .- This program is free software; you can redistribute it and/or modify 9 | .- it under the terms of the GNU General Public License as published by 10 | .- the Free Software Foundation; either version 3 of the License, or (at 11 | .- your option) any later version. 12 | .- 13 | .- This program is distributed in the hope that it will be useful, but 14 | .- WITHOUT ANY WARRANTY; without even the implied warranty of 15 | .- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | .- General Public License for more details. 17 | .- 18 | .- For information on alternative licensing for OEMs, please contact 19 | .- iMatix Corporation. 20 | .- 21 | .------------------------------------------------------------------------------ 22 | .- 23 | .macro report 24 | . if macro ("$(name())_prefix") 25 | . invoke $(name())_prefix 26 | . endif 27 | . define report.last = "" 28 | . for . where name () <> "" 29 | . if name () <> report.last 30 | . if report.last <> "" & macro ("$(last:)_footer") 31 | . invoke $(last:)_footer 32 | . endif 33 | . if macro ("$(name())_header") 34 | . invoke $(name ())_header 35 | . endif 36 | . define report.last = name () 37 | . endif 38 | . invoke report 39 | . endfor 40 | . if report.last <> "" & macro ("$(last:)_footer") 41 | . invoke $(last:)_footer 42 | . endif 43 | . if macro ("$(name())_suffix") 44 | . invoke $(name())_suffix 45 | . endif 46 | .endmacro 47 | -------------------------------------------------------------------------------- /src/ggscrp.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * ggscrp.i - LIBERO dialog interpreter for ggscrp.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 30; 19 | agent-> maxmodule = 38; 20 | agent-> maxstate = 7; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 6; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/ggsock.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggsock.h - GSL/socket package header 3 | * 4 | * Generated from ggsock by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGSOCK_INCLUDED 11 | #define GGSOCK_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | sock_class; 17 | 18 | extern CLASS_DESCRIPTOR 19 | sock_handle_class; 20 | 21 | /*- Function prototypes -----------------------------------------------------*/ 22 | 23 | int register_sock_classes (void); 24 | 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/ggsock.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * ggsock.i - LIBERO dialog interpreter for ggsock.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 9; 19 | agent-> maxmodule = 9; 20 | agent-> maxstate = 2; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = -1; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/ggsock.l: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------- 2 | ! ggsock.l - GSL/socket package dialog 3 | ! 4 | ! Generated from ggsock by ggobjt.gsl using GSL/4. 5 | ! DO NOT MODIFY THIS FILE. 6 | ! 7 | ! For documentation and updates see http://www.imatix.com. 8 | !---------------------------------------------------------------------------- 9 | 10 | -schema=smtschm.c 11 | -nostubs 12 | 13 | 14 | After-Init: 15 | (--) Ok -> Waiting 16 | + 17 | 18 | Waiting: 19 | (--) Ok -> 20 | + Reply-Ok-Result 21 | + Terminate-The-Thread 22 | (--) Error -> 23 | + Reply-Error-Result 24 | + Terminate-The-Thread 25 | (--) Closed -> 26 | + Reply-Closed-Result 27 | + Terminate-The-Thread 28 | (--) Timeout -> 29 | + Reply-Timeout-Result 30 | + Terminate-The-Thread 31 | (--) Connect-Ok -> 32 | + Reply-Connect-Ok-Result 33 | + Terminate-The-Thread 34 | (--) Readh-Ok -> 35 | + Reply-Readh-Ok-Result 36 | + Terminate-The-Thread 37 | (--) Readh-Closed -> 38 | + Reply-Readh-Closed-Result 39 | + Terminate-The-Thread 40 | (--) Readh-Timeout -> 41 | + Reply-Readh-Timeout-Result 42 | + Terminate-The-Thread 43 | (--) Shutdown -> 44 | + Terminate-The-Thread 45 | 46 | -------------------------------------------------------------------------------- /src/ggstrn.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggstrn.h - GSL/string package header 3 | * 4 | * Generated from ggstrn by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGSTRN_INCLUDED 11 | #define GGSTRN_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | string_class; 17 | 18 | /*- Function prototypes -----------------------------------------------------*/ 19 | 20 | int register_string_classes (void); 21 | 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ggsymb.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggsymb.h - GSL/symb package header 3 | * 4 | * Generated from ggsymb by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGSYMB_INCLUDED 11 | #define GGSYMB_INCLUDED 12 | /*- Public definitions ------------------------------------------------------*/ 13 | 14 | typedef struct { 15 | int 16 | links; 17 | char 18 | *name; 19 | SYMTAB 20 | *symtab; 21 | Bool 22 | done, 23 | loop; /* To check for self-references */ 24 | } SYMTAB_ITEM; 25 | 26 | 27 | /*- Global variables --------------------------------------------------------*/ 28 | 29 | extern CLASS_DESCRIPTOR 30 | symb_class; 31 | 32 | /*- Function prototypes -----------------------------------------------------*/ 33 | 34 | int register_symb_classes (void); 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/ggthrd.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggthrd.h - GSL/thrd package header 3 | * 4 | * Generated from ggthrd by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGTHRD_INCLUDED 11 | #define GGTHRD_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | thread_class; 17 | 18 | extern CLASS_DESCRIPTOR 19 | remote_thread_class; 20 | 21 | extern CLASS_DESCRIPTOR 22 | child_thread_class; 23 | 24 | extern CLASS_DESCRIPTOR 25 | parsed_item_class; 26 | 27 | /*- Function prototypes -----------------------------------------------------*/ 28 | 29 | int register_thread_classes (void); 30 | 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/ggthrd.i: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------* 2 | * ggthrd.i - LIBERO dialog interpreter for ggthrd.c. * 3 | * Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16. * 4 | * Schema file used: smtschm.c. * 5 | *---------------------------------------------------------------------------*/ 6 | if (agent_lookup (AGENT_NAME)) 7 | return (0); /* Agent already declared */ 8 | if ((agent = agent_declare (AGENT_NAME)) == NULL) 9 | return (-1); /* Could not declare agent */ 10 | 11 | #if (defined (SINGLE_THREADED)) 12 | agent-> tcb_size = 0; /* No context block */ 13 | agent-> max_threads = 1; /* and max. 1 thread */ 14 | #else 15 | agent-> tcb_size = sizeof (TCB); 16 | #endif 17 | agent-> initialise = initialise_the_thread; 18 | agent-> maxevent = 8; 19 | agent-> maxmodule = 10; 20 | agent-> maxstate = 5; 21 | agent-> priority = SMT_PRIORITY_NORMAL; 22 | agent-> LR_defaults = 4; 23 | agent-> LR_nextst = &_LR_nextst [0][0]; 24 | agent-> LR_action = &_LR_action [0][0]; 25 | agent-> LR_offset = _LR_offset; 26 | agent-> LR_vector = _LR_vector; 27 | agent-> LR_module = _LR_module; 28 | agent-> LR_mname = _LR_mname; 29 | agent-> LR_sname = _LR_sname; 30 | agent-> LR_ename = _LR_ename; 31 | #if (defined (SMT_PROFILE)) 32 | agent-> LR_count = &_LR_count [0]; 33 | agent-> LR_time = &_LR_time [0]; 34 | agent-> LR_flow = &_LR_flow [0][0]; 35 | 36 | memset (_LR_count, 0, sizeof (_LR_count)); 37 | memset (_LR_time, 0, sizeof (_LR_time)); 38 | #endif 39 | -------------------------------------------------------------------------------- /src/ggthrd.l: -------------------------------------------------------------------------------- 1 | !---------------------------------------------------------------------------- 2 | ! ggthrd.l - GSL/thrd package dialog 3 | ! 4 | ! Generated from ggthrd by ggobjt.gsl using GSL/4. 5 | ! DO NOT MODIFY THIS FILE. 6 | ! 7 | ! For documentation and updates see http://www.imatix.com. 8 | !---------------------------------------------------------------------------- 9 | 10 | -schema=smtschm.c 11 | -nostubs 12 | 13 | 14 | After-Init: 15 | (--) Parse -> Parsing 16 | + 17 | (--) Run -> Running 18 | + Spawn-GSL-Thread 19 | (--) Parse-And-Run -> Parsing-Before-Run 20 | + 21 | 22 | Parsing: 23 | (--) Message -> 24 | + Log-Message 25 | (--) Ok -> 26 | + Reply-Parsed-Ok-Result 27 | + Terminate-The-Thread 28 | (--) Error -> 29 | + Reply-Parse-Error-Result 30 | + Destroy-The-Thread 31 | + Terminate-The-Thread 32 | (--) Shutdown -> 33 | + Terminate-The-Thread 34 | 35 | Running: 36 | (--) Ok -> 37 | + Set-Thread-Finished-Status 38 | + Terminate-The-Thread 39 | (--) Error -> 40 | + Set-Thread-Error-Status 41 | + Terminate-The-Thread 42 | (--) Shutdown -> 43 | + Terminate-The-Thread 44 | 45 | Parsing-Before-Run: 46 | (--) Message -> 47 | + Log-Message 48 | (--) Ok -> Running 49 | + Reply-Running-Ok-Result 50 | + Spawn-GSL-Thread 51 | (--) Error -> 52 | + Reply-Parse-Error-Result 53 | + Destroy-The-Thread 54 | + Terminate-The-Thread 55 | (--) Shutdown -> 56 | + Terminate-The-Thread 57 | 58 | Defaults: 59 | (--) Interrupt -> 60 | + Shutdown-Running-GSL-Thread 61 | + Terminate-The-Thread 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/ggtime.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggtime.h - GSL/time package header 3 | * 4 | * Generated from ggtime by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGTIME_INCLUDED 11 | #define GGTIME_INCLUDED 12 | 13 | /*- Global variables --------------------------------------------------------*/ 14 | 15 | extern CLASS_DESCRIPTOR 16 | time_class; 17 | 18 | extern CLASS_DESCRIPTOR 19 | date_class; 20 | 21 | /*- Function prototypes -----------------------------------------------------*/ 22 | 23 | int register_time_classes (void); 24 | 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/ggxml.h: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | * ggxml.h - GSL/XML package header 3 | * 4 | * Generated from ggxml by ggobjt.gsl using GSL/4. 5 | * DO NOT MODIFY THIS FILE. 6 | * 7 | * For documentation and updates see http://www.imatix.com. 8 | *---------------------------------------------------------------------------*/ 9 | 10 | #ifndef GGXML_INCLUDED 11 | #define GGXML_INCLUDED 12 | /*- Public definitions ------------------------------------------------------*/ 13 | 14 | void * 15 | get_gsl_xml_item (XML_ITEM *xml_item); 16 | 17 | XML_ITEM * 18 | get_xml_item (void *gsl_xml_item); 19 | 20 | 21 | /*- Global variables --------------------------------------------------------*/ 22 | 23 | extern CLASS_DESCRIPTOR 24 | XML_class; 25 | 26 | extern CLASS_DESCRIPTOR 27 | XML_item_class; 28 | 29 | extern CLASS_DESCRIPTOR 30 | XML_value_class; 31 | 32 | /*- Function prototypes -----------------------------------------------------*/ 33 | 34 | int register_XML_classes (void); 35 | 36 | int shutdown_XML_classes (void); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/gsl.1: -------------------------------------------------------------------------------- 1 | .TH GSL "1" "September 2017" "gsl 4.1" "User Commands" 2 | .SH NAME 3 | gsl \- a code construction and generation tool 4 | .SH SYNOPSIS 5 | .B gsl 6 | .RB [\| \-