Created
January 19, 2018 12:37
-
-
Save willmurphyscode/2095ce909840fddf84ca67ee2d0568e7 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
named!(single_token<&[u8], Token>, | |
alt!( | |
left_paren | | |
right_paren | | |
addition_sign | | |
subtraction_sign | | |
multiplication_sign | | |
division_sign | | |
operand | |
) | |
); | |
named!(tokens<&[u8], Vec<Token>>, | |
ws!(many0!(single_token)) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment