Crate romulus

Source
Expand description

Romulus is a text processing language similar to sed

Here is an example program which process the output of ifconfig

/^(?P<inter>[a-zA-Z0-9]+): /,/^[a-zA-Z0-9]+:/ {
  /inet (?P<ip>[0-9]{1,3}(\.[0-9]{1,3}){3})/ {
    print("${inter}: ${ip}")
  }

  /inet6 (?P<ip>[a-fA-F0-9]{0,4}(:[a-fA-F0-9]{0,4}){0,8})/ {
    print("${inter}: ${ip}")
  }
}

Macros§

  • A macro that expands to a colored output if romulus is compiled with color support
  • A macro that expands to the proper line ending character sequence for operating system

Structs§

  • Builds an interpreter
  • The interpreter which processes lines with a romulus program

Functions§

  • Gives a record of which features romulus was installed with