Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6141469
brackets.foma
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
740 B
Referenced Files
None
Subscribers
None
brackets.foma
View Options
# Helper functions for (non-nested) bracketing constructs
# The "[[" and "]]" are atomic tokens; they won't match any unicode input
# character. Sometime we need additional delimiters, so we've also defined
# "<<" and ">>" (which shouldn't ever appear in output).
define BRACKETS "[[" | "]]" | "<<" | ">>" ;
define REMOVEBRACKETS BRACKETS -> 0 ;
# This is useful to assert that an input doesn't have brackets, simplifying
# the FST.
define NO'BRACKETS [\BRACKETS]* ;
# Invert the sense of the brackets
# Ie, bracket the stuff not in brackets, remove brackets from bracketed stuff.
define SWAPBRACKETS [
"[["->"]]" ,,
"]]"->"[["
] .o. [
[..]->"[[" || .#. _
] .o. [
[..]->"]]" || _ .#.
] .o. [
"[[" "]]" -> 0 || .#. _ , _ .#.
];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 7 2026, 18:47 (6 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7f/89/b263f02c0694238e2e9f3d4c9525
Default Alt Text
brackets.foma (740 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment