[llvm-dev] Potential ambiguity in the grammar of LLVM IR assembly
Robin Eklind via llvm-dev
llvm-dev at lists.llvm.org
Wed May 25 16:10:32 PDT 2016
While developing a parser for LLVM IR, I seem to have stumbled upon a
potential ambiguity in the LLVM IR assembly language grammar. Most
likely there is something which I may have overlooked, so wanted to
reach out to a more experienced crowed for some feedback.
How would the following set of tokens be interpreted ?
As far as I can tell, both of the following representations are valid in
the grammar 
declare void @foo() unnamed_addr
global i32 42
declare void @foo()
unnamed_addr global i32 42
Is the grammar ambiguous, or is there something that I've overlooked?
Hope to hear back from you.
With kind regards,
More information about the llvm-dev