psyn (POLON Syntax Notation) is minimalistic syntax description format. psyn is:
- Format for people, not machines
- Very easy to adapt/learn (you can learn
psynin ~10 minutes) - Very simple (there are only 3 core components, rest are derivatives)
- Universal (
psyncan fit into tiny CLI's as well as into assemblers/languages)
psyn DOES/IS NOT:
- Standalone file format
- Format to generate ready parsers
- Inform user of everything (it only presents shape of syntax, rest is informed by author)
It aims to solve following problem:
How to inform user of syntax of tool in a way that is expressive, minimal and easy to understand?
psyn v1.1 is currently latest version of psyn.
<VALUE>: variable value[VALUE]: optional valueVALUE: static value[<VALUE>]: optional variable data
IMPORTANT: if any node is put inside string literals (""), then you can consider it just text.
Abbreviations are used (as name implies) to abbreviate node combination. Let's take a look at example of following assembly code that can be described using PSYN format.
mov rax, rcx
Here we can use two abbreviations, that is: X86Instruction and X86Register. In PSYN format these are declared using *ABBREVIATION_NAME* = <NODE>.
Shortened declaration of these 2 abbreviations:
*X86Instruction* = MOV, [...]
*X86Register* = RAX, RCX, [...]
If abbreviation has any variable data, its name must be put inside parentheses (()).
Example Declaration:
*SomeAbbreviation*(SOMEVAR) = <SOMEVAR>
If we now want to reference it (with some value):
*SomeOtherAbbreviation* = *SomeAbbreviation*("Hello") World
psyn was made by matissoss for POLON project and licensed under MIT license.