===========================================================================
 R[hl[ "KIU" `JjPYAjPY` Version 0.4.6
===========================================================================

J@炽߂Ă(PP) 

///////////////////////////////////////////////////////////////////////////

@dlłBɔ剻Ă܂B

ȂAP̃f~^Ŏ኱RĂ܂B
󔒂1ȏvꏊWSgĂP[XłB
ǂɌvĂB

///////////////////////////////////////////////////////////////////////////

EBNFȗ

0ȏ̌JԂ
'*'ŕ\B
ex)
Sentence ::= Token *

1ȏ̌JԂ
'+'ŕ\B
ex)
TokenGroup ::= Token +

A
╶''ň͂ށB܂A#xŎn܂WideCharacter\LłǂB
ex)
Group ::= '(' Part-word * ')'
S ::= (#x20 |#x9 |#xd |#xa)+

͈
('a'|'b'|'c'|'d'|'e')  '[abcde]'ƏA'[a-e]'ƂB
[#x20-#x07FF]ȂǂƂ\LB
{I2bytez肵Ă邪AoCgł悢B
̏ꍇ͓K͈͂gčl邱ƁB

O
'-'ŕ\B(Char - '/')́A'/'Char\B

͈͂̏O
[]̐擪'^'́A͈͂̕O邱Ƃ\B
[^a-d]́A[a-d]ȊO̕\B

Rg
'#'ȍ~̓RgƂB#xXX\Lƕ킵B

///////////////////////////////////////////////////////////////////////////

"KIU" vvZbT

[0] s'!'Ŏn܂ꍇAÍꂽsƂāAsB

[1] s':'ꍇA̍s̓vO}ƂĈB

  E':rem' : ':endrem'܂ł̊Ԃ̍sRgƂĈB
  EFłȂvO}͑fʂ肷

[2] s󔒕ȊO̍ŏ̕'#'łꍇA̍s
RgƂĔjB


Iɂ́A][ؑւ̏̒iKōsƂɂȂB

///////////////////////////////////////////////////////////////////////////

"KIU" @ / 炭tZbg



[0] <> [GOAL]
Dictionary ::=
	DictionaryDecl

[1] <Lq][>
DictionaryDeclZone ::=
	'=dict' R DictionaryDecl '=end' R

[2] <XNvgLq][>
ScriptDeclZone ::=
	'=kis' R ScriptDecl '=end' R

[3] <Lq>
DictionaryDecl ::=
	( EntryDef | ScriptDeclZone ) *

[4] <XNvgLq>
ScriptDecl ::=
	( ScriptStatementSeq | DictionaryDeclZone ) *

[5] <Gg`>
EntryDef ::=
	WS EntryIdList ':' S NRStatementList R
	| WS EntryIdList '(' WS StatementList ')'

[6] <Ggʎq>
EntryIdList ::=
	IdLiteral S | IdLiteral S ',' S EntryIdList

[7] <ss>
NRStatementList ::=
	NRStatement S | NRStatement S ',' S NRStatementList
	# No Return Statement List

[8] <>
StatementList ::=
	Statement WS | Statement WS ',' WS StatementList



[9] <ss>
NRStatement ::=
	S ( Word.mode1 S ) *
	# No Return Statement

[10] <ubN>
Block ::=
	'(' WS Statement ')'

[11] <>
Statement ::=
	WS ( Word.mode3 WS ) *

[12] <P>
Word.(mode) ::=
	( Literal.(mode) | Block | Subst ) +
	# NO Whitespace!

[13] <uubN>
Subst ::=
	EntryCallSubst | EntryIndexSubst | InlineScriptSubst | ExprSubst

[14] <GgĂяo>
EntryCallSubst ::=
	'${' WS EntryExpr '}'

[15] <GgzĂяo>
EntryIndexSubst ::=
	'$' EntryWord '[' WS Expression WS ']'
	# NO Whitespace

[16] <CCXNvgubN>
InlineScriptSubst ::=
	'$(' WS ScriptStatementSeq WS ')'

[17] <CCXNvg>
ScriptStatementSeq ::=
	Statement WS ( ';' WS ScriptStatement ) *

[18] <CCXNvg>
ScriptStatement ::=
	WS ( Word.mode2 WS ) *

[19] <Ăяo>
ExprSubst ::=
	'$[' WS Expression ']'


GgZ

[20] <GgZ>
EntryExpr ::=
	EntryFactor ( WS EntryBinaryOp WS EntryFactor ) *

[21] <Ggvf>
EntryFactor ::=
	EntryWord WS
	| '(' WS EntryExpr ')' WS

[22] <Gg>
EntryWord ::=
	( IdLiteral | Subst ) + WS




[23] <>
Expression ::=
	UnaryExpr ( WS BinaryOp WS UnaryExpr ) *

[24] <P>
UnaryExpr ::=
	ExprFactor
	| UnaryOp WS ExprFactor

[25] <vf>
ExprFactor ::=
	ExprWord
	| '(' Expression ')' WS

[26] <ExprP>
ExprWord ::=
	( DecimalLiteral | QuotedLiteral | Subst ) + WS


I[LQ

# <󔒕>
SC ::=
	#x20 | #x09
	# ' '  '\t'

S ::=
	SC*

# <s>
R ::=
	#x0D | #x0A | #x0d#x0A

# <>
WS ::=
	( SC | R ) *

# <ʎq>
IdLiteral ::=
	( [0-9A-Za-z._@?] | NAChar ) +

# <>
Literal.(mode) ::=
	BareLiteral.(mode) | QuotedLiteral

# <xA>
BareLiteral.mode1 ::=
	( [#x21-#x7E] - ["$'(),] | NAChar ) +
	# = [A-Za-z0-9_!<>{}[]\%#&@?~:;./*+-=|^`] | NAChar

BareLiteral.mode2 ::=
	( [#x21-#x7E] - ["$'();] | NAChar ) +
	# = [A-Za-z0-9_!<>{}[]\%#&@?~:.,/*+-=|^`] | NAChar

BareLiteral.mode3 ::=
	( [#x21-#x7E] - ["$'()] | NAChar ) +
	# = [A-Za-z0-9_!<>{}[]\%#&@?~:;.,/*+-=|^`] | NAChar

	# * No Whitesapce!! *

# <NH[g>
QuotedLiteral ::=
	  "'" ([^'#x0D#x0A] | '\\' | "\'")* "'"
	| '"' ([^"#x0D#x0A] | '\\' | '\"')* '"'

# <10i>
DecimalLiteral ::=
	'0'
	| [1-9] [0-9]*

# <ASCII>
NAChar ::=
	[#x0080-#xFFFF]
	# Non ASCII Character

# <Gg񍀉Zq>
EntryBinaryOp ::=
	'+' | '-' | '&'

# <񍀉Zq>
BinaryOp ::=
	'|' | '&' | '^'
	| '||' | '&&' 
	| '<' | '<=' | '=' | '==' | '!=' | '=~' | '!~' | '>=' | '>'
	| '+' | '-' | '*' | '/' | '%' | '**'

# <PZq>
UnaryOp ::=
	'-' | '+' | '!' | '~'


///////////////////////////////////////////////////////////////////////////

ChangeLog :
0.4.5 -> 0.4.6
	SsGg`ǉB

0.4.4 -> 0.4.5
	̊ɋyŁAXNvg̒Pꒆ';'g悤ȃoO𔭌B
	̍ۂƂƂŃxA[hB

0.4.3 -> 0.4.4
	QuotedLiteral͕K{BGoO܂B݂܂B

0.4.2 -> 0.4.3
	EntrÿB
	łɎQuotedLiteral֎~B
	QuotedLiteral̎gꏊ₷ȂB

0.4.1b -> 0.4.2
	EntryNameEntryWordɓ
	EntryNameListEntryDeclListɓ
	GgQuotedLiteralĂoOC

0.4.0b -> 0.4.1b
	̒Pɂbug fix
	Word/WeakWord

0.3.0b -> 0.4.0b
	}b`Gg폜B
	=dict, =kis][B
	lexerɊւ郁폜B

0.2.5b -> 0.3.0b
	Gg`Aʏ̂̂ƃ}b`GgƂœB
	eZ\\L̊ȗAɂĂ͕ʋLƂB
	Expression̒`̒ǉB
	Z̒PBlockĂoOCB

0.2.4b -> 0.2.5b
	}b`Zq̓A','u_ωZqvƂBWS̈ʒuœKB
	EntryIndexSubst𐳎ɕB

0.2.3b -> 0.2.4b
	Lexer̓CBu̓ʈp~B

0.2.2b -> 0.2.3b
	ExprɂĂ̋Lq኱ǉB󔒂ĂB

0.2.1b -> 0.2.2b
	ŸlexerxɗĂ("[0-9]+"ȂǂƂӂLq
	ȂĂ)̂AExprƂ̂ŁAȈՔłȂExpr̒`ǉB

0.2.0b -> 0.2.1b
	YtGgĂяoɂĂ̋LqĂB

0.1.1b -> 0.2.0b
	preprocessorlexerɂĂ̋LqǉB

0.1.0b -> 0.1.1b
	QuotedLiteralbug fix.

