Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2014 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/743d6b3915783a1a5853 to your computer and use it in GitHub Desktop.
Save anonymous/743d6b3915783a1a5853 to your computer and use it in GitHub Desktop.
grammar Sequence {
token TOP { <sequence>+ }
proto token sequence {*}
multi token sequence:sym<dna> { <[ACGTRYKMSWBDHVNX]>+ }
multi token sequence:sym<rna> { <[ACGURYKMSWBDHVNX]>+ }
multi token sequence:sym<aa> { <[A..Z]>+ }
}
say Sequence.parse("TATAKEKEKELKL");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment