{% set version = "1.3.1-4" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-dparser
  version: {{ version|replace("-", "_") }}

source:
  url:
    - {{ cran_mirror }}/src/contrib/dparser_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/dparser/dparser_{{ version }}.tar.gz
  sha256: ea230fb8cf5f80cd109f93e48a457580b78f3d3bd94035e4658696184ba44be6

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-digest
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-digest

test:
  commands:
    - $R -e "library('dparser')"           # [not win]
    - "\"%R%\" -e \"library('dparser')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=dparser
  license: BSD-3-Clause
  summary: "A Scannerless GLR parser/parser generator.  Note that GLR standing for \"generalized LR\", where L stands for \"left-to-right\" and R stands for \"rightmost (derivation)\".  For more information see <https://en.wikipedia.org/wiki/GLR_parser>. This parser is based on the Tomita (1987) algorithm. (Paper can be\
    \ found at <http://acl-arc.comp.nus.edu.sg/archives/acl-arc-090501d3/data/pdf/anthology-PDF/J/J87/J87-1004.pdf>). The original 'dparser' package documentation can be found at <http://dparser.sourceforge.net/>.  This allows you to add mini-languages to R (like RxODE's ODE mini-language Wang, Hallow, and James 2015 <DOI:10.1002/psp4.12052>)\
    \ or to parse other languages like 'NONMEM' to automatically translate them to R code.   To use this in your code, add a LinkingTo dparser in your DESCRIPTION file and instead of using #include <dparse.h> use #include <dparser.h>.  This also provides a R-based port of the make_dparser <http://dparser.sourceforge.net/d/make_dparser.cat>\
    \ command called mkdparser().  Additionally you can parse an arbitrary grammar within R using the dparse() function, which works on most OSes and is mainly for grammar testing.  The fastest parsing, of course, occurs at the C level, and is suggested."
  license_family: BSD
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/BSD_3_clause
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: dparser
# Title: Port of 'Dparser' Package
# Version: 0.1.8
# Authors@R: c(person("Matthew", "Fidler", email = "matthew.fidler@gmail.com", role = c("aut", "cre")), person("John", "Plevyak", role = c("aut", "cph"), email = "jplevyak@gmail.com"))
# Imports: digest, methods
# Suggests: rex, covr, testthat, knitr, devtools,
# Description: A Scannerless GLR parser/parser generator.  Note that GLR standing for "generalized LR", where L stands for "left-to-right" and R stands for "rightmost (derivation)".  For more information see <https://en.wikipedia.org/wiki/GLR_parser>. This parser is based on the Tomita (1987) algorithm. (Paper can be found at <http://acl-arc.comp.nus.edu.sg/archives/acl-arc-090501d3/data/pdf/anthology-PDF/J/J87/J87-1004.pdf>). The original 'dparser' package documentation can be found at <http://dparser.sourceforge.net/>.  This allows you to add mini-languages to R (like RxODE's ODE mini-language Wang, Hallow, and James 2015 <DOI:10.1002/psp4.12052>) or to parse other languages like 'NONMEM' to automatically translate them to R code.   To use this in your code, add a LinkingTo dparser in your DESCRIPTION file and instead of using #include <dparse.h> use #include <dparser.h>.  This also provides a R-based port of the make_dparser <http://dparser.sourceforge.net/d/make_dparser.cat> command called mkdparser().  Additionally you can parse an arbitrary grammar within R using the dparse() function, which works on most OSes and is mainly for grammar testing.  The fastest parsing, of course, occurs at the C level, and is suggested.
# Depends: R (>= 3.2.3)
# License: BSD_3_clause + file LICENSE
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2017-11-13 16:20:46 UTC; FIDLEMA3
# Author: Matthew Fidler [aut, cre], John Plevyak [aut, cph]
# Maintainer: Matthew Fidler <matthew.fidler@gmail.com>
# Repository: CRAN
# Date/Publication: 2017-11-13 18:11:18 UTC
