Created
May 23, 2009 15:39
-
-
Save tobinharris/116663 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar ActivityDiagram | |
rule diagram | |
phrase | |
end | |
rule phrase | |
node (connector node)* | |
end | |
rule node | |
activity / parallel / decision | |
end | |
rule activity | |
'(' label:[a-zA-Z]+ ')' | |
end | |
rule parallel | |
'|' label:[a-zA-Z]+ '|' | |
end | |
rule decision | |
'<' label:[a-zA-Z]+ '>' | |
end | |
rule connector | |
(left_arrow)? (left_label)? '-' (right_label)? (right_arrow)? | |
end | |
rule left_arrow | |
'<' | |
end | |
rule right_arrow | |
'>' | |
end | |
rule left_label | |
line_label | |
end | |
rule right_label | |
line_label | |
end | |
rule line_label | |
[a-zA-Z_0-9]+ | |
end | |
rule comma | |
',' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment