llvm-6502/lib/AsmParser
Reid Spencer e1553cc956 For PR950:
Major reorganization. This patch introduces the signedness changes for
the new integer types (i8, i16, i32, i64) which replace the old signed
versions (ubyte, sbyte, ushort, short, etc). This patch also implements
the function type parameter attributes feature. Together these conspired
to introduce new reduce/reduce errors into the grammar. Consequently, it
was necessary to introduce a new keyword into the grammar in order to
disambiguate. Without this, yacc would make incorrect shift/reduce and
reduce/reduce decisions and fail to parse the intended assembly.

Changes in assembly:

1. The "implementation" keyword is superfluous but still supported. You
   can use it as a sentry which will ensure there are no remaining up
   reference types. However, this is optional as those checks are also
   performed elsewhere.

2. Parameter attributes are now implemented using an at sign to
   indicate the attribute. The attributes are placed after the type
   in a function declaration or after the argument value in a function
   call. For example:
      i8 @sext %myfunc(i16 @zext)
      call i8 @sext %myfunc(i16 @zext %someVal)
   The facility is available for supporting additional attributes and
   they can be combined using the @(attr1,attr2,attr3) syntax. Right
   now  the only two supported are @sext and @zext

3. Functions must now be defined with the "define" keyword which is
   analagous to the "declare" keyword for function declarations. The
   introduction of this keyword disambiguates situations where a
   named result type is confused with a new type or gvar definition.
   For example:
      %MyType = type i16
      %MyType %func(%MyType) { ... }
   With the introduction of optional parameter attributes between
   the function name and the function result type, yacc will pick
   the wrong rule to reduce unless it is disambiguated with "define"
   before the function definition, as in:
      define %MyType @zext %func(%MyType %someArg) { ... }


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32781 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:40:12 +00:00
..
.cvsignore
Lexer.cpp.cvs Regenerate. 2006-12-29 20:35:03 +00:00
Lexer.l For PR950: 2006-12-31 05:40:12 +00:00
Lexer.l.cvs Regenerate. 2006-12-29 20:35:03 +00:00
llvmAsmParser.cpp.cvs Regenerate. 2006-12-29 20:35:03 +00:00
llvmAsmParser.h.cvs Regenerate. 2006-12-29 20:35:03 +00:00
llvmAsmParser.y For PR950: 2006-12-31 05:40:12 +00:00
llvmAsmParser.y.cvs Regenerate. 2006-12-29 20:35:03 +00:00
Makefile For PR797: 2006-08-18 09:30:03 +00:00
Parser.cpp For PR797: 2006-08-18 08:43:06 +00:00
ParserInternals.h Remove backwards compatibility goop. Now implemented in llvm-upgrade. 2006-12-03 05:45:44 +00:00