Module ce_parser

Description

Simple scanner and recursive descent parser.

These functions implement a simple scanner and parser which, though inefficient, are flexible and may be suitable for rapid prototyping.

Function Index

Exported Functions
eval/1
parse/3Parses a list of tokens into a parse tree.
scan/2Scans a string for tokens.
test/0
Internal Documented Functions
find_production_body/3Returns the most likely production from the given list of productions based on the name and the tokens.

Exported Functions

eval/1

eval(Arg1) -> term()

parse/3

parse([token()], [production()], production_name()) -> {ok, {[token()], parse_tree()}} | {error, Reason}

Parses a list of tokens into a parse tree.

scan/2

scan(string(), [token_spec()]) -> {ok, [token()]} | {error, Reason}

Scans a string for tokens.

test/0

test() -> term()