mrsekut
@igrep
あ!!spacesがspaceになっているのが原因でした..
ありがとうございます
前々からspacesはやたら出てくるなぁと感じていたので教えていただいたものを使うとだいぶスッキリ書けました
あ!!spacesがspaceになっているのが原因でした..
ありがとうございます
前々からspacesはやたら出てくるなぁと感じていたので教えていただいたものを使うとだいぶスッキリ書けました
Linking .stack-work/dist/x86_64-osx/Cabal-2.4.0.1/build/site/site ...
Undefined symbols for architecture x86_64:
"_utimensat", referenced from:
_cazW_info in libHSdirectory-1.3.3.0.a(Posix.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
Completed 166 action(s).
-- While building package matsubara0507-ghpages-0.3.1.0 using:
$HOME/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.4.0.1 build exe:site --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
%INFO_PTR というマクロを呼ぶ」処理のこと、という理解で正しいでしょうか?case x of ... の x が評価済みかを、pointer tagging で切り分けています。
data Expr = Add Expr Expr
| Sub Expr Expr
| Nat Int
deriving (Show, Eq)
data BinOp = Add | Sub deriving (Show, Eq)
data Expr = BinOp Expr Expr
| Nat Int
deriving (Show, Eq)
-- 従来のもの
-- add ::= term | term ('+' add | "-" add)
add :: Parser Expr
add = term `chainl1` skipW1 addop
addop :: Parser (Expr -> Expr -> Expr)
addop = Add <$ char '+' <|> Sub <$ char '-'
addop :: Parser (Expr -> Expr -> Expr) addop = BinOp <$ char '+' <|> BinOp <$ char '-'
Expr = B BinOp Expr Expr | Nat Int じゃないとじゃない?if (R1 & 3 != 0) goto ccA; の行のことですよね?if (R1 & 3 != 0) goto ccA; が1つめの切り分けです。x が「評価済みか否か」を切り分けています。x を評価(xのコードへjump)します。)if (_ccu::I32 >= 2) goto ccv; が2つめの切り分けです。Nothing で、「2」なら Just を表します。>= 2 によって、 Just かを切り分けています。x の実体にメモリアクセスすることなく、 x が評価済みかと、x の値が何かがわかるのが、pointer taggingの良いところです。setAllocationCounter や getAllocationCounter を使うのが正解なんでしょうか。String でしか返してくれない(きちんとしたデータ型で返ってきてほしい)のでどうしたものかなと思ってます。解決策としてLow-levelなAPIを使ってrunAlexを自前で書くのと他のパーサコンビネータ使ってしまうのとがあると思うんですが、どっちのほうが辛くなさそうでしょうか