package lrgrep

  1. Overview
  2. Docs
Detailed error messages for Menhir-generated parsers

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lrgrep-0.9.tbz
sha256=e53de12e4c5cbe6bca00643593266b4f9fa2e3f6a138195eeff7a4329f5c1c75
sha512=7fd7c4d11506fea7cc11c9bbf5aea9142d905643553c0c90e1bb16b794106b0c14a266acf89ae91b6929008dc0ba6515f788642873e2e4ba6c3d49bd45d25127

doc/kernel/Kernel/Info/Nonterminal/index.html

Module Info.NonterminalSource

include INDEXED with type 'g n = 'g nonterminal
Sourcetype 'g n = 'g nonterminal
Sourceval cardinal : 'g grammar -> 'g n Fix.Indexing.cardinal
Sourceval of_int : 'g grammar -> int -> 'g n Fix.Indexing.index
Sourceval to_string : 'g grammar -> 'g n Fix.Indexing.index -> string

Converts a nonterminal index to its name string

all g is the set of all non-terminals in grammar g

Sourceval kind : 'g grammar -> 'g n Fix.Indexing.index -> [ `REGULAR | `START ]

Returns `REGULAR for ordinary non-terminals and `START for entrypoint (start) non-terminals

Sourceval semantic_value : 'g grammar -> 'g n Fix.Indexing.index -> string option

semantic_value nt is Some typ if nonterminal nt has a semantic value of type typ, or None for unparameterized non-terminals.

Sourceval nullable : 'g grammar -> 'g n Fix.Indexing.index -> bool

nullable nt is true if nonterminal nt can derive the empty string

first nt is the set of terminals that can begin a string derived from nonterminal nt

Sourceval find : 'g grammar -> ?approx:int -> string -> ('g n Fix.Indexing.index, [ `Mangled of 'g n Fix.Indexing.index | `Dym of (int * string * 'g n Fix.Indexing.index) list ]) Stdlib.result

Finds a nonterminal by name. Checks both regular and mangled names. Returns disambiguation suggestions when the name is not found and approx > 0.