package catala

  1. Overview
  2. Docs
Compiler and library for the literate programming language for tax code specification

Install

Dune Dependency

Authors

Maintainers

Sources

0.6.0.tar.gz
md5=b22e238d5d5c8452067109e9c7c0f427
sha512=ccc8c557c67c2f9d1bed4b957b2367f0f6afc0ef9b8b83237cf2a2912b3e8829b7e8af78ea7fe00b20ecf28b436ad04b591e5fff4f82fd08725d40a18c9924d0

doc/catala.surface/Surface/Lexer_common/index.html

Module Surface.Lexer_commonSource

Auxiliary functions used by all lexers.

Sourcetype lexing_context =
  1. | Law
  2. | Code
  3. | Directive
  4. | Directive_args

Reference, used by the lexer as the mutable state to distinguish whether it is lexing code or law.

Sourceval code_buffer : Buffer.t

Buffer that accumulates the string representation of the body of code being lexed. This string representation is used in the literate programming backends to faithfully capture the spacing pattern of the original program

Sourceval update_acc : Sedlexing.lexbuf -> unit

Updates code_buffer with the current lexeme

Sourceval raise_lexer_error : Utils.Pos.t -> string -> 'a

Error-generating helper

Sourceval token_list_language_agnostic : (string * Tokens.token) list

Associative list matching each punctuation string part of the Catala syntax with its Surface.Parser token. Same for all the input languages (English, French, etc.)

Sourceval calc_precedence : string -> int

Calculates the precedence according a matched regex of the form : '#+'

Sourceval get_law_heading : Sedlexing.lexbuf -> Tokens.token

Gets the LAW_HEADING token from the current lexbuf

Sourcemodule type LocalisedLexer = sig ... end
OCaml

Innovation. Community. Security.