Liking cljdoc? Tell your friends :D

com.lithinos.amotoen.core


debugclj

(debug n w i)

Very very inefficient but useful in some cases. Prints out 'i' number of characters from 'w' followed by 'n', and then resets the position in 'w' as if nothing had been consumed.

Very very inefficient but useful in some cases.
Prints out 'i' number of characters from 'w' followed by 'n', 
and then resets the position in 'w' as if nothing had been consumed.
raw docstring

fastest-theoreticalclj

(fastest-theoretical s)

Finding a lower-bound on any optimizations for speed starts by simply reading each character in the string to be parsed 'b'. The function 'end' is the conditional with 'm' consuming.

Finding a lower-bound on any optimizations for speed starts
by simply reading each character in the string to be parsed 'b'.
The function 'end' is the conditional with 'm' consuming.
raw docstring

IAmotoencljprotocol

Currently oriented around strings and characters, but could easily be adapted for other approaches.

Currently oriented around strings and characters, but could easily be adapted for other approaches.

cclj

(c t)

The character at pos

The character at pos

endclj

(end t)

End of input

End of input

gpclj

(gp t)

Get pos

Get pos

mclj

(m t)

Returns the 'c' then (inc pos)

Returns the 'c' then (inc pos)

spclj

(sp t j)

Set pos

Set pos
raw docstring

lpegsclj

(lpegs t s)

Produces a rule that allows any character in the string 's' as a valid match.

Produces a rule that allows any character in the string 's' as a valid match.
raw docstring

pegasusclj

(pegasus n g w)

Returns the AST resulting from parsing the wrapped input 'w' given a grammar definition 'g' and starting at rule 'n' in 'g'.

Returns the AST resulting from parsing the wrapped input 'w'
given a grammar definition 'g' and starting at rule 'n' in 'g'.
raw docstring

pegsclj

(pegs s)

Produces a rule that consumes each character in the string 's' in the order given in 's'.

Produces a rule that consumes each character in the string 's' in the order given in 's'.
raw docstring

post-processclj

(post-process n g w fn-map)

Similar to with-fns. Other parameters match pegasus. The final result is assumed to be the value of the root map that pegasus would have returned.

Similar to with-fns. Other parameters match pegasus.
The final result is assumed to be the value of the root map that pegasus would have returned.
raw docstring

self-checkclj

(self-check)

This ensures that grammar-grammar is a valid grammar. It attempts to parse itself. While not every part of valid grammars is used in grammar-grammar, it's a nice sanity check.

This ensures that grammar-grammar is a valid grammar.
It attempts to parse itself. While not every part of valid
grammars is used in grammar-grammar, it's a nice sanity check.
raw docstring

self-check-fastestclj

(self-check-fastest)

This returns the fastest time to read each character of grammar-grammar

This returns the fastest time to read each character of grammar-grammar
raw docstring

validateclj

(validate g)

Validate can help identify problems in grammars. Using grammar-grammar as the grammar for valid grammars, it will return nil if the given grammar 'g' is not valid.

Validate can help identify problems in grammars. 
Using grammar-grammar as the grammar for valid grammars, 
it will return nil if the given grammar 'g' is not valid.
raw docstring

with-fnsclj

(with-fns g fn-map)
(with-fns g fn-map fn-type)

Simplifies attaching 'post-processing' functions to Non-Terminals in the grammar. Keys in 'fn-map' should match keys in the grammar 'g'. Values in 'fn-map' should be functions accepting the result of having parsed some input according to the related value in 'g'.

Simplifies attaching 'post-processing' functions to Non-Terminals in the grammar.
Keys in 'fn-map' should match keys in the grammar 'g'.
Values in 'fn-map' should be functions accepting the result of having 
parsed some input according to the related value in 'g'.
raw docstring

wrap-stringclj

(wrap-string s)
(wrap-string s j)

Reifies IAmotoen around a string 's', possibly at a given starting point 'j'. The function 'charAt' is part of the mechanism to walk through the string.

Reifies IAmotoen around a string 's', possibly at a given starting point 'j'.
The function 'charAt' is part of the mechanism to walk through the string.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close