syntax: add [[ ]] [=[ ]=] etc. fix docs.
parent
9bfdf92105
commit
b4eebf65a9
|
@ -12,6 +12,7 @@ in: bootstrap.syntax
|
|||
":"
|
||||
";"
|
||||
"![[" "![=[" "![==["
|
||||
"[[" "[=[" "[==["
|
||||
"PRIVATE<"
|
||||
"B{"
|
||||
"BV{"
|
||||
|
|
|
@ -70,6 +70,19 @@ in: bootstrap.syntax
|
|||
"]==]" parse-multiline-string drop
|
||||
] define-core-syntax
|
||||
|
||||
|
||||
"[[" [
|
||||
"]]" parse-multiline-string suffix!
|
||||
] define-core-syntax
|
||||
|
||||
"[=[" [
|
||||
"]=]" parse-multiline-string suffix!
|
||||
] define-core-syntax
|
||||
|
||||
"[==[" [
|
||||
"]==]" parse-multiline-string suffix!
|
||||
] define-core-syntax
|
||||
|
||||
"PRIMITIVE:" [
|
||||
current-vocab name>>
|
||||
scan-word scan-effect ";" expect ensure-primitive
|
||||
|
|
|
@ -4,7 +4,7 @@ alien.prettyprint arrays assocs classes classes.struct
|
|||
combinators combinators.short-circuit continuations fry kernel
|
||||
libc make math math.parser mirrors prettyprint.backend
|
||||
prettyprint.custom prettyprint.sections see.private sequences
|
||||
slots strings summary words ;
|
||||
slots strings summary words see ;
|
||||
in: classes.struct.prettyprint
|
||||
|
||||
PRIVATE<
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
USING: help.syntax help.markup peg peg.search words ;
|
||||
in: peg.ebnf
|
||||
|
||||
HELP: EBNF<
|
||||
{ $syntax "EBNF<...ebnf... EBNF>" }
|
||||
HELP: EBNF-MAIN{{
|
||||
{ $syntax "EBNF-MAIN{{ ...ebnf... }}" }
|
||||
{ $values { "...ebnf..." "EBNF DSL text" } }
|
||||
{ $description
|
||||
"Creates a " { $vocab-link "peg" }
|
||||
|
@ -15,7 +15,7 @@ HELP: EBNF<
|
|||
{ $examples
|
||||
{ $example
|
||||
"USING: kernel prettyprint peg.ebnf peg.search ;"
|
||||
"\"abcdab\" EBNF< rule=\"a\" \"b\" => [[ drop \"foo\" ]] EBNF> replace ."
|
||||
"\"abcdab\" EBNF-MAIN{{ rule=\"a\" \"b\" => [[ drop \"foo\" ]] }} replace ."
|
||||
"\"foocdfoo\""
|
||||
}
|
||||
} ;
|
||||
|
@ -469,7 +469,7 @@ ARTICLE: "peg.ebnf" "EBNF"
|
|||
"EBNF syntax. It provides three parsing words described below. These words all "
|
||||
"accept the same EBNF syntax. The difference is in how they are used. "
|
||||
{ $subsections
|
||||
\ EBNF<
|
||||
\ EBNF-MAIN{{
|
||||
\ EBNF{{
|
||||
}
|
||||
"The EBNF syntax is composed of a series of rules of the form:"
|
||||
|
|
Loading…
Reference in New Issue