Commit Graph

92 Commits

Author SHA1 Message Date
svenbarth
c6496f8ec5 Fix for Mantis #26278.
pbase.pas:
  + add an overload for identifier_not_found for which the file position can be supplied
pexpr.pas, factor_read_id:
  * store the file position before reading the identiifer token
  * use the new identiifer_not_found overload to explicitely set the file position
  * set the file position of the created node

git-svn-id: trunk@27947 -
2014-06-13 21:36:55 +00:00
paul
1c578de28c compiler:
* don't allow to apply the same hint directive twice
  * change parser_e_proc_dir_not_allowed to more generic variant parser_e_dir_not_allowed - they are similar and 'procedure' prefix does not give more information about the error.
  * maybe_parse_hint_directives() uses procdef settings for initial values
  + add tests

git-svn-id: trunk@25720 -
2013-10-08 04:56:42 +00:00
florian
f25f44605e - get rid of m_all, use a set instead for tokens, this allows to disable/enable tokens depending on the language mode
git-svn-id: trunk@22506 -
2012-09-30 21:03:35 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
paul
adceaf438c reintegrate paul/namespaces branch into trunk:
r18890 | paul | 2011-08-29 16:45:23 +0800 (Пн, 29 авг 2011) | 1 line

compiler: also parse dots in package name and in units which package contains (although package support is not implemented yet in FPC it can parse packages)
------------------------------------------------------------------------
r18886 | paul | 2011-08-29 10:46:13 +0800 (Пн, 29 авг 2011) | 1 line

compiler: replace "string" with ansistring where we concatenate substrings to prevent 255 chars limit overflow
------------------------------------------------------------------------
r18859 | paul | 2011-08-27 11:52:07 +0800 (Сб, 27 авг 2011) | 1 line

compiler: implement delphi like namespaces

git-svn-id: trunk@18911 -
2011-08-30 01:10:24 +00:00
paul
61f2335de9 compiler: replace "string" with ansistring where we concatenate substrings to prevent 255 chars limit overflow
git-svn-id: branches/paul/namespaces@18886 -
2011-08-29 02:46:13 +00:00
paul
de21de2024 compiler: implement delphi like namespaces
git-svn-id: branches/paul/namespaces@18859 -
2011-08-27 03:52:07 +00:00
paul
8309809a0d compiler: use try_consume_unitsym for except variable parse. this is needed to reduce maintenance cost for later unit identifier search changes
git-svn-id: trunk@18826 -
2011-08-24 10:54:17 +00:00
Jonas Maebe
28c20cfc5e * the default string type for the JVM target is no longer automatically
unicodestring = java.lang.String. The reason this was the default in
    the past is that this was the first string type that was implemented,
    and without it being the default most code involving string operations
    would fail. Now the default strings types are the same as for other
    targets
  + new {$modeswitch unicodestrings} directive, that when activated
    *together* with {$h+},
   1) changes char into an alias for widechar
   2) changes string into an alias for unicodestring
   3) changes the preferred string evaluation type (in case of uncertainty)
      to unicodestring
    {$modeswitch unicodestrings} with {$h-} does not change anything at all
    regarding the string type (it still changes the char type)
  + new uuchar unit that redefines char as widechar, and which is automatically
    included by the compiler if {$modeswitch unicodestrings} is enabled

git-svn-id: branches/jvmbackend@18781 -
2011-08-20 08:35:47 +00:00
Jonas Maebe
7200245337 + cs_unicodestrings global switch to indicate that the default string type
is unicodestring (does *not* change the type of "char" to "unicodechar"
    (yet)). Not yet (un)selectable via a directive.
  + systems_default_unicodestring set containing systems on which the
    default string type is unicodestring

git-svn-id: branches/jvmbackend@18415 -
2011-08-20 07:57:45 +00:00
paul
668cd1f3c0 compiler: change check for current in try_consume_unitsym - don't use current_unit in check because specialize code does not replace this variable (fixes bug #0015591)
git-svn-id: trunk@16489 -
2010-12-01 08:18:51 +00:00
florian
c6ffbe9eda * support string constants > 255 chars
* don't cut off anymore string constants silently at 255 chars

git-svn-id: trunk@14789 -
2010-01-24 09:28:46 +00:00
paul
e784ec1079 merge revisions 13898-13899:
- compiler: allow message after the *deprecated* keyword
 - compiler: raise an internal error if deprecated message is trying to set to a non clear string pointer

git-svn-id: trunk@13997 -
2009-11-01 14:06:30 +00:00
florian
d8d96f14e6 + experimental directive, resolves #10833
git-svn-id: trunk@10331 -
2008-02-15 19:29:34 +00:00
florian
2d91fef4f1 + accept system.string, resolves #10489
git-svn-id: trunk@9727 -
2008-01-12 22:25:33 +00:00
peter
1e123d66ba * improved generics
git-svn-id: trunk@8838 -
2007-10-18 00:24:05 +00:00
florian
7229dcfdcb * setup a proper symtable stack before parsing the generic declaration itself, resolves #9419
git-svn-id: trunk@8820 -
2007-10-15 19:43:01 +00:00
daniel
9adb202a92 * Rework the constexprint to allow operations from low(int64) to high(qword).
+ Some initial work on a formaldef which also carries the typinfo of a parameter.

git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
florian
11aa2b483e * kicked ignore_equal, usage was wrong anyways
git-svn-id: trunk@5763 -
2006-12-31 00:48:52 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
florian
be2b715d3c + parsing of disp variant invokes
git-svn-id: trunk@5162 -
2006-11-01 21:23:04 +00:00
florian
bce905b106 * give correct error locations for errors when specializing templates
* removed more germanisms
* better dumping of tokenbuf in ppudump

git-svn-id: trunk@5101 -
2006-10-30 23:28:06 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
florian
3824604e8a * export of qualified unit symbols, fixes #6848
git-svn-id: trunk@3570 -
2006-05-18 20:43:52 +00:00
peter
232555904e * symtablestack cleanup and rewrite
git-svn-id: trunk@2448 -
2006-02-05 22:24:18 +00:00
peter
4c19728d9b * fix crash with ident not found
git-svn-id: trunk@2444 -
2006-02-05 20:05:45 +00:00
Jonas Maebe
9fd4e98dad * fixed displaying of hints such for procedures and functions
(and moved check_hints from pbase to htypechk)

git-svn-id: trunk@2417 -
2006-02-03 18:14:13 +00:00
peter
95879fe8a7 * basic support for generic classes
git-svn-id: trunk@2020 -
2005-12-21 10:11:15 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
8d251e8506 * unit mapping rewrite
* new derefmap added
2005-01-19 22:19:41 +00:00
florian
fe54af8f82 * finally is an "endtoken" as well 2004-08-08 12:06:38 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
daniel
ce11762359 - Comment out unused tokenstring function 2004-02-21 20:10:27 +00:00
peter
607b41f22e * except is also an end of block token
* after a label don't try to parse a statement when the next token
    is an end token
2004-01-22 17:24:49 +00:00
peter
8af51ea6d3 * locals and paras are allocated in the code generation
* tvarsym.localloc contains the location of para/local when
    generating code for the current procedure
2003-09-23 17:56:05 +00:00
peter
92ee1804b6 * removed selfpointer_offset, vmtpointer_offset
* tvarsym.adjusted_address
  * address in localsymtable is now in the real direction
  * removed some obsolete globals
2003-05-15 18:58:53 +00:00
peter
fe6518a49c * allow more tokens instead of only semicolon after inherited 2003-03-17 18:55:30 +00:00
carl
6227991d96 - remove lower in hint 2002-12-05 19:27:40 +00:00
carl
93d011d184 + checking for symbols used with hint directives is done mostly in pexpr
only now
2002-11-30 11:12:48 +00:00
carl
5c5db0e0a3 + unimplemented hint directive added
* hint directive parsing implemented
  * warning on these directives
2002-11-29 22:31:19 +00:00
peter
a540ff122c * tdicationary.replace added to replace and item in a dictionary. This
is only allowed for the same name
  * varsyms are inserted in symtable before the types are parsed. This
    fixes the long standing "var longint : longint" bug
  - consume_idlist and idstringlist removed. The loops are inserted
    at the callers place and uses the symtable for duplicate id checking
2002-09-09 17:34:14 +00:00
florian
e313bab4ff * first part of procinfo rewrite 2002-08-17 09:23:33 +00:00
peter
06ebac4e27 * readded missing revisions 2002-05-18 13:34:04 +00:00
carl
21b3a10f02 + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+ try to fix temp allocation (still in ifdef)
+ generic constructor calls
+ start of tassembler / tmodulebase class cleanup
2002-05-16 19:46:34 +00:00
peter
2992e1819c * removed old logs and updated copyright year 2002-05-14 19:34:38 +00:00
peter
5cdb7cc52b * removed getprocvar, use only getprocvardef 2002-01-06 21:47:32 +00:00
peter
f86ce17588 + hint directive parsing support 2001-06-03 21:57:35 +00:00
peter
6c7708c1e0 * ppu object to class rewrite
* move ppu read and write stuff to fppu
2001-05-06 14:49:16 +00:00