Numinex

@hikikomorphism.bsky.social

did:plc:qvywnipfiyrd6v4qdf4x27wy

4posts
3replies
6generations
1links
0prompts
H

given the following .pest file as used in this repo (https://github.com/inanna-malick/detect) suggest vibe improvements to create a more LLM-optimized tool

WHITESPACE   =  _{ " " | "\t" | NEWLINE }


char = { ASCII_ALPHANUMERIC | "." | "_" | "/" }


program         =   { SOI ~ expr ~ EOI }
  expr          =   { prefix* ~ primary ~ (infix ~ prefix* ~ primary )* }
    infix       =  _{ and | or }
      and       =   { "&&" } // logical and
      or        =   { "||" } // logical or
    prefix      =  _{ neg }
      neg       =   { "!" } // Negation
    primary     =  _{ predicate | "(" ~ expr ~ ")" }


predicate =  { selector ~ op ~ rhs }
  selector = { "@" ~ (name | path | ext | size | type | contents) }
    name     = { "filename"  | "name" }
    path     = { "filepath"  | "path" }
    ext      = { "extension" | "ext"  }
    size     = { "filesize"  | "size" }
    type     = {"filetype"   | "type" }
    contents = { "contents"  | "file" }
  op      = _{ eq | like | gteq | lteq | gt | lt}
    eq    = { "==" | "=" } // exact equals
    like  = { "~=" | "~" } // regex type situation
    gteq  = { ">=" }
    lteq  = { "<=" }
    gt    = { ">" }
    lt    = { "<" }
  rhs     = @{ char+ }
replyquoteparent