tokParse.html

last update: by

Contents

Exported Functions
parse($parse,$rA_tokDefList,$mode)
getSubstitutions($parse)
nextToken($rA_tokList)

Exported Functions

dumpData, nextToken, parse

parse($parse,$rA_tokDefList,$mode)

A Tokenizer:

The Tokens are processed in the defined order.

Token definition : a list of regexp containing one or three elements:

Example :

  my @token = (
      ['QUOTED_STR' , [qr(^"), qr(^(?:[^"\\\\]+|\\\\(?:.|\n))*), qr(")]],
  	 ['SEPERATOR'  , [qr(^=)]]
 	}

Return: a list of tokens

Parameter :

getSubstitutions($parse)

Parse string for name value pairs.

Syntax: NAME="VALUE",NAME2="VALUE2",...

Return: Hash = {NAME=>"VALUE",NAME2=>"VALUE2"}

nextToken($rA_tokList)

Get next token from token list returned from parse()

Return : (tokType,tokValue) or (undef,undef) if list is empty