Closed huntzhan closed 9 years ago
If the SYNOPSIS shows an optional option-argument (as with [ -f[ option_argument]] in the example), a conforming application shall place any option-argument for that option directly adjacent to the option in the same argument string, without intervening
characters. If the utility receives an argument containing only the option, it shall behave as specified in its description for an omitted option-argument; it shall not treat the next argument (if any) as the option-argument for that option.
Remove non-terminals with no child!
According to the meaning of logical nodes(discussed in #15 ), the AST should be optimized by removing some non-terminal nodes. Code fragment implemented the strategy is as follow:
And node type transformation: