Added experimental scala scale parser

This commit is contained in:
2023-03-10 18:41:50 +02:00
parent 545ae1f92a
commit bd2a1587d7
12 changed files with 1718 additions and 1579 deletions

18
ziffers/spec/scala.lark Normal file
View File

@ -0,0 +1,18 @@
?root: lines
lines: (number | operation)+
random: "(" SIGNED_NUMBER "," SIGNED_NUMBER ")"
operation: number (operator (number | sub_operations | operation))+
!operator: "+" | "-" | "*" | "%" | "&" | "|" | "<<" | ">>" | "/"
sub_operations: "(" operation ")"
number: SIGNED_NUMBER | random
%import common.SIGNED_NUMBER
%import common.FLOAT
%import common.INT
%import common.WORD
%import common.CNAME
%import common.WS
%import common.NEWLINE
%ignore WS