Пример #1
0
 public IOptionalAsConfigurator By(IExpressionConfigurator expression)
 {
     CurrentProduction.Add(new ProductionElement {
         Symbol = expression
     });
     return(this);
 }
Пример #2
0
        private void SetupExpressions(IFluentParserConfigurator config)
        {
            constants = config.Expression();
            constants.ThatMatches("PC|SP|O|POP|PEEK|PUSH").AndReturns(f => f);

            registers = config.Expression();
            registers.ThatMatches(@"[ABCXYZIJ]").AndReturns(f => f);

            digit = config.Expression();
            digit.ThatMatches(@"\d|1\d|0\d").AndReturns(f =>f);

            hex = config.Expression();
            hex.ThatMatches(@"0[xX][0-9a-fA-F]{1:4}").AndReturns(f => f);

            label = config.Expression();
            label.ThatMatches(@"[a-zA-Z]\w+").AndReturns(f => f);
        }