1. 11 Jul, 2020 1 commit
  2. 10 Jul, 2020 3 commits
  3. 28 Jun, 2020 2 commits
  4. 27 Jun, 2020 2 commits
    • Seb35's avatar
      Update packages. · 0f63a648
      Seb35 authored
      0f63a648
    • Seb35's avatar
      Add an option completePosition. · a214b925
      Seb35 authored
      There are pro and contra about computing the line/column position:
      it takes computation time (and computation of line/column by PEG.js
      could be optimised) and in this use case (links in law texts) it is
      unuseful given the line is always the same. On the contrary it is
      more standard and easier to use for humans to see the line/column and
      it becomes very very useful for derived grammars like DuraLex.
      
      This is an intermediary position: by default the generated parser does
      not compute lines/columns but this option can be set to enable the
      computation.
      
      With this change, all the positions (line, column, offset) are always
      relative to the global text. Previously only the main position was in
      this case and subexpressions were indexed by offset 0. It would have
      been inconstent if lines/columns were relative to the global text and
      offsets were relative to 0 in subexpressions. This is probably more
      natural/expected for users.
      a214b925
  5. 26 Jun, 2020 1 commit
  6. 25 Jun, 2020 1 commit
  7. 07 Jun, 2020 1 commit
  8. 25 May, 2020 1 commit
    • Seb35's avatar
      Stabilise interfaces. · 4ba7bbfb
      Seb35 authored
      Interfaces are stabilising:
      * API: main function is getLinks, two other functions are utilitary functions,
      * bin: should be quite stable,
      * the file lib/advanced.js will probably be deleted,
      * the options of getLinks are more clear,
      * the indexes of the result are more standard (offset, with or without line and column).
      4ba7bbfb
  9. 24 May, 2020 1 commit
  10. 19 May, 2020 2 commits
    • Seb35's avatar
      Remove unuseful function getSemanticLinks. · a3ca1d64
      Seb35 authored
      This was just a wrapper to re-compute the semantic version when
      the parser was only syntactic (with pegjs-syntactic-actions).
      
      Now the syntactic parser is only a development feature and the semantic
      parser is the default.
      a3ca1d64
    • Seb35's avatar
      Update dependencies. · 964a6a35
      Seb35 authored
      964a6a35
  11. 08 May, 2020 7 commits
  12. 28 Apr, 2020 1 commit
    • Seb35's avatar
      Version 0.0.7. · 702c9cc3
      Seb35 authored
      Missing PEG.js plugin 'partialMatch' in package,
      useful in dev to compile other grammars like DuraLex’s.
      702c9cc3
  13. 27 Apr, 2020 4 commits
    • Seb35's avatar
      Version 0.0.6 · 948dad5e
      Seb35 authored
      Version 0.0.5 was badly published, now it is correct.
      948dad5e
    • Seb35's avatar
      Fix tests launch. · 2690b98f
      Seb35 authored
      2690b98f
    • Seb35's avatar
      Sync package-lock.json. · b479e8aa
      Seb35 authored
      b479e8aa
    • Seb35's avatar
      Version 0.0.5 - Improved packaging, tests, and grammar. · 7565411e
      Seb35 authored
      A lot of tests have been added to cover most rules.
      
      The grammar have been improved with increased legibility
      and a better handling of the semantic results (implemented
      in the grammar actions).
      
      The packaging have been reworked to avoid the step
      reading the grammar with node’s fs.readFile(). Now
      the basic use (compiled parser + grammar + basic loop
      to find articles) are compiled and packaged; and the
      advanced use (generation of own grammar is accessible
      for developers (with devDependencies).
      
      Also a PEG.js plugin is provided to prevent the grammar
      from failing: in this use case a fail is simply a
      precandidate which is not a link and there is no need
      to have details about why it failed, and we always want
      a partial match (to match only the beginning of the input)
      although default PEG.js parsers capture entire strings.
      Such simplification decreased the size of the minified
      parser by 20 % (from 123 Kio to 96 Kio) and probably
      increased the speed. This was proposed as a feature to
      PEG.js in a lighter form.
      7565411e
  14. 31 Mar, 2020 1 commit
  15. 01 Mar, 2020 3 commits
  16. 10 Feb, 2020 1 commit
  17. 09 Feb, 2020 4 commits
  18. 08 Feb, 2020 3 commits
  19. 03 Jan, 2020 1 commit