如何摆脱减少/减少,减少/转移错误?

时间:2015-07-04 21:38:23

标签: bison yacc context-free-grammar lexer cup

我继续使用我的语法来减少/减少和减少/转移问题,但我不确定为什么或如何解决它。

这就是我所拥有的

Rails.application.routes.draw do

  root 'static_pages#home'
  match '/help', to: 'static_pages#help', via: 'get'
  match '/about', to: 'static_pages#about', via: 'get'
  match '/contact', to: 'static_pages#contact', via: 'get'
  match '/signup', to: 'users#new', via: 'get'

  match '/signin', to: 'sessions#new', via: 'get'
  match '/signout', to: 'sessions#destroy', via: 'delete'
  get '/users/:id', to: 'users#show', :as => :user

  resources :users
  resources :sessions, only: [:new, :create, :destroy]

1 个答案:

答案 0 :(得分:1)

在该语法中,blockblock_statementstatementsub_statementblock你可以绕过那个特定的桑树丛只要你愿意,不要解决任何事情。

很自然,你有冲突,因为你的语法含糊不清。

也许你的意思是sub_statement包含某种分隔的块? (BEGIN block NIGEB?)否则,我建议从block替代品列表中删除sub_statement