-- Leo's gemini proxy

-- Connecting to iceworks.cc:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Sierra Style Parsers in AGS

Created: 2020-12-29T00:16:33-06:00

Return to the Index

This card pertains to a resource available on the internet.


Each word is associated with an ID number.

An ID of zero means the word is ignored while reading.

Multiple words may share an ID; this makes them synonyms with one another.


Parsing

Input from the user is tokenized and replaced with IDs from the table.

Scripts can then ask if the list of IDs matches a list of IDs that means something.


AGS scripting lets you say Parser.Said("foo [bar]") which replaces foo and bar with the IDs from the table. Notation in brackets makes a word optional.


For example "fiery potato" would become 3 7. If potato and spud were synonyms then both "fiery potato" and "fiery spud" would be parsed as 3 7.


Special tokens

rol: matches the rest of input line

anyword: matches a single word


-- Response ended

-- Page fetched on Thu Jun 6 17:31:22 2024