Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Delimiter
- <SPACE> ::= " "
- # Terminal symbols (I call them tokens)
- # All caps
- # Order is to prevent ambiguity
- <EMPTY> ::= ""# Literal empty string, as a token
- <STAR> ::= "*"
- <UNREACHABLE> ::= "!H"# I would call it !H but you can't
- # have a variable named that
- # !H means "Destination host unreachable"
- # from traceroute.
- <MS> ::= "ms"
- <IP> ::= <IP_PATTERN># Constant defined at top of file
- <HOST> ::= <HOST_PATTERN># Constant defined at top of file
- <INTEGER> ::= /\d+/# An INTEGER is a valid DECIMAL so we put this
- # above DECIMAL to remove ambiguity
- <DECIMAL> ::= <DECIMAL_PATTERN># Constant defined at top of file
- # Rules from beginning of string to end
- <Line> ::= <Empties> <Ttl> <EMPTY> <Responses>
- <Empties> ::= <EMPTY>*
- <Ttl> ::= <INTEGER>
- <Responses> ::= <Hit>
- <Responses> ::= <Miss>
- <Responses> ::= <Responses>+
- <Miss> ::= <STAR>
- <Miss> ::= <UNREACHABLE>
- <Hit> ::= <HOST> <IP> <Time>
- <Hit> ::= <EMPTY> <Time>
- <Time> ::= <EMPTY> <DECIMAL> <MS>
- <Time> ::= <EMPTY> <INTEGER> <MS>
Add Comment
Please, Sign In to add comment